Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

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


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


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


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

          Comment


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


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

              • seqadmin
                Essential Discoveries and Tools in Epitranscriptomics
                by seqadmin




                The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                04-22-2024, 07:01 AM
              • seqadmin
                Current Approaches to Protein Sequencing
                by seqadmin


                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                04-04-2024, 04:25 PM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Today, 11:49 AM
              0 responses
              10 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, Yesterday, 08:47 AM
              0 responses
              16 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-11-2024, 12:08 PM
              0 responses
              61 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-10-2024, 10:19 PM
              0 responses
              60 views
              0 likes
              Last Post seqadmin  
              Working...
              X