Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m_elena_bioinfo
    Member
    • Oct 2009
    • 99

    #1

    sam2bam problem

    Dear users,
    I have run bwa on microRNA reads from ABI solid and I generated a file aln.sam.
    But when I try to import this file in samtools, the program returns me different errors.
    I can't convert SAM to BAM.
    I'm using samtools-0.1.7

    if I run:
    >samtools import reference.fasta.fai aln.sam prova.bam
    the error is
    [sam_header_read2] 735 sequences loaded.
    Parse error at line 1: invalid CIGAR character
    Aborted

    If I run:
    >samtools import reference.fasta aln.sam prova.bam
    the error
    [sam_header_read2] 1102 sequences loaded.
    Segmentation fault

    With:
    >samtools view aln.sam prova.bam
    [bam_header_read] EOF marker is absent.
    [main_samview] fail to read the header.

    >samtools view -S aln.sam -o prova.bam
    [samopen] no @SQ lines in the header.
    [sam_read1] missing header? Abort!

    >samtools view -S aln.sam prova.bam
    [samopen] no @SQ lines in the header.
    [main_samview] random alignment retrieval only works for indexed BAM files.

    I can only think that the problem is the header of sam file.
    But what can I do?

    Thanx!
  • dawe
    Senior Member
    • Apr 2009
    • 258

    #2
    I usually convert sam files like this:

    samtools view -bt reference.fa filein.sam | samtools sort - fileout

    of course the sort process is optional. Note that fileout has no extension as it is automagically appended by samtools. reference.fa has a separate reference.fa.fai file.

    d

    Comment

    • m_elena_bioinfo
      Member
      • Oct 2009
      • 99

      #3
      Hi dawe, thank you very much.
      But the program doesn't run and the error this time is:

      [sam_header_read2] 735 sequences loaded.
      [sam_read1] reference 'hsa-mir-182' is recognized as '*'.
      Parse error at line 1: invalid CIGAR character
      Segmentation fault

      Comment

      • dawe
        Senior Member
        • Apr 2009
        • 258

        #4
        I had similar issues when the sam file was not properly generated and the name of the matched chromosome was not in the reference file... which bwa and samtools version are you using?

        Comment

        • m_elena_bioinfo
          Member
          • Oct 2009
          • 99

          #5
          I'm usign bwa-0.5.4 and samtools-0.1.7!

          Comment

          • ramouz87
            Member
            • Oct 2009
            • 35

            #6
            sam2bam issue with maq

            Hi,
            I'm also having a problem converting sam2bam from a maq map file
            seems that maq2sam-long did not add @ headers so sam file are generated :
            HWI-EA332_8_80_1554_696#CAGTNN 89 GL000207.1 136 13 75M * 0 0 AGAGTAGTCAATAGGATAGATGAACGTACGTTGTATAAAAATTGTATTATCTAAAACTTCACAGAGAAAATAGGA %%%%%%%%%%%%%%%%%%%%%%%%%%%%88*=AA;>A12(>*>CCA+ACA?A?
            BCAAABCCCCCCCCCCB>BCA4 MF:i:64 AM:i:0 SM:i:13 NM:i:15 UQ:i:87 H0:i:2 H1:i:0
            HWI-EA332_8_80_1554_696#CAGTNN 149 GL000207.1 161 0 * * 0 0 GCGCTGCAGAAGTGGACGGAATCCAGATAAGTATTCTGCTAGGACAGGGG %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MF:i:192
            HWI-EA332_8_26_749_1572#CCCCNN 81 GL000207.1 795 75 75M * 0 3125 GGCATGGTTGCTGTGGCTATGAAGGGACTCATTTGAAGGGGCCATGGAAGAGCTGGCAGTATTATGATAGCAGAT ;156<3<7)/(9A@@32A7;@::A@67?><@?9@B??BBB>::<1@BA@BAB;
            6@B=@BBBBB@9A@BBCABCBB MF:i:4 AM:i:69 SM:i:75 NM:i:0 UQ:i:0 H0:i:1 H1:i:0
            HWI-EA332_8_73_1194_791#CCCCNN 81 GL000207.1 795 78 75M * 0 3125 GGCATGGTTGCTGTGGCTATGAAGGGACTCATTTGAAGGGGCCATGGAAGAGCTGGCAGTATTATGATAGCAGAT 7=665<;@A@=AB>@A?B@BA=8B@B6@B:8B@AB;?BBBA87.4@B2<C=B9
            ABB==B>@>6=BB=>>A>=B=B MF:i:4 AM:i:63 SM:i:78 NM:i:0 UQ:i:0 H0:i:1 H1:i:0
            HWI-EA332_8_96_43_1791#CCCCNN 81 GL000207.1 795 66 75M * 0 3125 GGCATGGTTGCTGTGGCTATGAAGGGACTCATTTGAAGGGGCCATGGAAGAGCTGGCAGTATTATGATAGCAGAT %%%%%%%=76.<=97@614;<=?8<?85958960<6;@@@@836?A<<=A=B=
            @BA==B>A9@@:@@A?B@@BBA MF:i:4 AM:i:47 SM:i:66 NM:i:0 UQ:i:0 H0:i:1 H1:i:0

            but when using:
            samtools view -Sxhut ~/genomes/Homo_sapiens.GRCh37.56.dna.toplevel.fa -o maq.bam maq.sam
            get a segmentation fault :
            [sam_header_read2] 23923109 sequences loaded.
            Segmentation fault

            I'm using samtools 1.7 and maq 0.7.1
            Anyone faced such case ?


            Thanks
            Ramzi
            Last edited by ramouz87; 11-13-2009, 05:20 AM. Reason: ver
            Research Scientist - Bioinformatics
            Sidra Medical and Research Center

            Comment

            • m_elena_bioinfo
              Member
              • Oct 2009
              • 99

              #7
              BWA parameter for microRNA

              Hi NGS users,
              could anyone suggest me the best parameters for BWA for alignign reads (35bp SOLiD single-read) for microRNA samples?
              I want to align the reads vs the human genome but i have some problem.

              For the ALN step, which parameters I have to use?
              Thanx a lot,
              have a good weekend,
              ME

              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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 08-06-2026, 07:41 AM
              0 responses
              21 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 08-03-2026, 10:13 AM
              0 responses
              33 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-31-2026, 02:55 AM
              0 responses
              43 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              26 views
              0 reactions
              Last Post SEQadmin2  
              Working...