vadimzalunin/crammer — Issue #6: cram2bam fails
Author: lpryszcz
Created: 2011-12-29 10:12:31+00:00
State: open

I have created sam alg using bowtie, then converted that to bam. Compression went ok, but I got error during decompression.

cramtools.jar cram --input-bam-file wt_409.paired.bam --reference-fasta-file ../assemblies/ref/yeast_chromosomes.fa --output-cram-file wt_409.paired.cram

cramtools.jar bam --output-bam-file wt_409.paired.2.bam --reference-fasta-file ../assemblies/ref/yeast_chromosomes.fa --input-cram-file wt_409.paired.cram

ERROR Cram2Bam - Offensive SAM record: 1	163	chrI	1	-1	54M	chrI	210	250	CCACACCACACCCACACACCCACACACCACACCACACACCACACCACACCCACA	??????????????????????????????????????????????????????	MQ:i:-1
ERROR Cram2Bam - SAM record al start=1
Exception in thread "main" java.lang.IllegalArgumentException: Negative value (-1) passed to unsigned writing method.
at net.sf.samtools.util.BinaryCodec.writeUByte(BinaryCodec.java:305)
at net.sf.samtools.BAMRecordCodec.encode(BAMRecordCodec.java:113)
at net.sf.samtools.BAMFileWriter.writeAlignment(BAMFileWriter.java:115)
at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:155)
at uk.ac.ebi.ena.sra.cram.Cram2Bam.writeSAMRecord(Cram2Bam.java:346)
at uk.ac.ebi.ena.sra.cram.Cram2Bam.convert(Cram2Bam.java:292)
at uk.ac.ebi.ena.sra.cram.Cram2Bam.main(Cram2Bam.java:91)
at uk.ac.ebi.ena.sra.cram.CramTools.main(CramTools.java:53)