Closed komalsrathi closed 3 years ago
I believe you have the same problem as in your previous comment, as you are using the path from system.file()
?
I downloaded the full database and still getting the same error:
library(drugTargetInteractions)
genes <- c("FGFBP2", "HOXC6", "FREM2", "HOXC9", "AC105052.1")
# obtained from ftp://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/chembl_29_sqlite.tar.gz
chembldb <- file.path(ref_dir, "chembl", "chembl_29_sqlite", "chembl_29.db")
resultsPath <- system.file("extdata", "results", package = "drugTargetInteractions")
config <- genConfig(chemblDbPath = chembldb, resultsPath = resultsPath)
downloadUniChem(config = config)
cmpIdMapping(config = config)
idMap <- getSymEnsUp(EnsDb = "EnsDb.Hsapiens.v86", ids = genes, idtype = "GENE_NAME")
ens_gene_id <- idMap$ens_gene_id
queryBy <- list(molType="gene", idType = "ensembl_gene_id", ids = names(ens_gene_id))
res_list <- getParalogs(queryBy)
Error in rep(seq_along(resultDF$ENSEMBL), index) :
invalid 'times' argument
This works for me. Perhaps first install the updated package as instructed in your other issue. Also pay attention to the other line with system.file
. Just in case this is the code I tested with your gene ids:
Same as in other issue...
gene_name <- c("FGFBP2", "HOXC6", "FREM2", "HOXC9", "AC105052.1")
idMap <- getSymEnsUp(EnsDb = "EnsDb.Hsapiens.v86", ids = gene_name, idtype = "GENE_NAME")
ens_gene_id <- idMap$ens_gene_id
queryBy <- list(molType="gene", idType = "ensembl_gene_id", ids = names(ens_gene_id))
res_list <- getParalogs(queryBy)
Works as expected, thanks!
I am facing another issue with few genes in
getParalogs
function:Code:
Error: