dist.PCoA: Principal coordinate analysis (PCoA; multidimensional scaling...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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.

Usage

1
2
3
4
dist.PCoA(dist.tab = NULL, correction = c("lingoes", "cailliez", "none"))

plotDistPCoA(pcoa.tab = NULL, groups = NULL, names = NULL, axes = NULL, 
     plotCorrection = FALSE, title = NULL, plotLegend=FALSE, PDF = NULL)

Arguments

dist.tab

Dissimilarity/distance matrix (e.g. from sequences.distance())

correction

Correction method of PCoA: Lingoes, Cailliez or none

pcoa.tab

PCoA outout from dist.PCoA()

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)

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.

Value

Output is an PCoA object, see pcoa.

Author(s)

Julia Bischof

References

Paradis E., Claude J. & Strimmer K. 2004. APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20: 289-290.

See Also

dist.PCoA, plotDistPCoA, sequences.distance, geneUsage.distance, pcoa

Examples

 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)

bcRep documentation built on May 2, 2019, 5:14 a.m.