Description Objects from the class uniqSequences Slots Author(s) Examples
The class uniqSequences is a formal (S4) class for
storing unique sequences in the form of a DNAbin and an
associated list of vectors containing the original sequenceID.
uniqSequences objects can be created using
new("uniqSequences",uniqID="listOrNULL", uniqdna="DNAbin"):
uniqdnaan object of type DNAbin.
uniqIDa list of vectors with the vector names corresponding to the labels of DNAbin.
uniqSequences contain the following slots.
uniqdna:a DNAbin containing the unique sequences.
uniqID:a list containing the unique IDs for
each sequence and the names of the original sequences as a vector.
Joseph Hughes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  | ## EMPTY OBJECT
new("uniqSequences")
## LOAD RAW DATA
data(HorseFlu)
## GET SEQUENCES FROM THE FIRST 3 INDIVIDUALS
## all sequences
dna <- get.dna(subset(HorseFlu, individuals=1:3))[[1]]
dna
if(require(ape)){
plot(nj(dist.dna(dna)), type="unr")
title("NJ tree - all sequences")
## only unique sequences
dna2 <- dna2uniqSequences(dna)
dna2
plot(nj(dist.dna(dna2@uniqdna)), type="unr")
title("NJ tree - only unique sequences")
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.