Skip to content

Commit 29441a6

Browse files
authored
Merge pull request #527 from nf-core/fix-formula-pattern
Improve formula regex to match random effects and functions
2 parents 8dc9306 + a905fa8 commit 29441a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727

2828
### Fixed
2929

30+
- [[#527](https://github.com/nf-core/differentialabundance/pull/513)] - Fix contrast schema to allow for random effects and other advanced formula features. ([@grst](https://github.com/grst), review by [@pinin4fjords](https://github.com/pinin4fjords)).
3031
- [[#513](https://github.com/nf-core/differentialabundance/pull/513)] - Fix contrast schema to allow for zero-intercept models. ([@grst](https://github.com/grst), review by [@pinin4fjords](https://github.com/pinin4fjords)).
3132
- [[#476](https://github.com/nf-core/differentialabundance/pull/476)] - Fixed null.csv and warning at top of report ([@SusiJo](https://github.com/SusiJo), reviewed by [@pinin4fjords](https://github.com/pinin4fjords), [@atrigila](https://github.com/atrigila), [@maxulysse](https://github.com/maxulysse))
3233
- [[#358](https://github.com/nf-core/differentialabundance/pull/358)] - Fixed nf-tests not running due to `--changed-since HEAD^`([@atrigila](https://github.com/atrigila), review by [@pinin4fjords](https://github.com/pinin4fjords))

assets/schema_contrasts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"formula": {
1717
"type": "string",
18-
"pattern": "^~\\s*(?:[A-Za-z0-9_]+(?:\\s*(?:[:+*])\\s*[A-Za-z0-9_]+)*)?(?:\\s*-\\s*1)?$"
18+
"pattern": "^~\\s*(?:(?:[A-Za-z0-9_.]+(?:\\([^)]*\\))?|\\([^)]*\\))(?:\\s*[+*:|\\/-]\\s*(?:[A-Za-z0-9_.]+(?:\\([^)]*\\))?|\\([^)]*\\)))*)?(?:\\s*-\\s*1)?$"
1919
},
2020
"comparison": {
2121
"type": "array",

0 commit comments

Comments
 (0)