seppinho / mutserve

mtDNA Variant Caller
https://mutserve.vercel.app
MIT License
32 stars 6 forks source link

java.lang.IllegalArgumentException: Invalid reference index -1 #47

Open ianaebutler opened 1 year ago

ianaebutler commented 1 year ago

I am getting the following error message when trying to run the variant caller tool. I saw someone had a similar error in another thread, which was solved by removing spaces from the reference title #43. There are no spaces in the reference title in my sample, but I think the problem must be with the format of either the reference or the index file. Any other ideas about what could be causing the error?

call, --reference=sample72mtassembly.fasta, --output, sample72out.txt, --threads, 4, sample72_sorted_mappedreadsonly.bam] ❌ sample72_sorted_mappedreadsonly.bam[>-------------------------------------][00:00:00] java.lang.IllegalArgumentException: Invalid reference index -1 at htsjdk.samtools.QueryInterval.(QueryInterval.java:24) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:538) at genepi.mut.tasks.VariantCallingTask.run(VariantCallingTask.java:129) at lukfor.progress.tasks.Task.call(Task.java:39) at lukfor.progress.tasks.Task.call(Task.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) java.lang.Exception: Invalid reference index -1 at genepi.mut.tasks.VariantCallingTask.run(VariantCallingTask.java:133) at lukfor.progress.tasks.Task.call(Task.java:39) at lukfor.progress.tasks.Task.call(Task.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Variant Calling failed. Mutserve terminated.

izu0421 commented 1 year ago

I got the same problem... do you have any progress on this? thanks!

haansi commented 1 year ago

Sorry for the delay - could you try to set the parameter "--contig-name" to the respective name in the fasta reference? Is the reference length equal to 16569 (i.e. length of rCRS/chrM in GRCh38)?

izu0421 commented 1 year ago

This worked fine, thanks a lot! I was using mutserve for my own sample and specifying contig-name solved the issue.