SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics
Similar Threads
Thread Thread Starter Forum Replies Last Post
Bed to BedGraph ayushraman Bioinformatics 4 08-20-2015 07:01 AM
Bedgraph file upload in UCSC browser - error anagari Bioinformatics 6 11-20-2012 08:56 PM
making non-redundant isotig file from newbler output Seqasaurus Bioinformatics 2 09-22-2011 04:44 AM
Creating a BedGraph file for STRAND-SPECIFIC short read data woolfman RNA Sequencing 0 02-23-2011 06:49 AM
wiggle or bedGraph statsteam Bioinformatics 3 10-06-2009 11:49 AM

Reply
 
Thread Tools
Old 07-02-2010, 05:34 AM   #1
gez
Junior Member
 
Location: USA

Join Date: Jun 2010
Posts: 1
Default Making a bedGraph from a Bowtie file

Hi everyone,

I have a few Bowtie alignment files that I would like to view unsmoothed (I usually use Fseq to find peaks and it smoothes things over) to get an idea of read depth. Is there any way to convert a Bowtie output file to a bedGraph?

Thanks!
gez is offline   Reply With Quote
Old 07-02-2010, 05:51 AM   #2
quinlana
Senior Member
 
Location: Charlottesville

Join Date: Sep 2008
Posts: 119
Default

Quote:
Originally Posted by gez View Post
Hi everyone,

I have a few Bowtie alignment files that I would like to view unsmoothed (I usually use Fseq to find peaks and it smoothes things over) to get an idea of read depth. Is there any way to convert a Bowtie output file to a bedGraph?

Thanks!
If you use sam output from Bowtie, you could use the genomeCoverageBed tool from my BEDTools package as follows:

Code:
samtools view -Sb bowtieOut.sam | genomeCoverageBed -ibam stdin -g <genomefile> -bg > out.bedgraph
Note that the <genomefile> is a special file in BEDTools denoting the lengths of each chromosome. The "chromInfo" files from UCSC can be used.

Best,
Aaron
quinlana is offline   Reply With Quote
Old 12-15-2010, 07:35 AM   #3
lbthrice
Junior Member
 
Location: New Hampshire

Join Date: Dec 2010
Posts: 4
Default

Hi,

genomeCoverageBed requires a sorted bowtieOut.sam
the following code worked for me:

Code:
samtools view -Sbo bowtieOut.bam bowtieOut.sam # convert to bam format
samtools sort bowtieOut.bam sortedbowtieOut.bam # sort the bam file
genomeCoverageBed -bg -ibam sortedbowtieOut.bam -g chrominfo.txt > out.bedgraph # compute coverage
see http://groups.google.com/group/bedto...usage-examples

-Lionel
lbthrice is offline   Reply With Quote
Reply

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 08:45 PM.


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