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

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

Open
ianaebutler opened this issue Feb 3, 2023 · 3 comments
Open

Comments

@ianaebutler
Copy link

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
Copy link

izu0421 commented Mar 7, 2023

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

@haansi
Copy link
Collaborator

haansi commented Mar 7, 2023

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
Copy link

izu0421 commented Mar 7, 2023

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

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

3 participants