Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mousemine 500: internal sever error #2452

Open
dorkylever opened this issue Apr 4, 2023 · 0 comments
Open

Mousemine 500: internal sever error #2452

dorkylever opened this issue Apr 4, 2023 · 0 comments

Comments

@dorkylever
Copy link

dorkylever commented Apr 4, 2023

Hi Devs,

Basically I'm using reticulate in R to call your python script (similar to the 'Generate Python Code' button for the Functions table in
https://www.mousemine.org/mousemine/portal.do#).
The only thing I've really changed is i) add a constrant for Gene symbols in a column of a dataframe and ii) rewrote the results iterator for reticulate. However, I get the following error:
Error: intermine.errors.WebserviceError: [Errno Internal server error] 500: 'Internal Server Error'

Code Below:
library(reticulate)
MouseMine_query <- function(db){
# Use the use_python() function to specify the path to your Python executable
use_python("/usr/bin/python3")
# Import the intermine.webservice module
service <- import("intermine.webservice")
# Create a Service object
service_obj <- service$Service("https://www.mousemine.org/mousemine/service", token = "MY-API-TOKEN")
# Create a new OntologyAnnotation query object
query <- service_obj$new_query("SequenceFeature")
query$add_constraint("ontologyAnnotations.ontologyTerm", "GOTerm")
# Add constraints to the query object
query$add_view( "primaryIdentifier", "symbol", "name", "mgiType", "ontologyAnnotations.ontologyTerm.namespace", "ontologyAnnotations.qualifier", "ontologyAnnotations.ontologyTerm.identifier", "ontologyAnnotations.ontologyTerm.name", "ontologyAnnotations.evidence.code.code", "ontologyAnnotations.evidence.withText", "ontologyAnnotations.evidence.publications.mgiJnum", "ontologyAnnotations.evidence.publications.pubMedId", "ontologyAnnotations.evidence.publications.citation", "ontologyAnnotations.evidence.comments.type", "ontologyAnnotations.evidence.comments.description" )
query$add_constraint("ontologyAnnotations.dataSets.name", "=", "GOTerm to Mouse Feature Annotations from MGI", code = "B")
query$add_constraint("organism.taxonId", "=", "10090", code = "D")
query$add_constraint("SequenceFeature", "IN", "link_1", code = "C")
query$add_constraint("symbol", "ONE OF", db$Gene.Symbol, code = "E")
query$outerjoin("ontologyAnnotations.evidence.comments")
# Execute the query and print the results
results <- query$results()
res_ontology <- reticulate::iterate(results)
return(res_ontology)
}
onto <- MouseMine_query(sifted_just_C3H_HEH)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant