Description Usage Arguments Details Value Author(s) References See Also Examples
Performs and plots a principal coordinate analysis (PCoA) of dissimilarity/distance indices. Correction methods can be used. Merging of samples to groups is possible in the plot function.
1 2 3 4 |
dist.tab |
Dissimilarity/distance matrix (e.g. from |
correction |
Correction method of PCoA: Lingoes, Cailliez or none |
pcoa.tab |
PCoA outout from |
groups |
data.frame containing sequences (1. column) and groups (2. column) |
names |
Names of samples/axes |
axes |
Which axes shall be plotted? e.g. c(1,2) for axes 1 and 2 |
plotCorrection |
Shall corrected or uncorrected eigenvalues be plotted? |
title |
Title of the plot |
plotLegend |
Shall legend be plotted? |
PDF |
PDF project name (see Details) |
This function provides a PCoA object for dissimilarity indices/distances as input (e.g. from functions sequences.distance
or geneUsage.distance()
). For further details of pcoa see pcoa
.
The plot function provides a figure with the principal coordinates with positive eigenvalues (in the case of no correction) or the principal coordinates with positive eigenvalues from the distance matrix corrected using the specified correction method. The principal coordinates correspond to the specified axes.
A figure called "PDF"_PCoA.pdf will be saved to the working directory.
Output is an PCoA object, see pcoa
.
Julia Bischof
Paradis E., Claude J. & Strimmer K. 2004. APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20: 289-290.
dist.PCoA
, plotDistPCoA
, sequences.distance
,
geneUsage.distance
, pcoa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(clones.ind)
seq.dist<-sequences.distance(sequences = clones.ind$unique_CDR3_sequences_AA,
method = "levenshtein", divLength=F)
distpcoa<-dist.PCoA(dist.tab = seq.dist, correction = "none")
# 'groups' data.frame for plot function: in the case, there are no groups:
groups.vec<-unlist(apply(data.frame(clones.ind$unique_CDR3_sequences_AA),1,
function(x){strsplit(x,split=", ")[[1]]}))
groups.vec<-cbind(groups.vec, 1)
plotDistPCoA(pcoa.tab = distpcoa, groups=groups.vec, axes = c(1,2),
plotCorrection = FALSE, title = NULL, plotLegend=T, PDF = "TEST")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.