Wow, I was just wanting something like this the other day. I just needed the
A,C,G,T counts summed up over the positions and managed to hack something
fairly performant using matchPattern and tabulate. This will be a nice
feature to have.

Thanks,
Michael

On Thu, Feb 10, 2011 at 11:22 PM, Steve Lianoglou <
mailinglist.honeypot@gmail.com> wrote:

> Hi,
>
> I recently needed to have letterFrequencyInSlidingView work on
> multiple strings at once.
>
> I initially iterated over my XStringSet in R and passed each element
> to the letterFrequencyInSlidingView method, but this was really slow
> over large XStringSet objects.
>
> I bit the bullet and wrote the loop in C as the
> "XStringSet_letterFrequencyInSlidingView" you'll see defined in this
> diff.
>
> That function basically calls a slightly modified
> XString_letterFrequencyInSlidingView, which is also added as
> _XString_letterFrequencyInSlidingView.
>
> Slight changes to the documentation, etc. is also included in this
> patch, which is against svn revision 52588, in order to make it "well
> rounded."
>
> If the "powers that be" deem this a worthy addition, could you please
> apply this, or some cleaned version of it? This was my first real
> foray into modifying any C code in these large/well-established
> libraries, so ... I did a bit of hunting and pecking, and you'll
> surely have an opinion of how to do it better.
>
> The way it is implemented now, the
> XString_letterFrequencyInSlidingView is no longer being called
> directly and I guess should be removed if this is the appropriate
> style. The XStringSet_letterFrequencyInSlidingView is always delegated
> to, in a similar way that there is only a XStringSet_letterFrequency ,
> and no XString_letterFrequency.
>
> The patch is attached.
>
> If attachments don't come through (can't remember if they get
> stripped), you can also find it here:
> http://cbio.mskcc.org/~lianos/files/bioconductor/biostrings.diff
>
> Thanks,
> -steve
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
>
> _______________________________________________
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
>

	[[alternative HTML version deleted]]

