Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chedonat
    Junior Member
    • Jan 2012
    • 2

    #1

    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
  • gringer
    David Eccles (gringer)
    • May 2011
    • 845

    #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

    • jbrwn
      Member
      • Mar 2011
      • 37

      #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

      • swbarnes2
        Senior Member
        • May 2008
        • 910

        #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

        • gringer
          David Eccles (gringer)
          • May 2011
          • 845

          #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

          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM
          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          27 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          20 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          36 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          43 views
          0 reactions
          Last Post SEQadmin2  
          Working...