multiOutput | R Documentation |
Downstream visualization tools: visualization outputs including overall
pathway clustering and output for each pathway
The multiOutput
is function to visualize pathway level c-scores and d-scoresincluding
pathway clustering results with co-membership heatmaps,
within-pathway MDS plot (on studies),
within-pathway clustering heatmap (on studies),
within-pathway posterior DE heatmap,
KEGG and Reactome topology plots for each pathway.
multiOutput(
mcmc.merge.list,
dataset.names,
select.pathway.list,
ACS_ADS_pathway,
output = c("clustPathway", "mdsModel", "clustModel", "genePM", "keggView",
"reactomeView"),
optK = NULL,
sil_cut = 0.1,
use_ADS = FALSE,
hashtb = NULL,
keywords_cut = 0.05,
text.permutation = "all",
comemberProb_cut = 0.7,
ViewPairSelect = NULL,
kegg.species = "hsa",
KEGG.dataGisEntrezID = FALSE,
KEGG.dataG2EntrezID = NULL,
KEGG.pathID2name = NULL,
reactome.species = "HSA",
Reactome.dataG2TopologyGtype = NULL,
Reactome.pathID2name = NULL
)
mcmc.merge.list: |
a list of merged MCMC output matrices. |
dataset.names: |
a vector of dataset names matched with the mcmc.merge.list. |
select.pathway.list: |
a list of selected pathways (containing gene components) for clustering/visualizations. |
ACS_ADS_pathway: |
a list of four data frames: pathway-specific c-scores, pathway-specific d-scores and their permuted p-value (each row is a pathway and each column is a study). |
output: |
choose from: "clustPathway" (pathway clustering), "mdsModel"(within-pathway MDS plot on studies), "clustModel" (within-pathway clustering heatmap), "genePM" (within-pathway posterior DE heatmap), "keggView" (KEGG pathway topology, default is human - hsa, for other species, KEGG organism name and gene Entrez ID needs to be provided as 'KEGG.dataG2EntrezID'), "reactomeView" (Reactome pathway topology, default is human - HSA, for other species, Reactome organism name needs to be provided as "reactome.species"). Clustering analysis is not applicable when the number of studies is smaller than 3. "output" cannot be empty. |
optK: |
Optimal number of clusters. For "clustPathway" output only. |
sil_cut: |
silhouette index to control scatterness. Larger value indicates tigher cluster and more scattered pathways. |
use_ADS: |
whether use d-scores for clustering/visualizations. Default is FALSE. |
hashtb: |
a flat noun-pathway table for text mining. Prepared tables from KEGG and Reactome pathway
descriptions for 5 species "hsa", "mmu", "rno", "cel" and "dme"are provided by |
keywords_cut: |
keywords above this cut will be shown in the text mining spreadsheet output. |
text.permutation: |
select from "all" or "enriched". In text mining, "all" permutates pathways from full pathway.list provided while "enriched" permutates from selected pathways. "all" is suitable for cross-species comparision while "enriched" is recommended for within-species comparision. |
comemberProb_cut: |
probability below this cut will be colored blue in comembership heatmaps. |
ViewPairSelect: |
which two datasets to view in the KEGG/Reactome topology plot. All pairs will be considered under default (may take a while). |
kegg.species: |
KEGG species abbreviation. For "keggView" only. Default is "hsa". |
KEGG.dataGisEntrezID: |
whether gene names in data are EntrezID. Default is FALSE. |
KEGG.dataG2EntrezID: |
a data frame which maps gene names in mcmc.merge.list (first column) to Entrez IDs (second column). If NULL & KEGG.dataGisEntrezID=F & kegg.species is one of "hsa", "mmu", "rno", "cel" or "dme", gene symbols will be automatically mapped to EntrezID by Bioconductor packages "org.Hs.eg.db", "org.Mm.eg.db", "org.Rn.eg.db", "org.Ce.eg.db" or org.Dm.eg.db". For "keggView" only. |
KEGG.pathID2name: |
a list where each element is a KEGG pathway name with correponding pathway ID as its name. ID will be retrieved from KEGGREST if this is NULL. |
reactome.species: |
Reactome species abbreviation. For "reactomeView" only. Default is "HSA". |
Reactome.dataG2TopologyGtype: |
a data frame which maps gene names in mcmc.merge.list (first column) and select.pathway.list to gene name types in Reactome topology (second column). For "reactomeView" only. |
Reactome.pathID2name: |
a list where each element is a Reactome pathway name with correponding pathway ID as its name. ID will be retrieved from reactome.db if this is NULL. |
all figures and tables are stored in created folders in the current directory.
## Not run:
#mcmc.merge.list from the merge step (see the example in function 'merge')
#select.pathway.list from the pathSelect step (see the example in function 'pathSelect')
#ACS_ADS_pathway from the multi_ACS_ADS_pathway step (see example in 'multi_ACS_ADS_pathway')
data(hashtb_hsa) #include hashtb & pathways for text mining
dataset.names = c("hb","hs","ht","ha","hi","hl",
"mb","ms","mt","ma","mi","ml")
#1. step1: select K by elbow plot from consensus clustering
ACSpvalue.mat = ACS_ADS_pathway$ACSpvalue.mat
results = ConsensusClusterPlus(d=t(-log10(ACSpvalue.mat)),maxK=10,reps=50,pItem=0.8,
pFeature=1,title="Consensus Clustering",clusterAlg="hc",innerLinkage="ward.D2",
finalLinkage="ward.D2",seed=12345,plot="png")
#2. step2: run multiOutput with pre-selected K=4
multiOutput(mcmc.merge.list,dataset.names,select.pathway.list,ACS_ADS_pathway,
output=c("clustPathway","mdsModel","clustModel","genePM","keggView"),
hashtb=hashtb,optK = 4,keywords_cut=0.2,comemberProb_cut=0.6)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.