-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
193 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "gtfsort" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::gtfsort=0.2.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,49 @@ | ||
process GTFSORT { | ||
tag "$gtf" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/gtfsort:0.2.2--h4ac6f70_0': | ||
'biocontainers/gtfsort:0.2.2--h4ac6f70_0' }" | ||
|
||
input: | ||
|
||
path gtf | ||
|
||
output: | ||
path "*.sorted.gtf", emit: gtf | ||
path "versions.yml", emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${gtf.baseName}" | ||
|
||
""" | ||
gtfsort \\ | ||
-i $gtf \\ | ||
-o ${prefix}.sorted.gtf \\ | ||
-t $task.cpus | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
gtfsort: \$(gtfsort --version |& sed 's/gtfsort //') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${gtf.baseName}" | ||
|
||
""" | ||
touch ${prefix}.sorted.gtf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
gtfsort: \$(gtfsort --version |& sed 's/gtfsort //') | ||
END_VERSIONS | ||
""" | ||
} |
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,34 @@ | ||
--- | ||
name: "gtfsort" | ||
description: Sort GTF files in chr/pos/feature order | ||
keywords: | ||
- sort | ||
- example | ||
- genomics | ||
tools: | ||
- "gtfsort": | ||
description: "A chr/pos/feature GTF sorter that uses a lexicographically-based index ordering algorithm." | ||
homepage: "https://github.com/alejandrogzi/gtfsort" | ||
documentation: "https://github.com/alejandrogzi/gtfsort" | ||
tool_dev_url: "https://github.com/alejandrogzi/gtfsort" | ||
licence: ["MIT"] | ||
|
||
input: | ||
- gtf: | ||
type: file | ||
description: Unsorted GTF/GFF file. | ||
pattern: "*.gtf" | ||
|
||
output: | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- gtf: | ||
type: file | ||
description: Sorted GTF file | ||
pattern: "*.gtf" | ||
authors: | ||
- "@georgiakes" | ||
maintainers: | ||
- "@georgiakes" |
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,51 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GTFSORT" | ||
script "../main.nf" | ||
process "GTFSORT" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gtfsort" | ||
|
||
test("hsapiens - gtf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("hsapiens - gtf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], 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,2 @@ | ||
gtfsort: | ||
- "modules/nf-core/gtfsort/**" |