Description Usage Arguments Value Examples
View source: R/metaprotr_plot_pca.R
Performs a Principal Components Analysis (PCA) from the spectral counts of the entities (peptides, subgroups, groups or taxonomic elements) in a "spectral_count_object" with or without taxonomy. PCA decomposition of high dimensional data allows to observe global effects in two dimensions. For more details of the used function check dudi.pca from ade4.
1 |
spectral_count_object |
List described as "spectral_count_object" containing dataframes with abundance expressed as spectral counts from peptides, subgroups, groups or taxonomic levels. The format of this object is similar to that generated from the functions "getsc_specific" and "crumble_taxonomy". The PCA projections will be applied to these observations. |
colors_var |
Character indicating the name of one column from metadata. The samples will be represented in different colors in function of the levels of this variable (ex. conditions). |
pc_components |
Two numeric values indicating two principal components to be analyzed. |
force |
Logic value set as FALSE by default in order to ask permission to create a file in the workstation of the user. |
A pdf file containing the results of PCA applied to the two provided principal components. Including a bar plot indicating the percentage of variance per principal component.
1 2 3 4 5 6 7 8 | data(fecal_waters)
plot_pca(fecal_waters, "Methods", c(1, 2))
data(species_fw)
plot_pca(species_fw, "Methods", c(1, 3))
data(species_annot_fw)
plot_pca(species_annot_fw, "Condition", c(1, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.