intermine / intermine/InterMineR

setConstraints should support constraintLogic and codes

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
18
Forks
16
PR merge metrics
No merged PRs in 30d

Description

An important part of InterMine querying is the ability to set OR logic for constraints, as well as the default AND logic.

This code throws an error, because [neither code nor constraintLogic are permissible arguments in `setConstraints`](https://github.com/intermine/InterMineR/blob/master/R/setConstraints.R#L3):

```r
pancreasConstraint2 = setConstraints(
paths = c("Gene", "Gene.proteinAtlasExpression.level", "Gene.proteinAtlasExpression.level", "Gene.proteinAtlasExpression.tissue.name"),
operators = c("IN", rep("=", 2), "="),
values = list("PL_DiabetesGenes", "Medium", "High", "Pancreas"),
code = c("A", "B", "C", "D"),
constraintLogic = "A and (B or C) and D"
)
```

remove the invalid (but needed) code and constraintLogic arguments and it all works fine.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.