Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Good Query
- This query is the same as the above, but note the constraint in the code.
- ```R
- im <- initInterMine(mine=listMines()["HumanMine"])
- queryGeneOrth = getTemplateQuery(
- im = im,
- name = "Gene_Orth"
- )
- newConstraint <- list(
- path=c("Gene.homologues.homologue.organism.shortName"),
- op=c("!="),
- value=c("H. sapiens"),
- code=c("B")
- )
- queryGeneOrth$where[[2]] <- newConstraint
- resGeneOrth <- runQuery(im, queryGeneOrth)
- ```
- # Bad Query
- This query is bad because it's missing a constraint code. It'll make InterMine return a 400 error.
- ```R
- im <- initInterMine(mine=listMines()["HumanMine"])
- queryGeneOrth = getTemplateQuery(
- im = im,
- name = "Gene_Orth"
- )
- newConstraint <- list(
- path=c("Gene.homologues.homologue.organism.shortName"),
- op=c("!="),
- value=c("H. sapiens")
- )
- queryGeneOrth$where[[2]] <- newConstraint
- resGeneOrth <- runQuery(im, queryGeneOrth)
- ```
Add Comment
Please, Sign In to add comment