Unconfigured Ad

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

    #1

    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

                        • SEQadmin2
                          Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                          by SEQadmin2



                          CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                          Despite this, “CRISPR helped turn genome editing from a specialized technique into
                          ...
                          07-31-2026, 11:01 AM
                        • SEQadmin2
                          Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                          by SEQadmin2


                          Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                          The systematic characterization of the human proteome has
                          ...
                          07-20-2026, 11:48 AM
                        • SEQadmin2
                          Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                          by SEQadmin2



                          Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                          ...
                          07-09-2026, 11:10 AM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, 07-31-2026, 02:55 AM
                        0 responses
                        17 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-24-2026, 12:17 PM
                        0 responses
                        15 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-23-2026, 11:41 AM
                        0 responses
                        13 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 07-20-2026, 11:10 AM
                        0 responses
                        24 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...