Skip to content

Commit d25478c

Browse files
authored
Merge branch 'dev' into issue_345
2 parents 4ddbdf5 + 8dc9306 commit d25478c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

CHANGELOG.md

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

3535
- [[#479](https://github.com/nf-core/differentialabundance/pull/479)] - Fixed rendering of "Differential feature details" tabs ([@SusiJo](https://github.com/SusiJo), reviewed by [@](https://github.com/))
36+
- [[#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)).
3637
- [[#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))
3738
- [[#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))
3839
- [[#344](https://github.com/nf-core/differentialabundance/pull/344)] - Fixed replacement of NA sub-strings
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
contrasts:
2+
- id: treatment_effect_classic_comparison
3+
comparison: ["treatment", "Control", "Treated"]
4+
5+
- id: treatment_plus_genotype
6+
formula: "~ treatment + genotype"
7+
make_contrasts_str: "treatmentTreated"
8+
9+
- id: interaction_genotype_treatment
10+
formula: "~ genotype * treatment"
11+
make_contrasts_str: "genotypeWT.treatmentTreated"
12+
13+
- id: full_model_with_interactions
14+
formula: "~ genotype * treatment * time"
15+
make_contrasts_str: "genotypeWT.treatmentTreated.time"
16+
17+
- id: zero_intercept_model_1
18+
formula: "~ 0 + genotype"
19+
make_contrasts_str: "genotypeWT"
20+
21+
- id: zero_intercept_model_2
22+
formula: "~ genotype - 1"
23+
make_contrasts_str: "genotypeWT"

tests/test_rnaseq_dream.nf.test

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,35 @@ nextflow_pipeline {
6767
}
6868
}
6969

70+
test("Test rnaseq dream profile - complex contrast - with zero intercept") {
71+
when {
72+
params {
73+
outdir = "$outputDir"
74+
contrasts_yml = "$projectDir/tests/assets/zero_intercept_contrasts.yml"
75+
}
76+
}
77+
78+
then {
79+
// stable_name: All files + folders in ${params.outdir}/ with a stable name
80+
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
81+
// stable_path: All files in ${params.outdir}/ with stable content
82+
def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore')
83+
assertAll(
84+
{ assert workflow.success},
85+
{ assert snapshot(
86+
// Number of successful tasks
87+
workflow.trace.succeeded().size(),
88+
// pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions
89+
removeNextflowVersion("$outputDir/pipeline_info/nf_core_differentialabundance_software_versions.yml"),
90+
// All stable path name, with a relative path
91+
stable_name,
92+
// All files with stable contents
93+
stable_path
94+
).match() }
95+
)
96+
}
97+
}
98+
7099
test("Test rnaseq dream profile - with decoupler") {
71100

72101
when {

0 commit comments

Comments
 (0)