KechrisLab / multiMiR

Development repository for the multiMiR database's R API
Other
19 stars 3 forks source link

Mouse (mmu) getmultimir function not working? "invalid class “mmquery_bioc” object: invalid object for slot "summary" in class "mmquery_bioc"" #53

Open TheMuffinMan563 opened 6 months ago

TheMuffinMan563 commented 6 months ago

Hello,

I am trying this package on Rstudio, I am having difficulty with mouse microRNAs. Human ones seem fine.

Example of a code snippet that is fine (no error return):

testmouse<-get_multimir(mirna="hsa-miR-96-5p", summary = TRUE)

Then, when I swap out the hsa for mmu for mouse accession, I get an error:

testmouse<-get_multimir(mirna="mmu-miR-96-5p", summary = TRUE) Searching mirecords ... Searching mirtarbase ... Searching tarbase ... Error in validObject(.Object) : invalid class “mmquery_bioc” object: invalid object for slot "summary" in class "mmquery_bioc": got class "NULL", should be or extend class "data.frame"

I've tried this with several different microRNAs, the mouse ones seem really problematic. Am I doing something wrong here?

Thanks

-C.J

smahaffey commented 6 months ago

@TheMuffinMan563 I'm not sure why this is happening but I can replicate it. I will fix it for an updated R package soon.

In the meantime it does seem to work if you use: testmouse<-get_multimir(mirna="mmu-miR-96-5p", legacy.out = TRUE, summary = TRUE)

TheMuffinMan563 commented 6 months ago

The above code doesn't give an error return for me either, can you try the head function on that because for me it gives an error. Try: head(testmouse@data)

The return: Error in head(testmouse@data) : trying to get slot "data" from an object (class "mmquery") that is not an S4 object

So it seems like you have solved one problem :)

smahaffey commented 4 months ago

@TheMuffinMan563 I'm sorry for the very late response. Yes using legacy.out=TRUE returns an S3 object so you won't be able to use it like an S4.

I'm working on the database update finally. After that I can take a look at the R package and see if I can fix the issue. I suspect the R package in that instance isn't handling an empty query result correctly and it should be fixed.

TheMuffinMan563 commented 4 months ago

Thank you for the update, best of luck with the patch.