[R] function to compute consensus DNA sequence by plurality?

From: Kim Milferstedt <milferst_at_uiuc.edu>
Date: Tue, 27 May 2008 19:02:38 -0500


Hello,

I am looking for a function that computes a consensus DNA sequence by plurality. I found "consensus" in bio3d which almost does what I need. However, it would be important for me to include ambiguities and not to omit every position that is less than the threshold set in "consensus".

Is anybody aware of a package with a function that includes ambiguities in a consensus sequence?

Thanks already!

Kim

Here are a couple of sequences to illustrate what I would like:

TGCATACACCGACAACATCCTCGACGACTACACCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG AGCATACACCGACAACATCCTCGATGACTACTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG AGCATACACCGACAACATCCTCGATGACTACTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG CGCCTACACCAACGATGTCCTGGACGACTTCTGCTACTACG   GC TACACC AC A TCCT GA GACT CTGCTACTACG
#This is what I get from "consensus" in bio3d with a threshold of 0.85.

HGCMTACACCRACRAYRTCCTSGAYGACTWCTGCTACTACG
# This is what I would like to get.



Kim Milferstedt, PhD
Postdoctoral Researcher
University of Illinois at Urbana-Champaign Department of Microbiology
C207 CLSL
601 S. Goodwin Avenue
Urbana, IL 61801

phone: 001-217-244-0721
email: milferst_at_uiuc.edu



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 28 May 2008 - 00:42:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 May 2008 - 01:30:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive