Depth of Coverage and Base counts from BAM file
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.1 years ago
Hi ALL, Given BAM file, I like to get output something like below. Any ideas? Chr Position DepthOfCoverage BaseCounts chr1 14112 14 A:0 C:0 G:0 T:14 N:0 chr1 14113 13 A:0 C:13 G:0 T:0 N:0 chr1 14114 11 A:0 C:0 G:0 T:11 N:0 chr1 14115 11 A:10 C:0 G:0 T:1 N:0 Many thanks in advance. Best Regards Chandu -- output of sessionInfo(): R version 3.0.0 (2013-04-03) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base -- Sent via the guest posting facility at bioconductor.org.
• 1.4k views
ADD COMMENT
0
Entering edit mode
Julian Gehring ★ 1.3k
@julian-gehring-5818
Last seen 5.4 years ago
Hi Chandu, The 'applyPileups' in the 'Rsamtools' packages will help you here: "An array of dimensions nucleotide x file x position. The ?nucleotide? dimension is length 5, corresponding to ?A?, ?C?, ?G?, ?T?, and ?N? respectively." (Taken from the 'Rsamtools' manual) The coverage you can then get with a function like 'rowSums'. Best wishes Julian On 08/29/2013 09:58 AM, Chandu [guest] wrote: > > Hi ALL, > > Given BAM file, I like to get output something like below. Any ideas? > > > Chr Position DepthOfCoverage BaseCounts > chr1 14112 14 A:0 C:0 G:0 T:14 N:0 > chr1 14113 13 A:0 C:13 G:0 T:0 N:0 > chr1 14114 11 A:0 C:0 G:0 T:11 N:0 > chr1 14115 11 A:10 C:0 G:0 T:1 N:0 > > Many thanks in advance. > > Best Regards > Chandu > > -- output of sessionInfo(): > > R version 3.0.0 (2013-04-03) > Platform: x86_64-apple-darwin10.8.0 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

Traffic: 993 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6