fetchGrinnModuNetwork - Combine a grinn network queried from Grinn internal database to a network module correlated to a phenotypic feature

Description

from the list of keywords, input omics data e.g. normalized expression data or metabolomics data, and phenotypic data it is a one step function to:
1. Build an integrated network (grinn network) by connecting these keywords to a specified node type, see fetchGrinnNetwork. The keywords can be any of these node types: metabolite, protein, gene and pathway. Grinn internal database contains the networks of the following types that can be quried: metabolite-protein, metabolite-protein-gene, metabolite-pathway, protein-gene, protein-pathway and gene-pathway.
2. Identify correlation between the input omics data e.g. normalized gene expression data, and phenotypic data e.g. weight. The function wraps around important aspects of WGCNA including blockwiseModules, cor, corPvalueStudent, labeledHeatmap. These aspects automatically perform correlation network construction, module detection, and display module-phenotype correlations. A module or the combination of modules can be selected from the heatmap of module-phenotype correlations for including in the network output.
3. Combine the grinn network to the network module.

Usage

fetchGrinnModuNetwork(txtInput, from, to, filterSource, returnAs, dbXref, datX, datPheno, sfPower, minModuleSize, threshold)

Arguments

txtInputlist of keywords containing keyword ids e.g. txtInput = list('id1', 'id2'). The keyword ids are from the specified database, see dbXref. Default is grinn id e.g. G371.
fromstring of start node. It can be one of "metabolite","protein","gene","pathway".
tostring of end node. It can be one of "metabolite","protein","gene","pathway".
filterSourcestring or list of pathway databases. The argument is required, if from or to = "pathway", see from and to. The argument value can be any of "SMPDB","KEGG","REACTOME" or combination of them e.g. list("KEGG","REACTOME").
returnAsstring of output type. Specify the type of the returned network. It can be one of "tab","json","cytoscape", default is "tab". "cytoscape" is the format used in Cytoscape.js
dbXrefstring of database name. Specify the database name used for the txtInput ids, see txtInput. It can be one of "grinn","chebi","kegg","pubchem","inchi","hmdb","smpdb","reactome","uniprot","ensembl","entrezgene". Default is "grinn". If pubchem is used, it has to be pubchem SID (substance ID).
datXdata frame containing normalized, quantified omics data e.g. expression data, metabolite intensities. Columns correspond to entities e.g. genes, metabolites, and rows to samples e.g. normals, tumors. Require 'nodetype' at the first row to indicate the type of entities in each column.
datPhenodata frame containing phenotypic data e.g. weight, age, insulin sensitivity. Columns correspond to phenotypes and rows to samples e.g. normals, tumors.
sfPowernumerical value of soft-thresholding power for correlation network construction. It is automatically estimated using pickSoftThreshold, or it can be defined by users.
minModuleSizenumerical value of minimum module size for module detection.
thresholdnumerical value to define the minimum value of similarity threshold, from 0 to 1, to include edges in the output.

Value

list of nodes and edges. The list is with the following componens: edges and nodes. Return empty list if found nothing

Examples


# Create metabolite-gene network from the list of metabolites using grinn ids and combine the grinn network to a correlation of metabolite module to phenotypic data
kw <- c('G160','G300','G371','G16414','G17191')
library(grinn)
data(dummy)
data(dummyPheno)
result <- fetchGrinnModuNetwork(txtInput=kw, from="metabolite", to="gene", datX=dummy, datPheno=dummyPheno, minModuleSize=5, threshold=0.2)
# enter module color(s) seperate by space:yellow brown purple
library(igraph)
plot(graph.data.frame(result$edges[,1:2], directed=FALSE))
          

References

Correlation-based analyses apply methods from the following publications:

Go to HOME | Documentation | fetchGrinnNetwork | fetchCorrGrinnNetwork | fetchDiffCorrGrinnNetwork | fetchModuGrinnNetwork | fetchGrinnCorrNetwork | input formats