Description Usage Arguments Details Value Author(s) See Also Examples
Calculates the matrix of cophenetic distances represented by a dendrogram object.
1 | Cophenetic(x)
|
x |
A dendrogram object. |
The cophenetic distance between two observations is defined as the branch length separating them on a dendrogram. This function differs from the cophenetic
function in that it does not assume the tree is ultrametric and outputs the branch length separating pairs of observations rather than the height of their merger. A dendrogram that better preserves a distance matrix will show higher correlation between the distance matrix and it cophenetic distances.
An object of class 'dist'.
Erik Wright eswright@pitt.edu
1 2 3 4 5 6 | fas <- system.file("extdata", "Bacteria_175seqs.fas", package="DECIPHER")
dna <- readDNAStringSet(fas)
d1 <- DistanceMatrix(dna, type="dist")
dend <- IdClusters(d1, method="NJ", type="dendrogram")
d2 <- Cophenetic(dend)
cor(d1, d2)
|
Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: ‘S4Vectors’
The following object is masked from ‘package:base’:
expand.grid
Loading required package: IRanges
Loading required package: XVector
Attaching package: ‘Biostrings’
The following object is masked from ‘package:base’:
strsplit
Loading required package: RSQLite
================================================================================
Time difference of 0.15 secs
================================================================================
Time difference of 0.09 secs
[1] 0.9864114
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.