egeulgen / pathfindR

pathfindR: Enrichment Analysis Utilizing Active Subnetworks
https://egeulgen.github.io/pathfindR/
Other
183 stars 25 forks source link

Making STRING Db for Plasmodium #130

Closed Rohit-Satyam closed 2 years ago

Rohit-Satyam commented 2 years ago

Hi Developers After seeing your tutorial on Biostars, I wanted to try your package on Plasmodium Falciparum data. However, I am facing issue in converting Uniport IDs to gene symbols. Kindly help

# From STRING
url <- "https://stringdb-static.org/download/protein.links.v11.5/36329.protein.links.v11.5.txt.gz"
path2file <- file.path(tempdir(check = TRUE), "STRING.txt.gz")
download.file(url, path2file)
pfa_string_df <- read.table(path2file, header = TRUE)
## filter using combined_score cut-off value of 800
pfa_string_df <- pfa_string_df[pfa_string_df$combined_score >= 800, ]

## fix ids
pfa_string_pin <- data.frame(Interactor_A = sub("^36329\\.", "", pfa_string_df$protein1),
                             Interactor_B = sub("^36329\\.", "", pfa_string_df$protein2))
##
library(biomaRt)
all <- biomaRt::listDatasets(biomaRt::useMart( biomart="protists_mart", host="https://protists.ensembl.org"))
pfa_ensembl <- useMart(biomart="protists_mart", host="https://protists.ensembl.org",dataset = "pfalciparum_eg_gene")
temp <- listAttributes(pfa_ensembl)
converted <- getBM(attributes = c("uniprotsptrembl", "external_gene_name"),
                   filters = "uniprotsptrembl",
                   values = unique(unlist(pfa_string_pin)),
                   mart = db)
egeulgen commented 2 years ago

hello, what error do you get? I can try to help if it's something I'm familiar with. I'll suggest you search for this/post this issue on Biostars as it's not directly linked to pathfindR but is a more general ID conversion issue.