Dna-class {haplotypes} | R Documentation |
Class "Dna"
in the Package haplotypes
Description
S4 class to hold DNA sequence data.
Objects from the Class
Objects can be created by calls of the form new("Dna", sequence, seqlengths, seqnames)
, however reading fasta file using read.fas
function or coerce matrix, data.frame or list objects to a Dna object using as.dna
methods is preferable.
Slots
sequence
:Object of class
"matrix"
containing DNA sequence data, rows represent sequences and columns represent sites. See also ‘Note’.seqlengths
:Object of class
"numeric"
containing the length of each DNA sequence.seqnames
:Object of class
"character"
containing the name of each DNA sequence.
Methods
- [
signature(x = "Dna", i = "ANY", j = "ANY")
: extracts part of a DNA sequence as an object of class matrix.- [<-
signature(x = "Dna", i = "ANY", j = "ANY", value = "ANY")
: replaces part of a Dna sequence with an object of class"matrix"
,"numeric"
or"character"
.- append
signature(x = "Dna", value = "ANY")
: combines two Dna objects.- as.data.frame
signature(x = "Dna")
: coerces an object of class Dna to a data.frame.- as.list
signature(x = "Dna")
: coerces an object of class Dna to a list; elements of the list are character vectors that contains the DNA sequences of length equal to corresponding value in the slotseqlengths
.- as.matrix
signature(x = "Dna")
: coerces an object of class Dna to a matrix.- as.numeric
signature(x = "Dna")
: coerces an object of class Dna to a numeric matrix.- as.DNAbin
signature(x = "Dna")
: coerces an object of class Dna to aDNAbin
object.- as.phyDat
signature(x = "Dna")
: coerces an object of class Dna to aphyDat
object.- basecomp
signature(x = "Dna")
: calculates base composition of Dna object.- boot.dna
signature(x = "Dna")
: generates single bootstrap replicate.- distance
signature(x = "Dna")
: computes and returns an absolute pairwise character difference matrix from DNA sequences.- haplotype
signature(x = "Dna")
: infers haplotypes from DNA sequences.- image
signature(x = "Dna")
: displays DNA sequences- indelcoder
signature(x = "Dna")
: supports simple indel coding method.- length
signature(x = "Dna")
: returns the longest sequence length.- append
signature(x = "Dna", value = "ANY")
: combines two Dna objects.- names
signature(x = "Dna")
: gets the names of an object Dna.- names<-
signature(x = "Dna")
: sets the names of an object Dna.- ncol
signature(x = "Dna")
: returns the longest sequence length.- nrow
signature(x = "Dna")
: returns the total sequence number.- pairnei
signature(x = "Dna")
: calculates pairwise Nei's average number of differences between populations.- pairPhiST
signature(x = "Dna")
: calculates pairwise PhiST between populations.- parsimnet
signature(x = "Dna")
: estimates genealogies using statistical parsimony.- polymorp
signature(x = "Dna")
: displays information about DNA polymorphisms of two sequences; indels and base substitutions, respectively.- range
signature(object = "Dna")
: returns a vector containing the minimum and maximum length of DNA sequences.- remove.gaps
signature(object = "Dna")
: removes alignment gaps.- rownames
signature(object = "Dna")
: retrieve the row names of a DNA sequence matrix.- rownames<-
signature(object = "Dna")
: set the row names of a DNA sequence matrix.- show
signature(object = "Dna")
: displays Dna object briefly.- subs
signature(x = "Dna")
: displays information about base substitutions.- tolower
signature(x = "Dna")
: Translate characters in DNA sequence matrix from upper to lower case.- toupper
signature(x = "Dna")
: Translate characters in DNA sequence matrix from lower to upper case.- unique
signature(x = "Dna")
: returns a list with duplicate DNA sequences removed.
Note
Valid characters for the slot sequence
are "A","C","G","T","a","c","g","t","-","?". Numeric entries (integers) between 0-5 will be converted to "?","A","C","G","T","-", respectively. Invalid characters will be replaced with "?" with a warning message.
Author(s)
Caner Aktas, caktas.aca@gmail.com