GangLiLab / genekitr

🧬 Gene analysis toolkit based on R
https://www.genekitr.fun
GNU General Public License v3.0
53 stars 7 forks source link

transId function sometimes give error #30

Open wt12318 opened 5 months ago

wt12318 commented 5 months ago

Hi, Thanks for your tools. When I used transId to transform gene ids, I found that this tool sometimes works fine, but sometimes it gives an error:

ec <- 0
for (i in 1:10){
  esm_id <- try(genekitr::transId(unique(dt$NCBIid), transTo = "ensembl"))
  if(inherits(esm_id, "try-error")){
    ec <- ec + 1
  }
}
ec
##[1] 3

In this example, this gives error in 3 out 10 times. Why this happened? How could I handle this? (The dt file is provided) Thanks. dt.zip

reedliu commented 5 months ago

Hi, I have tested your data 20 times and have not found any problems. Do you have any error information when transId fails? image

wt12318 commented 5 months ago

The Error message is:

Maybe your "trans_to" argument is wrong, please check again...
Error in tbl_vars_dispatch(x) : object 'res' not found

I just try it again, and it remains 1/10 error:

dt <- readRDS("~/dt.rds")
ec <- 0
for (i in 1:10){
  esm_id <- try(genekitr::transId(unique(dt$NCBIid), transTo = "ensembl"))
  if(inherits(esm_id, "try-error")){
    ec <- ec + 1
  }
}
##
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Maybe your "trans_to" argument is wrong, please check again...
Error in tbl_vars_dispatch(x) : object 'res' not found
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl
Some ID occurs one-to-many match, like "401427, 124056, 3323"...

99.02% genes are mapped to ensembl