SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
BWA sam and Samtools sam->bam conversion problem maasha Bioinformatics 6 06-05-2013 08:39 AM
SAM to FASTQ converter - Picard sdm Bioinformatics 14 03-19-2013 11:19 AM
NEw to Chip-seq and have .bam/.sam/.bam.bai files... then what? NGS newbie Bioinformatics 11 05-25-2011 08:48 AM
how to get number of records of bam file using picard jay2008 Bioinformatics 0 05-23-2011 04:11 PM
Filter BAM records by positions using picard guavajuice Bioinformatics 0 04-02-2010 03:45 PM

Reply
 
Thread Tools
Old 11-24-2010, 02:36 AM   #1
Kath
Member
 
Location: Oxford

Join Date: Nov 2010
Posts: 24
Default Sam to Bam using Picard - help!

Hi,

I am trying to convert from sam to bam using Picard but am getting an error message (see below). Can anyone interpret this for me?

Thanks!

Kath

[skgtkaf@login01 13655]$ java -jar /home/skgtkaf/ngs/picard-tools-1.35/SamFormatConverter.jar I=13655_q20.sam O=13655_q20.bam
[Wed Nov 24 10:54:33 CET 2010] net.sf.picard.sam.SamFormatConverter INPUT=13655_q20.sam OUTPUT=13655_q20.bam TMP_DIR=/tmp/skgtkaf VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
[Wed Nov 24 10:54:33 CET 2010] net.sf.picard.sam.SamFormatConverter done.
Runtime.totalMemory()=128843776
Exception in thread "main" net.sf.samtools.SAMFormatException: Error parsing text SAM file. CIGAR should have zero elements for unmapped read.; Line 165
Line: GA04_0001:4:1:1082:7316#0 133 chr12 27877005 0 35M43S =27877005 0 AAANNATNTNNTNNAATGANNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCTTANNANNACNNNNNNNNNN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% XC:i:35
at net.sf.samtools.SAMTextReader.reportErrorParsingLine(SAMTextReader.java:220)
at net.sf.samtools.SAMTextReader.access$500(SAMTextReader.java:40)
at net.sf.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:424)
at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:268)
at net.sf.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:240)
at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:604)
at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:582)
at net.sf.picard.sam.SamFormatConverter.doWork(SamFormatConverter.java:65)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:156)
at net.sf.picard.sam.SamFormatConverter.main(SamFormatConverter.java:73)
Kath is offline   Reply With Quote
Old 11-24-2010, 04:48 AM   #2
frozenlyse
Senior Member
 
Location: Australia

Join Date: Sep 2008
Posts: 136
Default

What aligner are you using? From the SAM flag of that read (133) that read is unaligned and so picard wants it to have no defined CIGAR (which makes sense!) Have you tried samtools? May its less strict
frozenlyse is offline   Reply With Quote
Old 11-24-2010, 05:37 AM   #3
furious
Junior Member
 
Location: Netherlands

Join Date: Oct 2009
Posts: 2
Default

I think you should change the VALIDATION_STRINGENCY option, read more about it here: http://seqanswers.com/forums/showthread.php?t=4246
furious is offline   Reply With Quote
Old 11-24-2010, 05:42 AM   #4
Kath
Member
 
Location: Oxford

Join Date: Nov 2010
Posts: 24
Default

Thanks for the suggestions. I used BWA to align the reads. I didn't realise you could use SAMtools to convert from SAM to BAM.
Kath is offline   Reply With Quote
Old 11-24-2010, 09:40 AM   #5
Kath
Member
 
Location: Oxford

Join Date: Nov 2010
Posts: 24
Default

Ok, setting VALIDATION_STRINGENCY=LENIENT allows the .bam file to be produced. Thanks very much for your help!
Kath is offline   Reply With Quote
Old 02-12-2011, 09:48 PM   #6
muzz56
Member
 
Location: Boston

Join Date: Sep 2010
Posts: 14
Default

How did you set the validation=lenient?
muzz56 is offline   Reply With Quote
Old 02-12-2011, 10:36 PM   #7
jstjohn
Member
 
Location: San Francisco, CA

Join Date: Jun 2010
Posts: 35
Default

Quote:
Originally Posted by muzz56 View Post
How did you set the validation=lenient?
just include that string "VALIDATION_STRINGENCY=LENIENT" somewhere in your command.
jstjohn is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:55 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO