Skip to content

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

Open

Description

@ianaebutler

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.

Activity

  1. izu0421 commented on Mar 7, 2023

    @izu0421

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

  2. haansi commented on Mar 7, 2023

    @haansi
    Collaborator

    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)?

  3. izu0421 commented on Mar 7, 2023

    @izu0421

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions