forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to gnu sort module to include nf-test (nf-core#4950)
* Updates to gnu sort module to include nf-test * Linting * Linting * Fix output
- Loading branch information
1 parent
f2fdc5e
commit ca199cf
Showing
13 changed files
with
279 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: GNU_SORT | ||
name: gnu_sort | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
|
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 @@ | ||
name: "GNU_SORT" | ||
name: "gnu_sort" | ||
description: | | ||
Writes a sorted concatenation of file/s | ||
keywords: | ||
|
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,120 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GNU_SORT" | ||
script "modules/nf-core/gnu/sort/main.nf" | ||
process "GNU_SORT" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gnu" | ||
tag "gnu/sort" | ||
|
||
test("unsorted_genome_sort") { | ||
config "./sort_simple_bed.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id:'genome_test'], | ||
file(params.test_data['generic']['unsorted_data']['unsorted_text']['genome_file'], | ||
checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
{ assert snapshot( | ||
file(process.out.sorted[0][1]).name | ||
).match("genome_sort") | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("unsorted_intervals_sort") { | ||
config "./sort_simple_bed.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id:'test'], | ||
file(params.test_data['generic']['unsorted_data']['unsorted_text']['intervals'], | ||
checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
{ assert snapshot( | ||
file(process.out.sorted[0][1]).name | ||
).match("interval_sort") | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("unsorted_csv_sort") { | ||
config "./sort_complex.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id:'test'], | ||
file(params.test_data['generic']['unsorted_data']['unsorted_text']['numbers_csv'], | ||
checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
{ assert snapshot( | ||
file(process.out.sorted[0][1]).name | ||
).match("csv_sort") | ||
} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("unsorted_csv_sort_stub") { | ||
config "./sort_complex.config" | ||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[id:'test'], | ||
file(params.test_data['generic']['unsorted_data']['unsorted_text']['numbers_csv'], | ||
checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll ( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() }, | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 @@ | ||
process { | ||
withName: GNU_SORT { | ||
ext.args = { "-t ';' -g -k 1,1 -k 2,2" } | ||
ext.suffix = { "csv.sorted" } | ||
} | ||
} |
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,6 @@ | ||
process { | ||
withName: GNU_SORT { | ||
ext.args = { "-k1,1 -k2,2n" } | ||
ext.suffix = { "bed.sorted" } | ||
} | ||
} |
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,6 @@ | ||
process { | ||
withName: GNU_SORT { | ||
ext.args = { "-k1,1 -k2,2n" } | ||
ext.suffix = { "genome.sorted" } | ||
} | ||
} |
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 @@ | ||
gnu/sort: | ||
- "modules/nf-core/gnu/sort/**" |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.