Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAM-to-BAM Error

    Hello everyone,
    I have this problem when using Picard to convert my SAM files to BAM files (I used BWA-MEM for mapping my reads)
    Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing tex t SAM file. Empty field at position 9 (zero-based); File BC002.sam; Line 31944
    Line: 04JBV:00098:00810 4 * 0 0 * * 0 0 * AS:i:0 XS:i:0

    Anyone can help me to solve this problems? Many thanks.

  • #2
    The error message is actually wrong in this case, which would appear to be a bug. The problem is that there are only 10 non-auxiliary fields in that line, so the QUAL field is completely missing. A valid version of that line should be:
    Code:
    04JBV:00098:00810       4       *       0       0       *       *       0       0       *       *       AS:i:0  XS:i:0

    Comment


    • #3
      Originally posted by dpryan View Post
      The error message is actually wrong in this case, which would appear to be a bug. The problem is that there are only 10 non-auxiliary fields in that line, so the QUAL field is completely missing. A valid version of that line should be:
      Code:
      04JBV:00098:00810       4       *       0       0       *       *       0       0       *       *       AS:i:0  XS:i:0
      Thanks for your answer. Do you know what I can do to fix this bug?

      Comment


      • #4
        The simplest solution would be to just ignore that line:
        Code:
         awk '{if(NR != 31944) print $0}' foo.sam | samtools view -Sbo foo.bam -
        You could substitute picard for samtools, in which case you'd need to use "I=/dev/stdin" in place of "-".

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Recent Innovations in Spatial Biology
          by seqadmin


          Spatial biology is an exciting field that encompasses a wide range of techniques and technologies aimed at mapping the organization and interactions of various biomolecules in their native environments. As this area of research progresses, new tools and methodologies are being introduced, accompanied by efforts to establish benchmarking standards and drive technological innovation.

          3D Genomics
          While spatial biology often involves studying proteins and RNAs in their...
          Yesterday, 07:30 PM
        • seqadmin
          Advancing Precision Medicine for Rare Diseases in Children
          by seqadmin




          Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
          12-16-2024, 07:57 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 12-30-2024, 01:35 PM
        0 responses
        21 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 12-17-2024, 10:28 AM
        0 responses
        41 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 12-13-2024, 08:24 AM
        0 responses
        55 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 12-12-2024, 07:41 AM
        0 responses
        40 views
        0 likes
        Last Post seqadmin  
        Working...
        X