uniqSequences: Formal class "uniqSequences"

Description Objects from the class uniqSequences Slots Author(s) Examples

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.

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.

Author(s)

Joseph Hughes

Examples

 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")

}

OutbreakTools documentation built on Oct. 6, 2017, 1:03 a.m.