Thank you for mentioning the mistake. This is not the exact problem. I only made a mistake when I tried to make a question! In my running codes I used semData=meshdata
Hi everyone: I tried to run following codes to compute Semantic Similarity Matrix (SSM) using different measure, combine, database and category to find the best estimate,but in some cases I got an error as follow. I some cases I didn't get the error. here is an example that I got the error:
meshdata <- meshdata(MeSHDb = "MeSH.Osa.eg.db", category = "D",
computeIC = T, database = "gene2pubmed")
geneID1 = c('4326141','4325700','4338366','4342837','4352144','4326138',
'4328054','4342814','107275659','4327762','4325477','4337260',
'4332420','4326139','4343995','107276434','4344818','4325681',
'4344645','4352213','4341304','4328060','9268025','9268534',
'4331193','4332399','4325948','4341406','4332364','4337643',
'4347074','4338683','4326570','4340840','4339975','4351983',
'4338278','4340742','4349385','4336126')
geneID2 = c('4340663','4340742','4340766','4340664','4333617','107275499',
'4329977','4341882','4338366','4331441','4349599','4338742',
'107275485','4332781','4340658','9268333','4338129','4325949',
'4341584','4337260','4329976','4349405','4330391','4330463',
'4332420','4340773','4345898','4350031','107276434','4350837',
'4332595','4340770','4351088','4351956','4352587','4328054',
'4349544','4345081','9270392','4335780','4350867','4341611',
'4340839','4325948','4340840','4336148','4345956','107275659',
'4330477','4336126')
SSM_rice = geneSim(geneID1=geneID1, geneID2 = geneID2, measure = "Resnik",
combine = "BMA", semData = meshdata)
> Error in infoContentMethod_cpp(ID1, ID2, .anc, IC, method, ont) :
> Expecting a string vector: [type=NULL; required=STRSXP].
> In addition: Warning message:
> In `[.data.frame`(meshtbl, meshtbl$meshID %in% id, "parent") :
> restarting interrupted promise evaluation
In addition when I reduced the number of the gene to 10 and 20 for geneID1 and geneID1, respectively, the problem solved, but I need to use all genes. See the following codes:
geneID1 = geneID1[1:10]
geneID2 = geneID2[1:20]
SSM_rice = geneSim(geneID1=geneID1, geneID2 = geneID2, measure = "Resnik",
combine = "BMA",semData=meshdata)
SSM_rice[1:6,1:6]
> 4340663 4340742 4340766 4340664 4333617 107275499
> 4326141 0.13 NA 0.13 0.13 0.13 NA
> 4325700 0.13 NA 0.13 0.13 0.13 NA
> 4338366 0.13 NA 0.13 0.13 0.13 NA
> 4342837 0.13 NA 0.13 0.13 0.13 NA
> 4352144 0.13 NA 0.13 0.13 0.13 NA
> 4326138 0.13 NA 0.13 0.13 0.13 NA
I'm using R version 3.4.3 (2017-11-30), ‘meshes’ version 1.4.0 and Bioconductor 3.6.
Thanks in advance!
1 answer
I'm looking at examples here: http://bioconductor.org/packages/release/bioc/vignettes/meshes/inst/doc/meshes.html and it seems that you're using semData=datahsamd whereas you should be using semData=meshdata and also follow up with a data(meshdata) after your first line of code.
Log in to answer this question.
Please add the values for
geneID1andgeneID2.I edited the codes and put the geneID1 and geneID2 valuse.
mahmood.amiri225 39 entry in geneID1 seems to be problematic and try removing it, Try running for 39 and it will fail:
and
If it fails for 39, then see if there is an extra space at the end of 39 entry