Learn R Programming

OutbreakTools (version 0.1-16)

uniqSequences-class: Formal class "uniqSequences"

Description

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.

Arguments

Objects from the class uniqSequences

uniqSequences objects can be created using new("uniqSequences",uniqID="listOrNULL", uniqdna="DNAbin"):

uniqdna

an object of type DNAbin.

uniqID

a list of vectors with the vector names corresponding to the labels of DNAbin.

Slots

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.

Examples

Run this code
# NOT RUN {
## 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")

}
# }

Run the code above in your browser using DataLab