pathway_gene_subnetworks | R Documentation |
Extract subnetworks based on pathway genesets
pathway_gene_subnetworks(gene_network, gene_sets)
gene_network |
|
gene_sets |
|
list of kernel matrices
## Not run:
pw_db <- msigdbr::msigdbr(species = "Homo sapiens", category = "C2", subcategory = "CP:KEGG")
pw_list <- lapply(split(pw_db, pw_db$gs_name), function(x) x$ensembl_gene)
pw_list <- pw_list[which(sapply(pw_list, length) <= 200 & sapply(pw_list, length) >= 5)]
ppi_net <- COPS::getHumanPPIfromSTRINGdb(gene_id_mart_column = "ensembl_gene_id")
ppi_pws <- COPS::pathway_gene_subnetworks(ppi_net, pw_list)
# Check the connected components to see if subnets are properly connected:
lapply(ppi_pws, function(x) igraph::components(x)$csize) # Not all are
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.