predict_PCA | R Documentation |
Predict taxonomic classifications for sequences in a codonFreq
)
object, using linear discriminants from an PCA
) model. Plot
disciminants and predictions.
predict_PCA( cFobj, pcaObj, rank = "Phylum", minlen = 600, fname = NA_character_, units = "in", width = 10, height = 7, dpi = 600, norm = FALSE, save = FALSE, identifier = NULL, includeTax = NULL, colours = NULL ) ## S4 method for signature 'codonFreq' predict_PCA( cFobj, pcaObj, rank, minlen, fname, units, width, height, dpi, norm, save, identifier, colours )
cFobj |
An object of class |
pcaObj |
Object of class |
rank |
Character, taxonomic rank to be used for categorisation. Options are "Domain", "Kingdom", and "Phylum". Default = "Phylum". |
minlen |
Numeric, the minimum length of sequence (in codons) to be included in the analysis. Default = 500. |
fname |
Character, name of figure generated. |
units |
Numeric, units to be used for defining the plot size. Options are "in" (default), "cm", and "mm". |
width |
Numeric, width of the figure (in |
height |
Numeric, height of the figure (in |
dpi |
Numeric, resolution of the figure (default = 600). |
norm |
Logical, should the codon abundances be normalised? If TRUE, codon abundances will be converted to codon bias scores, such that the sum of scores for each amino acid sum to 1. Default = FALSE. |
save |
Logical, should the enrichment results plot be saved to a file? Default = FALSE. |
identifier |
Character, optional group label to be assigned to sequences
in the |
includeTax |
Character, optional vector of taxa (at the specified rank) to be included in the PCA. If not supplied, all taxa will be used. |
colours |
Integer vector, containing values between 1 and 9, which specifies the colours to be used from the 'Set1' palette in the 'RColorBrewer' package. |
A ggplot
object.
virusSet <- readSeq(example = TRUE) virusCF <- codonFreq(virusSet) exclCod <- c("ATT", "TGT") PCA_tmp <- PCA(exclude = exclCod, rank = "Phylum", minlen = 600) predPCA <- predict_PCA( virusCF, PCA_tmp, rank = "Phylum", save = TRUE, minlen = 600, fname = "PCA_tmp2", height = 5, width = 7 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.