Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Convert from bowtie to sam

    Hi,

    I used samtools- bowtie2sam.pl to convert a bowtie file to a sam file. Later, I noticed that some of the alignments were missing in the sam file. Is this expected? Is there another bowtie to sam converter that does not reduce the data? Is it best to choose the sam option from bowtie?

    Much Thanks,
    Tirza Doniger
    Bioinformatics Unit
    Bar Ilan University
    --
    Tirza Doniger, Ph.D.
    Bioinformatics Unit
    The Mina and Everard Faculty of Life Sciences
    Bar Ilan University

  • #2
    Yep, I would choose the SAM option from Bowtie. It has worked consistently well for me

    Comment


    • #3
      from the bowtie tutorial ( http://bowtie-bio.sourceforge.net/tutorial.shtml )

      Finding variations with SAMtools

      SAMtools is a suite of tools for storing, manipulating, and analyzing alignments such as those output by Bowtie. SAMtools understands alignments in either of two complementary formats: the human-readable SAM format, or the binary BAM format. Because Bowtie can output SAM (using the -S/--sam option), and SAM can can be converted to BAM using SAMtools, Bowtie users can make full use of the analyses implemented in SAMtools, or in any other tools supporting SAM or BAM.
      We will use SAMtools to find SNPs in a set of simulated reads included with Bowtie. The reads cover the first 10,000 bases of the pre-built E. coli genome and contain 10 SNPs throughout. First, we run bowtie to align the reads, being sure to specify the -S option. We also specify an output file that we will use as input for the next step (though pipes can be used to accomplish the same thing without the intermediate file):

      bowtie -S e_coli reads/e_coli_10000snp.fq ec_snp.sam

      Next, we convert the SAM file to BAM in preparation for sorting. We assume that SAMtools is installed and that the samtools binary is accessible in the PATH.

      samtools view -bS -o ec_snp.bam ec_snp.sam

      Next, we sort the BAM file, in preparation for SNP calling:

      samtools sort ec_snp.bam ec_snp.sorted

      Comment


      • #4
        Thank you.

        What concerns me is that some of the alignments returned in the original bowtie file disappeared when I ran bowtie2sam.pl

        If I understand correctly now---the script bowtie2sam.pl which comes as part of the samtools package only takes the best hit for each read. However, I had run bowtie with the parameter to report all possible alignments.

        I wanted to know if running bowtie with the "SAM" option will exhibit the same behavior as the script bowtie2sam.pl

        Thanks
        Tirza
        --
        Tirza Doniger, Ph.D.
        Bioinformatics Unit
        The Mina and Everard Faculty of Life Sciences
        Bar Ilan University

        Comment


        • #5
          allbowtie2sam.pl

          I came across this thread with the same issue. As you said bowtie2sam.pl only takes the best read. That is much harder to do than just converting all the hits. I edited the file to print all the reads in a bowtie file to .sam. Although as was said before it's a much better idea to just use the sam output option as that gives you a header that is missing with this conversion. However sometimes you just need to convert something that was already done.
          Attached Files

          Comment


          • #6
            I have a related question. How can I make bowtie to output both sam and bowtie format without running it twice with two different output options? Some downstream programs need bowtie format, but some need sam/bam.

            Thanks in advance for any reply!

            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, Yesterday, 08:47 AM
            0 responses
            14 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-11-2024, 12:08 PM
            0 responses
            60 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            60 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            54 views
            0 likes
            Last Post seqadmin  
            Working...
            X