![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem removing duplicate reads? (samtools and picard) | cbl | Bioinformatics | 19 | 09-17-2015 12:01 PM |
About Picard | Jin Pan | Bioinformatics | 8 | 07-15-2014 05:55 AM |
Picard | bair | Bioinformatics | 2 | 07-15-2014 05:45 AM |
Samtools's rmdup vs. Picard's MarkDuplicates | fah | Bioinformatics | 30 | 10-28-2013 01:28 AM |
samtools vs picard index | pallo | Bioinformatics | 1 | 04-11-2011 04:59 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: Europe Join Date: Apr 2010
Posts: 46
|
![]()
Hi,
I'm trying to run SamFormatConverter to convert a BAM to a SAM, and I'm getting an error (see below). The text suggests that samtools is trying to parse my BAM as a SAM. However, the file is definitely a BAM, has a '.bam' extension, and appears to have the necessary "magic number" at the top. Any ideas if I might be doing something wrong? Thanks! Command: java -jar <location>/SamFormatConverter.jar I=in.bam O=out.sam Head in.bam: BAM?@HD VN:1.0 GO:none SO:unsorted @SQ SN:chrM LN:16571 AS:HG18 UR:/seq/references/Homo_sapiens_assembly18/v0/Homo_sapiens_assembly18.fasta M5:d2ed829b8a1628d16cbeee88e88e39eb SP:Homo sapiens Exception: Exception in thread "main" net.sf.samtools.SAMFormatException: Error parsing text SAM file. Not enough fields; Line 1 Line: BAM?@HD VN:1.0 GO:none SO:unsorted at net.sf.samtools.SAMTextReader.reportFatalErrorParsingLine(SAMTextReader.java:169) at net.sf.samtools.SAMTextReader.access$400(SAMTextReader.java:40) at net.sf.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:261) at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:224) at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:196) at net.sf.picard.sam.SamFormatConverter.doWork(SamFormatConverter.java:64) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:150) at net.sf.picard.sam.SamFormatConverter.main(SamFormatConverter.java:72) |
![]() |
![]() |
![]() |
#2 |
Junior Member
Location: SF Join Date: Feb 2011
Posts: 1
|
![]()
Hi,
Did you figure a solution for this problem? I'm getting exactly the same error message. thanks. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Location: bethesda Join Date: Feb 2009
Posts: 700
|
![]()
Try VALIDATION_STRINGENCY=LENIENT in the java invocation.
Example: java-Xmx67T -jar wherever/SamTowhatevernameis.jar \ VALIDATION_STRINGENCY=LENIENT \ INPUT=uncle.sam O=nephew.sam That might shut up the error message and get Picard to accept the input. |
![]() |
![]() |
![]() |
#4 |
Member
Location: San Francisco, CA Join Date: Mar 2012
Posts: 21
|
![]()
In this case the issue is probably the
"BAM?" on the 1st line in front of "@HD VN:1.0 GO:none SO:unsorted" I would try deleting it. |
![]() |
![]() |
![]() |
Tags |
samtools picard |
Thread Tools | |
|
|