Description Usage Arguments Value Examples
View source: R/metaprotr_plot_dendocluster.R
Draws a dendogram where samples are clustered based on the number of elements present on each sample from a "spectral_count_object". This graph is constructed based on Spearman correlations transformed into distances and plotted with the logic of the package dendextend.
1 2 3 4 5 6 7 8 | plot_dendocluster(
spectral_count_object,
target_variable,
file_title,
hclust_method = "ward.D",
correlation_method = "spearman",
force = FALSE
)
|
spectral_count_object |
List defined 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". |
target_variable |
Character indicating the name of one column from metadata. The different levels in this column will be represented as different colors in the final dendogram. |
file_title |
Character indicating the name of the generated file. |
hclust_method |
Character indicating the agglomeration method to be used for the hierarchical clustering. The possible methods are discribed on hclust. The default method is "ward.D". |
correlation_method |
Character indicating the correlation coeficient to be computed. The possible options are discribed in the function cor. The default value is "spearman". |
force |
Logic value set at FALSE by default in order to ask permission to create a pdf file in the workstation of the user. |
A dendogram plot (pdf) indicating the number of elements per sample.
1 2 3 4 5 6 7 8 9 10 | data(fecal_waters)
str(fecal_waters$metadata)
plot_dendocluster(fecal_waters, "Condition", "title_dendogram")
plot_dendocluster(fecal_waters, "Condition", "title_dendogram",
hclust_method = "mcquitty")
plot_dendocluster(fecal_waters, "Condition", "title_dendogram_groups",
correlation_method = "pearson")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.