calc_PDDmatrix | R Documentation |
Returns pairwise distance deviation matrix. To build such matrix, the sliding window is moved along the alignment, and for each window the pairwise genetic distances between sequences are calculated. Then for each pair of windows the linear regression for pairwise genetic distances is built and the root mean square error of linear regression is estimated.
calc_PDDmatrix(dna_object, step, window, method, modification = NA)
dna_object |
list of DNA sequences produced by |
step |
step size for sliding process |
window |
window size (length of genomic regions) |
method |
method of calculation distances ("pdist", "JC", "Kimura", "TN") |
modification |
pairwise deletion of positions with gaps ( |
matrix
## Not run:
library(colorRamps)
library(gplots)
alignment = read.dna(path/to/file, format="fasta", as.character=TRUE)
alignment[alignment=='-'] <- NA
pddmatrix = calc_PDDmatrix(alignment, 1, 500, 600, 1000)
heatmap.2(as.matrix(pddmatrix), Rowv = FALSE, Colv = "Rowv",
dendrogram = 'none', col=matlab.like, main="PDD matrix", tracecol=NA)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.