Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • The best output format for paired-end alignment using bowtie

    Hi all,
    I successfully used bowtie to perform some single end alignments.
    Now, I would like to perform some paired-end alignments using bowtie 2, and I am just wondering if I am oblige to use the SAM output format option.
    How will be the output if I don't specified this option?
    The manual only clearly mention the SAM output format.
    What is the best of the two possibilities.
    Many thanks

  • #2
    I think bowtie2 only outputs in SAM format. If you would prefer a sorted BAM (because of smaller file size and better searching), you can pipe through samtools:
    Code:
    bowtie2 -t -p 30 bowtie2_database -U reads_SE.fastq \
    | awk '{if($12 != "XM:i:0"){print $0}}' | samtools view -S -b - | samtools sort -m 10000000000 - reads_SE_vs_database_bowtie2_default
    [I also exclude unmapped reads from the BAM output with AWK because I'm not interested in them]

    Comment


    • #3
      Originally posted by gringer View Post
      I think bowtie2 only outputs in SAM format. If you would prefer a sorted BAM (because of smaller file size and better searching), you can pipe through samtools:
      Code:
      bowtie2 -t -p 30 bowtie2_database -U reads_SE.fastq \
      | awk '{if($12 != "XM:i:0"){print $0}}' | samtools view -S -b - | samtools sort -m 10000000000 - reads_SE_vs_database_bowtie2_default
      [I also exclude unmapped reads from the BAM output with AWK because I'm not interested in them]
      can't you skip the awk pipe by adjusting your samtools view with:
      samtools view -SbF 4 -

      Comment


      • #4
        I think by default, bowtie won't return unampped reads anyway. But I think using samtools to filter is way easier than piping through awk. It's also a little faster if you add the -u to the samtools view command. It will make an uncompressed .bam. But since you are going to sort anyway, that'll get you to the sorted file a little faster, and once you have the sorted file, you won't need the unsorted one. sort will complain that the .bam doesn't look like it has the right EOF character, but it still works.

        Comment


        • #5
          Originally posted by jbrwn View Post
          can't you skip the awk pipe by adjusting your samtools view with:
          samtools view -SbF 4 -
          I guess so, I hadn't noticed those filter options of samtools view. Thanks.

          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, 08:47 AM
          0 responses
          10 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
          57 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          53 views
          0 likes
          Last Post seqadmin  
          Working...
          X