SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
swDMR: a sliding window approach to identify DMR based on bisulfite sequencing xfliwz Epigenetics 4 11-07-2013 07:20 PM
sliding window approach to find differentially methylated regions maria_mari Bioinformatics 1 09-08-2012 06:44 PM
Sliding window/genome coverage from pileup files? jfk Bioinformatics 0 09-06-2012 09:06 AM
need a Genome browser to view Mb in a window shuang Bioinformatics 7 07-22-2011 08:12 AM

Reply
 
Thread Tools
Old 12-07-2012, 01:17 PM   #1
mathew
Member
 
Location: australia

Join Date: Jan 2011
Posts: 81
Default Software for sliding window

I am looking for a tool which can allow me to divide a bacterial genome into different sliding windows and count the average of read count. Am I have to go only with custom script or is there any software out there which can allow me to do that.

Thanks

mathew is offline   Reply With Quote
Old 12-07-2012, 03:59 PM   #2
xied75
Senior Member
 
Location: Oxford

Join Date: Feb 2012
Posts: 129
Default

1, If we developers do make such programs, anyone is willing to pay for it?
2, If not, will any journal publish a program like this?
3, If not, a free coffee? Too far away.

xied75 is offline   Reply With Quote
Old 12-07-2012, 04:11 PM   #3
mathew
Member
 
Location: australia

Join Date: Jan 2011
Posts: 81
Default software for sliding window

I think all scientific fields go hand in hand. I am asking for a pointer if some one came across such tool in any software.

Thanks
mathew is offline   Reply With Quote
Old 12-07-2012, 08:57 PM   #4
krobison
Senior Member
 
Location: Boston area

Join Date: Nov 2007
Posts: 747
Default

Yikes! Quite an unhelpful response there -- for what is really a pretty trivial program.

Once you have all the reads mapped in a BAM file, then this is easy to do with Perl and the Bio:B::Sam library for Perl (or Python and same or so forth). Probably about a page of Perl (or similar language);

Not speedy, but you can also do it with a series of samtools commands:

samtools view myaln.sam seq1:1000-2000 | wc
samtools view myaln.sam seq1:1500-2500 | wc

The first number of each line will be the number of reads found in that window. Generating this series of commands can even be run entirely on the command line.

Yet another approach would be to generate the pileup & parse that; the read ends are marked in the output and so could be used to do this counting (to depth at middle of window, add all the read start markers found within the window but to the right of the middle plus all the read end markers found within the window but to the left of the middle).
krobison is offline   Reply With Quote
Old 12-08-2012, 08:24 PM   #5
mathew
Member
 
Location: australia

Join Date: Jan 2011
Posts: 81
Default Sliding window

krobison

Thanks for your help!!
mathew is offline   Reply With Quote
Old 12-10-2012, 12:31 AM   #6
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

Quote:
Originally Posted by mathew View Post
I am looking for a tool which can allow me to divide a bacterial genome into different sliding windows and count the average of read count. Am I have to go only with custom script or is there any software out there which can allow me to do that.

Thanks

I think bedtools has already all you need:

This snippet will divide your genome file (format: chromosome-name<tab>chr size) in windows of size 1000bp by sliding them by 100bp
Code:
bedtools makewindows -g mygenome.bed -w 1000 -s 100 -i srcwinnum >  mygenome.windows.bed
Now count reads in each window:

Code:
bedtools coverage -abam myreads.bam -b mygenome.windows.bed > mycov.bed
If you want to know the average read count in the windows have a look at "bedtools groupby" or read the output of "bedtools coverage" to R, if you are familiar with it and the file is not too big.

Good luck!

Dario
dariober is offline   Reply With Quote
Old 12-12-2012, 10:16 AM   #7
StevenW
Member
 
Location: UK

Join Date: May 2011
Posts: 13
Default SeqMonk

Perhaps Seqmonk would be of use. SeqMonk is a program to enable the visualisation and analysis of mapped sequence data. The progam allows the user to divide the genome into sliding windows and then quantify each region.

Seqmonk homepage
http://www.bioinformatics.babraham.a...jects/seqmonk/
StevenW 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 04:40 AM.


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