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
            Strategies for Sequencing Challenging Samples
            by seqadmin


            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
            03-22-2024, 06:39 AM
          • seqadmin
            Techniques and Challenges in Conservation Genomics
            by seqadmin



            The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

            Avian Conservation
            Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
            03-08-2024, 10:41 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, Yesterday, 06:37 PM
          0 responses
          11 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, Yesterday, 06:07 PM
          0 responses
          10 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 03-22-2024, 10:03 AM
          0 responses
          51 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 03-21-2024, 07:32 AM
          0 responses
          67 views
          0 likes
          Last Post seqadmin  
          Working...
          X