FunGeST / Palimpsest

An R package for studying mutational signatures and structural variant signatures along clonal evolution in cancer.
69 stars 19 forks source link

error in returning DBS catergories #32

Closed jh2663 closed 4 years ago

jh2663 commented 4 years ago

Hi, I gave a try 'annotate_VCF' function with add_DBS_cats=TRUE option but failed to get results for some of samples where no DBS exists:

[1] Adding gene, strand and SBS category annotations .. [1] Adding DBS categories.. Error in if (add_cats$POS[i] == add_cats$POS[i + 1] - 1 & add_cats$CHROM[i] == : missing value where TRUE/FALSE needed

How can I handle this kind of cases?

best

FunGeST commented 4 years ago

Hi,

Thanks for reporting this issue. I've just fixed and updated the annotate_VCF function, so you should no longer receive this error when add_DBS_cats = TRUE and some samples don't have any DBS mutations.

Please let us know if you have any more problems with the package!

Best wishes, Benedict

jh2663 commented 4 years ago

Thank you for checking this out.

I ran it again and got another error saying 'Error : object 'DBS_cat' not found' in add_DBS_cats_ToVCF() function.

It seems the line 314 has something to do with this? https://github.com/FunGeST/Palimpsest/blob/master/R/annotate_VCF_functions.R#L314

Best,

jh2663 commented 4 years ago

Hi, I just figured it out. My original vcf file has a bit different format for DBSs. It's like a single line format such as chr1 12345 AT > GT ..... My original SNP detection algorithm was Mutect2 in GATK. Thank you.