library(GSNA)
# In this example, we generate a gene set network from CERNO example
# data. We begin by subsetting the CERNO data for significant results:
sig_pathways.cerno <- subset( Bai_CiHep_DN.cerno, adj.P.Val <= 0.05 )
# Now create a gene set collection containing just the gene sets
# with significant CERNO results, by subsetting Bai_gsc.tmod using
# the gene set IDs as keys:
sig_pathways.tmod <- Bai_gsc.tmod[sig_pathways.cerno$ID]
# And obtain a background gene set from differential expression data:
background_genes <- toupper( rownames( Bai_CiHep_v_Fib2.de ) )
# Build a gene set network:
sig_pathways.GSN <-
buildGeneSetNetworkJaccard(geneSetCollection = sig_pathways.tmod,
ref.background = background_genes )
# Now import the CERNO data. Generic import can work with most types of data,
# and we can manually specify id_col, stat_col, n_col:
sig_pathways.GSN <- gsnImportGenericPathways( sig_pathways.GSN,
pathways_data = sig_pathways.cerno,
id_col = 'ID',
stat_col = 'adj.P.Val',
sig_order = 'loToHi',
n_col = 'N1'
)
Run the code above in your browser using DataLab