Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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


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


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


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


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


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


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


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


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


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


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

                        • seqadmin
                          Strategies for Sequencing Challenging Samples
                          by seqadmin


                          Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                          03-22-2024, 06:39 AM
                        • seqadmin
                          Techniques and Challenges in Conservation Genomics
                          by seqadmin



                          The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                          Avian Conservation
                          Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                          03-08-2024, 10:41 AM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by seqadmin, 03-27-2024, 06:37 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 03-27-2024, 06:07 PM
                        0 responses
                        11 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 03-22-2024, 10:03 AM
                        0 responses
                        53 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 03-21-2024, 07:32 AM
                        0 responses
                        69 views
                        0 likes
                        Last Post seqadmin  
                        Working...
                        X