UMCUGenetics / MutationalPatterns

R package for extracting and visualizing mutational patterns in base substitution catalogues
MIT License
104 stars 45 forks source link

Compatibility issues with custom forged BSgenomes #58

Closed joshbaskaran closed 2 years ago

joshbaskaran commented 3 years ago

Hi,

I have been trying to use the mutationalPatterns to analyse from ribosomal RNAs. I used the U13369.1 from genBank for the initial mapping and variant calling. Since there isn't a BSGenome already for this, I forged one following their guide from Bioconductor. Unfortunately, I haven't been able to successfully use the same. Whenever I call the read_vcf_as_granges() function on my VCF, I enounter an error saying that the style specified by 'NCBIEnsemblMSU6AGPvF' does not have a compatibie entry for the species...

I have attempted to run the function with group = 'all' however, that didn't seem to help either.

Any suggestions as to what might be going wrong here?

Any help is really appreciated.

PS. I am unable to copy of the exact error or the session info since I'm working on protected server for sensitive data preventing any form of import/export to and from the server.

FreekManders commented 3 years ago

It should probably work if you use group = "none", together with change_seqnames = FALSE. After that you will have to make sure that the chromosome names in your BSGenome object are the same as in your GRanges. You could probably do this by changing the names of either one in R using the seqnames function. Alternatively you could use something like awk to change the seqnames in your vcfs directly.

joshbaskaran commented 3 years ago

Your suggestion seems to have fixed the problem! Thanks for the quick response! :D