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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          17 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          22 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          16 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          46 views
          0 likes
          Last Post seqadmin  
          Working...
          X