[Bioc-sig-seq] Local Context

Patrick Aboyoun paboyoun at fhcrc.org
Tue Jun 22 23:04:35 CEST 2010


Jim,
Have you tried letterFrequencyInSlidingView in Biostrings?

 > library(Biostrings)

 > data(phiX174Phage)
 > dna <- phiX174Phage[[1]]
 > class(dna)
[1] "DNAString"
attr(,"package")
[1] "Biostrings"

 > args(letterFrequencyInSlidingView)
function (x, view.width, letters, OR = "|")
NULL
 > head(letterFrequencyInSlidingView(dna, 2, DNA_BASES))
      A C G T
[1,] 1 0 1 0
[2,] 1 0 1 0
[3,] 0 0 1 1
[4,] 0 0 0 2
[5,] 0 0 0 2
[6,] 0 0 0 2

 > sessionInfo()
R version 2.11.1 Patched (2010-05-31 r52167)
i386-apple-darwin9.8.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Biostrings_2.16.5 IRanges_1.6.8

loaded via a namespace (and not attached):
[1] Biobase_2.8.0 tools_2.11.1



Patrick


On 6/21/10 4:56 PM, James Bullard wrote:
> Hi,
>
> This must be readily doable and I am just missing the obvious -- I am
> trying, for a long sequence, to classify each position as coming from a
> particular context. Something like running nucleotide table. The things
> that I have thought about doing are:
>
> .) Making Views representing my sliding windows, but then I don't see an
> obvious thing except nucleotide frequency, but that doesn't really solve
> the problem.
>
> .) Using nucleotideFrequencyAt, however, I am not sure that this function
> does what I want. Since it takes an XStringSet type object rather than a
> DNAString type object.
>
> thanks, jim
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>



More information about the Bioc-sig-sequencing mailing list