SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate total number of unique positions in target regions rama Bioinformatics 7 01-12-2017 03:58 PM
SNP positions along a read uknief Bioinformatics 0 03-22-2012 01:26 PM
Bowtie poroblem when mapping against short sequences, no positions. Boel Bioinformatics 1 01-14-2011 08:54 AM
Question on counting number of reads per gene gen2prot Bioinformatics 3 06-25-2010 10:45 AM

Reply
 
Thread Tools
Old 06-20-2013, 01:40 AM   #1
d_t_nguyen
Member
 
Location: Hanoi, Vietnam

Join Date: Jun 2013
Posts: 13
Default Counting number of short-read cover positions

Hi everyone,
I used this command to count the number of short-read cover a position:
Code:
samtools view data.bam 20:1000-1000 -c
If I run this command several time, it would be very slow.
Is there any way to count the number of short-read cover millions of positions.
Thank you in advance!
d_t_nguyen is offline   Reply With Quote
Old 06-20-2013, 07:52 AM   #2
Rocketknight
Member
 
Location: Ireland

Join Date: Sep 2011
Posts: 86
Default

GATK's DepthOfCoverage can do this. Use the -L argument to specify which positions you want coverage information for. http://www.broadinstitute.org/gatk/g...fCoverage.html
Rocketknight is offline   Reply With Quote
Old 06-20-2013, 01:02 PM   #3
asiangg
Member
 
Location: New York

Join Date: Dec 2008
Posts: 44
Default

Hi, if you purpose is to get the coverage and visualize them, an easy to use and powerful tool is ngs.plot. It can accept a BED file or use its pre-compiled database and calculate the coverage for any bam file. It then visualize them either as an averaged profile plot or a heatmap.
asiangg is offline   Reply With Quote
Old 06-20-2013, 03:17 PM   #4
shi
Wei Shi
 
Location: Australia

Join Date: Feb 2010
Posts: 235
Default

Hi d_t_nguyen,

You may try the featureCounts program included in the Subread package (http://subread.sourceforge.net/).

Here is the steps to use featureCounts to count your reads. Firstly, create a tab-delimited annotation file like this:

GeneID Chr Start End Strand
1 chr20 1000 1000 +
2 chr20 2000 2000 +


Then, issue the following command to count reads:

featureCounts -F SAF -f -O -a your_annotation.txt -i your_sam_file.sam -o results.txt

The counting results will be saved into file 'results.txt'.

Alternatively, you may provide a GTF format annotation for summarization. You may also use -T argument to run on multiple threads. Type 'featureCounts' for more information, or have a look at the userguide (http://bioinf.wehi.edu.au/subread-pa...UsersGuide.pdf)

Best wishes,

Wei
shi is offline   Reply With Quote
Old 06-24-2013, 12:55 AM   #5
d_t_nguyen
Member
 
Location: Hanoi, Vietnam

Join Date: Jun 2013
Posts: 13
Default

Thank you all. I've just realized that pileup format of SAMTools have all I need. I used this command and I had all I want:
samtools mpileup individual.bam > read.txt
d_t_nguyen 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 05:36 PM.


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