[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioconductor
Subject:    Re: [BioC] Depth of Coverage and Base counts from BAM file
From:       Julian Gehring <julian.gehring () embl ! de>
Date:       2013-08-29 8:10:04
Message-ID: 521F01DC.3060302 () embl ! de
[Download RAW message or body]

Hi Chandu,

The 'applyPileups' in the 'Rsamtools' packages will help you here:

"An array of dimensions nucleotide x file x position.
The =91nucleotide=92 dimension is length 5, corresponding to =91A=92, =91C=
=92, =91G=92, =

=91T=92, and =91N=92 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@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informat=
ics.conductor
>

_______________________________________________
Bioconductor mailing list
Bioconductor@r-project.org
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatic=
s.conductor
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic