-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved conflicts between dev and update-parameters
- Loading branch information
Showing
5 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
id address level_1 level_2 level_3 | ||
sample1 1.1.1 1 1 1 | ||
sample2 1.1.1 1 1 1 | ||
sample3 2.2.2 2 2 2 | ||
sample3 1.1.2 1 1 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sample_id l1 l2 l3 | ||
sampleQ 1 2 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
nextflow_process { | ||
name "Test Process CLUSTER_FILE" | ||
script "modules/local/cluster_file/main.nf" | ||
process "CLUSTER_FILE" | ||
|
||
test("Test when sample levels are equal") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of( | ||
[['id':'sample1', 'address':'1.1.1'], | ||
['id':'sample2', 'address':'1.1.1'], | ||
['id':'sample3', 'address':'1.1.2']] | ||
) | ||
""" | ||
} | ||
|
||
params { | ||
outdir = "cluster_results" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assert path("$launchDir/cluster_results").exists() | ||
|
||
// Check expected_clusters | ||
def actual_clusters = path("$launchDir/cluster_results/cluster/expected_clusters.txt") | ||
def expected_clusters = path("$baseDir/tests/data/clusters/expected_clusters.txt") | ||
assert actual_clusters.text == expected_clusters.text | ||
} | ||
} | ||
|
||
test("Test when sample levels are different") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of( | ||
[['id':'sample1', 'address':'1.1.1'], | ||
['id':'sample2', 'address':'1.1.1'], | ||
['id':'sample3', 'address':'1.2']] | ||
) | ||
""" | ||
} | ||
|
||
params { | ||
outdir = "cluster_results" | ||
} | ||
} | ||
|
||
then { | ||
assert process.failed | ||
assert (process.stdout =~ /Inconsistent levels found: expected 3 levels but found 2 levels in sample3/).find() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters