Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running quick_simulation #65

Open
EmMaKaa opened this issue Oct 20, 2022 · 3 comments
Open

Error when running quick_simulation #65

EmMaKaa opened this issue Oct 20, 2022 · 3 comments

Comments

@EmMaKaa
Copy link

EmMaKaa commented Oct 20, 2022

Hi,

I'd like to run SigMA on a novel gene panel, have I understood correctly that it can be done by following the example in test_determine_cutoff.R and in the Wiki page Optimization? I have tried to do that, but when running quick_simulation, I get the following error:

Error in $<-.data.frame(*tmp*, "pass", value = logical(0)) : replacement has 0 rows, data has 1

Here's how I have done it:

data_dir <- 'directory to the folder containing the vcf file'

genomes_matrix <- make_matrix(data_dir, file_type = 'vcf', ref_genome_name = 'hg38')
genomes <- conv_snv_matrix_to_df(genomes_matrix)
genome_file = 'output directory'

write.table(genomes,
genome_file,
sep = ',',
row.names = F,
col.names = T ,
quote = F)

tumor_type <- 'ovary'
remove_msi_pole <- T

data_val <- find_data_setting(genome_file,
tumor_type,
remove_msi_pole = remove_msi_pole)
data_val
##[1] "seqcap_probe"

simul_file <- quick_simulation(input_file = genome_file,
tumor_type = tumor_type,
data = data_val,
remove_msi_pole = remove_msi_pole,
catalog_name = 'cosmic_v3p2')

I haven't been able to solve this issue, am I missing something important here? Also, could you explain the difference between catalog_name options?

@dgulhan-bio
Copy link
Collaborator

Is there any chance run_SigMA was set to F in the quick_simulation function? It is not shown above, and by default, it should be T, but that would explain the error you get. I made some updates adding new error messages that might help resolve the issue. Would you mind rerunning and sending the error message? I also updated the test_determine_cutoff.R.

You can also try test_tune_example.R which should provide a better performance than using an existing classifier and just adjusting the cutoff. In test_tune_example.R you are generating a new classifier suitable for your data.

For obtaining the data frame that contains catalog signatures you can do:
get_catalog('cosmic_v3p2')
I also added further information on the wiki.

@dgulhan-bio
Copy link
Collaborator

I forgot to mention to please check out the dev branch.

@EmMaKaa
Copy link
Author

EmMaKaa commented Nov 21, 2022

I was able to solve this, the problem was that I was testing the method only with one test sample, which obviously didn't work (tip for other newbies here...). I will now try retuning as you recommend, thank you for the additions in the wiki, I found them really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants