Hello,
While trying to use Picard's SamToFastq tool I get the following exception:
[Wed Dec 19 17:22:28 PST 2012] Executing as tfunnell@compute-0-2.local on Linux 2.6.18-274.3.1.el5_lustre.g9500ebf amd64; Java HotSpot(TM) 64-Bit Server VM 1.6.0_16-b01; Picard version: 1.59(1062)[Wed Dec 19 17:22:28 PST 2012] net.sf.picard.sam.SamToFastq done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=9109504Exception in thread "main" net.sf.picard.PicardException: Illegal mate state: HWUSI-EAS627_19:2:43:5028:7313
at net.sf.picard.sam.SamToFastq.assertPairedMates(SamToFastq.java:299)
at net.sf.picard.sam.SamToFastq.doWork(SamToFastq.java:139)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177)
at net.sf.picard.sam.SamToFastq.main(SamToFastq.java:116)
Any thoughts on how I might be able to remove reads with illegal mate states?
Thanks, Tyler
i think this error means that the input file does not have mate pair.
Thanks, how can I trace back ? we got this BAM file from sequencer. How can I check if your comment is the case and if so, what are the alternatives ? thank you
if you have SAM file try to look at the read HWUSI-EAS627_19:2:43:5028:7313 and try to find its mate read
grep 2:43:5028:7313 input.sam.
I don't know which tool did you use for the alignment. I got similar kind of error when i trimmed reads using cutadapt and did alignment using bwa. I was unable to solve the issue. But, later i changed adapter trimming program to trimglore and i did not get any problem.what was the command executed ?
I got the same error, java -Xmx4G -jar /seq/software/picard/current/bin/SamToFastq.jar INPUT=x.bam FASTQ=x.fq1 SECONDENDFASTQ=x.fq2
Try bedtools bamtofastq.
Also check this link http://seqanswers.com/forums/showthread.php?t=40117
Deeps