Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Kath
    Member
    • Nov 2010
    • 24

    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)
  • frozenlyse
    Senior Member
    • Sep 2008
    • 135

    #2
    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

    Comment

    • furious
      Junior Member
      • Oct 2009
      • 2

      #3
      I think you should change the VALIDATION_STRINGENCY option, read more about it here: http://seqanswers.com/forums/showthread.php?t=4246

      Comment

      • Kath
        Member
        • Nov 2010
        • 24

        #4
        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.

        Comment

        • Kath
          Member
          • Nov 2010
          • 24

          #5
          Ok, setting VALIDATION_STRINGENCY=LENIENT allows the .bam file to be produced. Thanks very much for your help!

          Comment

          • muzz56
            Member
            • Sep 2010
            • 14

            #6
            How did you set the validation=lenient?

            Comment

            • jstjohn
              Member
              • Jun 2010
              • 35

              #7
              Originally posted by muzz56 View Post
              How did you set the validation=lenient?
              just include that string "VALIDATION_STRINGENCY=LENIENT" somewhere in your command.

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                by SEQadmin2


                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


                Here are nine questions we think about, in roughly the order they matter, before...
                06-18-2026, 07:11 AM
              • SEQadmin2
                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                by SEQadmin2


                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                ...
                06-02-2026, 10:05 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 06-17-2026, 06:09 AM
              0 responses
              33 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-09-2026, 11:58 AM
              0 responses
              97 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-05-2026, 10:09 AM
              0 responses
              117 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 06-04-2026, 08:59 AM
              0 responses
              110 views
              0 reactions
              Last Post SEQadmin2  
              Working...