BioPAX / paxtoolsr

The package provides a set of R functions for interacting with BioPAX OWL files using Paxtools and the querying Pathway Commons (PC) molecular interaction database
https://bioconductor.org/packages/release/bioc/html/paxtoolsr.html
10 stars 1 forks source link

Find all the genes involved in a pathway #7

Closed Kamalika17 closed 1 year ago

Kamalika17 commented 1 year ago

Hi,

I have an input gene. I want to get all the pathways that the gene is participating in and the other genes in the respective pathways. How can I get this information?

gene -> get all pathways (pathway1, pathway2 etc) -> get all other genes involved in these pathways (pathway1, pathway2)

Thanks

cannin commented 1 year ago

@Kamalika17 My suggestion download:

https://www.pathwaycommons.org/archives/PC2/v12/PathwayCommons12.All.hgnc.gmt.gz

then using this function: https://github.com/cannin/listutils/blob/master/R/searchListOfVectors.R

Run something like this:

library(paxtoolsr)
library(listutils)

input_gene <- "NOS3"
gmt <- readGmt("~/Downloads/PathwayCommons12.All.hgnc.gmt")

tmp <- searchListOfVectors(input_gene, gmt, useNames=FALSE)
pathway_ids <- tmp[[input_gene]]

gmt[pathway_ids]
Kamalika17 commented 1 year ago

Thank you for your response. How can I get the interactions as well between the genes?

cannin commented 1 year ago

Expanded answer:

NOTE: The URI should look like a URL web link.

library(paxtoolsr)
library(listutils)

input_gene <- "NOS3"
gmt <- readGmt("~/Downloads/PathwayCommons12.All.hgnc.gmt")
tmp <- searchListOfVectors(input_gene, gmt, useNames=TRUE)
pathway_ids <- tmp[input_gene]

gmt[pathway_ids]

cur_pathway_id <- 8
uri <- pathway_ids[cur_pathway_id]
sif <- getPc(uri, format = "SIF")

interactions <- filterSif(sif, ids = input_gene)
Kamalika17 commented 1 year ago

Thanks a lot! This is very helpful.

cannin commented 1 year ago

Closing the issue for now. Remember to cite paxtoolsr: https://pubmed.ncbi.nlm.nih.gov/26685306/