Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • manore
    Member
    • Jun 2011
    • 19

    error with sam output ->Parse error at line xxxxx: missing colon in auxiliary data

    Hello,

    I would like to import SAM to BAM.

    I mapp my data using smalt and I obtain SAM output (fichier.sam)

    My SAM file doesn't contain the header so I do this but I get a message error.

    Someone can help me?

    samtools faidx file.fasta

    #This generates a BAM-compatible
    #filel.fasta.fai

    #Next, generate the actual .bam file (-t can be skipped if excluding reference data):
    samtools view -bt file.fasta.fai fichier.sam -o fichier.bam
    [sam_header_read2] 13 sequences loaded.
    Parse error at line xxxxx: missing colon in auxiliary data
    Aborted
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    Is that really an xxxxx in the error message, or an actual line number? If it is an line number, can you show us that line from the SAM file?

    Comment

    • manore
      Member
      • Jun 2011
      • 19

      #3
      Hi,

      This is the line number :

      [sam_header_read2] 13 sequences loaded.
      Parse error at line 2171068307: missing colon in auxiliary data
      Aborted

      sed -n 2171068307p file
      HISEQxxxxx#NGACCA 4 * 0 0 * * 0 0 * * AS
      Last edited by manore; 10-20-2011, 04:24 AM.

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        Great. Using the [ code ] tags (via the # icon in the forum's advanced editor), that's:
        Code:
        HISEQxxxxx#NGACCA	4	*	0	0	*	*	0	0	*	*	AS
        Column 12 is just "AS", which is not a valid SAM/BAM tag. The AS tag is normally the alignment score, and should be something like AS:i:123 instead (i for integer).

        Is this the last line of the file by any chance? If so it probably got truncated.

        Comment

        • manore
          Member
          • Jun 2011
          • 19

          #5
          Hi maubp,

          Thanks so much.
          2171068307 correspond to the last line of my file.

          After running smalt, I obtain this message : Segmentation fault. Perhaps smalt stop due to a lack of space on my disk
          I will run smalt

          Comment

          • roll
            Member
            • Aug 2009
            • 38

            #6
            Parse error at line 55: missing colon in auxiliary data

            Hi,
            i am having the same problem.
            it says:

            [samopen] SAM header is present: 25 sequences.[sam_read1] reference 'chr1' is recognized as '*'.
            Parse error at line 55: missing colon in auxiliary data
            Abort

            I checked line 55 and it is the first line and shows as

            HS8_7032:1:1101:1008:128714 163 chr1 1 2 8S18M1D37M12S = 57 131 CCCTAACCTAACCCTAACCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCAA =CEFFGIJLHKJHJLKPJKKKLLKJJLDIMILJJLNGJLHLHKLJLKKJKKEK@ILEKM?KDHAKHBJGIHFDCC XA:Z:21,-46944230,49M1D26M,3;1,+154,6M1D69M,3;4,+87,6M1D69M,3;15,-100338770,67M1D8M,3; MD:Z:18^T37 RG:Z:22359 XG:i:1 AM:i:2 NM:i:1 SM:i:2 XM:i:0 XO:i:1 XT:A:M

            Any suggestions how to fix this?

            Thanks,

            Comment

            • siriuswss
              Junior Member
              • Jun 2012
              • 2

              #7
              Same problem

              I have the same problem in converting from SAM to BAM format.

              > samtools view -bS WT.sam > WT.bam
              [samopen] SAM header is present: 17 sequences.
              Parse error at line 20: missing colon in auxiliary data
              Abort

              Line 20 is the first line after the header in SAM.

              @PG ID:Bowtie VN:0.12.5 CL:"bowtie -p 5 -3 40 --solexa1.3-quals -X 50000000 --un s_3_unaligned.txt -S S_cervisae_with_mt -1 ../s_3_1_sequence.txt -2 ../s_3_2_sequence.txt"
              HWUSI-EAS95L_0004:3:1:1122:1087#0 77 * 0 0 * * 0 0 AGAACTATTCATAGAGTGAATCGAAAACAATACGAA #################################### XM:i:0

              Anybody can help?

              Thanks.

              Comment

              • noms
                Junior Member
                • Apr 2012
                • 7

                #8
                I actually just had this exact same problem and found out that there was an extra '\t' at the end of each line of my record.

                Hope this helps

                Comment

                • visserm
                  Junior Member
                  • Jun 2011
                  • 7

                  #9
                  Hi there,

                  I also have a problem converting SAM to BAM with samtools. I used the command...

                  samtools view -bS file.sam > file.bam

                  and got the following error...

                  [samopen] SAM header is present: 17 sequences.
                  [sam_read1] reference '4' is recognized as '*'.
                  Parse error at line 27: unmatched CIGAR operation
                  Abort trap: 6


                  On inspection of lane 27 I saw that the entry for the read had information missing, shifting the layout of the SAM file for that particular read...


                  @HD VN:1.0 SO:unsorted
                  @SQ SN:chr10 LN:38388735
                  @SQ SN:chr11 LN:40097135
                  @SQ SN:chr12 LN:36276390
                  @SQ SN:chr13 LN:39686181
                  @SQ SN:chr14 LN:34156359
                  @SQ SN:chr15 LN:55775544
                  @SQ SN:chr16 LN:23462993
                  @SQ SN:chr17 LN:27122625
                  @SQ SN:chr1 LN:36084770
                  @SQ SN:chr2 LN:40172906
                  @SQ SN:chr3 LN:39907702
                  @SQ SN:chr4 LN:25412026
                  @SQ SN:chr5 LN:37603955
                  @SQ SN:chr6 LN:30670535
                  @SQ SN:chr7 LN:31181134
                  @SQ SN:chr8 LN:35800839
                  @SQ SN:chr9 LN:37514189
                  @PG ID:Bowtie VN:0.12.7 CL:"bowtie -v 2 -k 10 --best -S afkr -f file.fasta file.sam"
                  1 16 chr7 24191077 255 21M * 0 0 GGATTTGATTAACGACTTCAG IIIIIIIIIIIIIIIIIIIII XA:i:0 MD:Z:21 NM:i:0
                  2 0 chr14 11593810 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:5T0C12 NM:i:2
                  2 0 chr11 37618952 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:5A4A8 NM:i:2
                  2 16 chr4 25302083 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:0A0T17 NM:i:2
                  2 0 chr15 21400937 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:0T11C6 NM:i:2
                  2 16 chr4 23221732 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:7T10A0 NM:i:2
                  2 16 chr2 16031667 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:8T3G6 NM:i:2
                  3 19 4 * 0 0 * * 0 0 GTGCCGGCCGGGGGAAGGACCGG IIIIIIIIIIIIIIIIIIIIIII XM:i:0


                  The SAM file was created with Bowtie...
                  bowtie -v 2 -k 10 --best -S <ebwt> -f file.fasta file.sam

                  This was the case for quite a few reads. I assume that this shift in entry is caused be the read not having a valid alignment, or am I confused. If it is the case how can I tell Bowtie not to included such reads in the SAM file in order for me to be able to generate the BAM file?

                  Hope some-body can help me
                  Marike

                  Comment

                  • anaqib2
                    Junior Member
                    • Nov 2013
                    • 3

                    #10
                    SIMILAR ISSUE
                    Hi

                    I am trying to convert .sam file to a .bam file using the following script:-

                    samtools view -bT Ref_HighCov_B07.fa Reads.sam > Reads.bam

                    And the error I get is this....

                    [sam_header_read2] 116 sequences loaded.
                    [sam_read1] reference '' is recognized as '*'.
                    Parse error at line 1: missing colon in auxiliary data


                    Kindly help

                    Regards
                    Ankur

                    Comment

                    • maubp
                      Peter (Biopython etc)
                      • Jul 2009
                      • 1544

                      #11
                      Hi Anjur - it sounds like your SAM file is broken, could you show us what is the first read in your SAM file? If you copy and paste using the [ code ] example [ /code ] tags, it should display here nicely (there is a code button on the advanced view of the forum editor)
                      Last edited by maubp; 11-25-2013, 02:30 PM. Reason: typo

                      Comment

                      • anaqib2
                        Junior Member
                        • Nov 2013
                        • 3

                        #12
                        Hi

                        Hi maubp

                        i found the issue. The problem is that I was trying to create a .sam file directly (or without using samse/pe). The correct way is to create a .sai file and then convert using samtools samse. Am I right? Please feel free to put up any more suggestion.

                        Thanks.

                        Ankur

                        Comment

                        Latest Articles

                        Collapse

                        • GATTACAT
                          Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                          by GATTACAT
                          Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                          Yesterday, 11:43 AM
                        • 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

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, Today, 11:08 AM
                        0 responses
                        6 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 06-30-2026, 05:37 AM
                        0 responses
                        11 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 06-26-2026, 11:10 AM
                        0 responses
                        18 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 06-17-2026, 06:09 AM
                        0 responses
                        52 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...