Description Usage Arguments Value Examples
View source: R/correlationAnalysis.R
Draws a heatmap from a dataframe of correlated ARGs and taxa
1 | drawCorrelationHeatmap(cor_df, bottom_margin = 0, left_margin = 0, phyla)
|
cor_df |
A dataframe containing correlated ARGs and taxa, rho and adjusted p-values |
bottom_margin |
A numeric value in millimeters for height of column names |
phyla |
A character vector of phyla names for labelling columns of heatmap |
padding |
A numeric value in millimeters for width for row names |
None
1 2 3 4 5 6 | df_map <- readMappingData("/home/vicky/Documents/CHMI/Resistome-paper/resistomeAnalysis/db/MAPPING_DATA/nonsubsampled_merged.csv", without_US_duplicates = TRUE)
metaphlan <- read.csv("/home/vicky/Documents/CHMI/Resistome-paper/resistomeAnalysis/db/METAPHLAN/metaphlan.csv", stringsAsFactors = FALSE, row.names = 1)
metaphlan_rpkm <- combineMetaphlanandARG(df_map, metaphlan)
high_cor_uk_oral <- getSpearmanCorrelation(metaphlan_rpkm, ids = unique(df_map$ID[df_map$Cohort == "Twin" & df_map$sample_type == "saliva"]), taxon_level = "t", taxon_ignore = "@@")
phyla <- c("Firmicutes", "Actinobacteria", "Proteobacteria", "Bacteroidetes", "Candidatus_Saccharibacteria", "Fusobacteria", "Spirochaetes", "Verrucomicrobia", "Ascomycota", "Synergistetes")
h <- drawCorrelationHeatmap(high_cor_uk_oral, 100, 5, phyla)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.