Melt Transduction step2 -- find -- Failed at preprocessing bam file for transductions

32 views
Skip to first unread message

Robin J

unread,
Feb 14, 2021, 7:12:09 PM2/14/21
to MELT Help
Hi Eugene,

Thank you for making and maintain the MELT tool.  I'm very appreciated if you could help me with the Transduction. I meet some problems in step2 TransductionFind.

The error message is :

Failed at preprocessing bam file for transductions, please see below for stack trace... Exiting! -------------------JAVA STACK TRACE------------------- java.lang.IllegalArgumentException: Invalid reference index -1 at htsjdk.samtools.QueryInterval.<init>(QueryInterval.java:24) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:533) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.queryContained(SamReader.java:405) at MELT.utilities.SAMTools.<init>(SAMTools.java:78) at MELT.MELTIllumina.transductionFinder.TransductionSearch.<init>(TransductionSearch.java:37) at MELT.MELTIllumina.transductionFinder.TransductionFinder.doWork(TransductionFinder.java:47) at MELT.MELTIllumina.runtimes.Transduction.RunTransduction(Transduction.java:20) at MELT.MELTImplement.main(MELTImplement.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) -------------------END STACK TRACE!-------------------
I use the version 2.1.4 and also try the latest version 2.2.2. The problem is the same:

Performing MELT analysis...
Failed at preprocessing bam file for transductions, please see below for stack trace...
Exiting!


-------------------JAVA STACK TRACE-------------------
java.lang.IllegalArgumentException: Invalid reference index -1
        at htsjdk.samtools.QueryInterval.<init>(QueryInterval.java:24)
        at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:538)
        at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.queryContained(SamReader.java:410)
        at MELT.utilities.MELTSamReader.buildIterator(MELTSamReader.java:65)
        at MELT.MELTIllumina.transductionFinder.TransductionSearch.<init>(TransductionSearch.java:43)
        at MELT.MELTIllumina.transductionFinder.TransductionFinder.doWork(TransductionFinder.java:43)
        at MELT.MELTIllumina.runtimes.Transduction.RunTransduction(Transduction.java:26)
        at MELT.MELTImplement.main(MELTImplement.java:89)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)

MELT version: 2.2.2
-------------------END STACK TRACE!-------------------



At first, I find the process stops when processing chr5_KN196477v1_alt, which is not included in my bam file header, so I delete this contig in my .source file. Then the process goes on. However, there comes another contig that stops the process with the same error message. I check the .trans file finding that there is no output since chr9_GL383541v1_alt 138401 144439 - 6038. This contig is included in the header and there are plenty output of reads by the command below.
samtools view $bam chr9_GL383541v1_alt:138401-144439 | \ awk -v FS="\t" '$7 !="=" {print }'|less 

Can I have some advice  to solve this? 
--------------------
Apart from that, by checking the issue, I look at my first region in source file, which is  chr1 34566055 34572105 - 6050.
The output trans file related to this region includes: 
chr16 3048918 3049069 chr1_34566055 chr1 34565210 34565360
The last two column is out side the region of L1 source in chr1:34566056-34572105. I don't know why MELT search regions outside the source, does it look OK to you? 

I understand you are super busy and thank you in advance for any suggestion. 

Regards,
Jue





A K

unread,
Dec 18, 2025, 4:01:17 PM12/18/25
to MELT Help

Hi Jue, were you ever able to resolve this error? I am encountering the same problem with the TransductionFind step. 
Reply all
Reply to author
Forward
0 new messages