SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bowtie Illumina paired end reads alignment empyrean Bioinformatics 3 09-20-2011 10:51 AM
Tophat paired end alignment. adeslat SOLiD 5 08-07-2011 04:05 AM
Bowtie output from paired end reads godzilla07 Bioinformatics 0 01-06-2011 12:36 PM
Bowtie output format kevlim83 Bioinformatics 5 01-26-2010 02:28 PM
how paired end alignment works? totalnew Bioinformatics 8 04-27-2009 01:46 PM

Reply
 
Thread Tools
Old 01-31-2012, 07:18 AM   #1
chedonat
Junior Member
 
Location: United Kingdom

Join Date: Jan 2012
Posts: 2
Question 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
chedonat is offline   Reply With Quote
Old 01-31-2012, 08:08 AM   #2
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 838
Default

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]
gringer is offline   Reply With Quote
Old 02-01-2012, 09:45 AM   #3
jbrwn
Member
 
Location: Denver, CO

Join Date: Mar 2011
Posts: 37
Default

Quote:
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 -
jbrwn is offline   Reply With Quote
Old 02-01-2012, 10:51 AM   #4
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

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.
swbarnes2 is offline   Reply With Quote
Old 02-01-2012, 02:03 PM   #5
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 838
Default

Quote:
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.
gringer is offline   Reply With Quote
Reply

Tags
bowtie, bowtie 2, output, paired end, samtools

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:12 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO