-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add agat/spaddintrons * fix linting error with prettier * fix modules linting error in meta.yml * Update modules/nf-core/agat/spaddintrons/meta.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/agat/spaddintrons/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/agat/spaddintrons/environment.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/agat/spaddintrons/environment.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/agat/spaddintrons/meta.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/agat/spaddintrons/meta.yml Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * add meta map * add meta to output and update snapshot * add logic to use meta.id in determining output file name * Update modules/nf-core/agat/spaddintrons/tests/main.nf.test Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * fix logic for output file name in stub * remove trailing whitespace * fix snapshot --------- Co-authored-by: Anne Marie Noronha <anoronh4@users.noreply.github.com> Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: Sateesh <perisateesh@gmail.com>
- Loading branch information
1 parent
7105ae1
commit 6898156
Showing
6 changed files
with
204 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,7 @@ | ||
name: agat_spaddintrons | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::agat=1.2.0" |
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 @@ | ||
process AGAT_SPADDINTRONS { | ||
tag "$meta.id" | ||
label 'process_single' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/agat:1.2.0--pl5321hdfd78af_0': | ||
'biocontainers/agat:1.2.0--pl5321hdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(gff) | ||
path config | ||
|
||
output: | ||
tuple val(meta), path("${output}"), emit: gff | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def config_param = config ? "--config $config" : "" | ||
def prefix = meta.id ?: gff.getBaseName() | ||
output = "${prefix}.intron.gff" | ||
""" | ||
agat_sp_add_introns.pl \\ | ||
--gff $gff \\ | ||
$config_param \\ | ||
--out $output \\ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
agat: \$(agat_sp_add_introns.pl --help | sed '3!d; s/.*v//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = meta.id ?: gff.getBaseName() | ||
output = "${prefix}.intron.gff" | ||
""" | ||
touch ${output} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
agat: \$(agat_sp_add_introns.pl --help | sed '3!d; s/.*v//') | ||
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,43 @@ | ||
name: agat_spaddintrons | ||
description: Add intron features to gtf/gff file without intron features. | ||
keywords: | ||
- gtf | ||
- gff | ||
- introns | ||
tools: | ||
- agat: | ||
description: "Another Gff Analysis Toolkit (AGAT). Suite of tools to handle gene annotations in any GTF/GFF format." | ||
homepage: "https://agat.readthedocs.io/en/latest/" | ||
documentation: "https://agat.readthedocs.io/en/latest/" | ||
tool_dev_url: "https://github.com/NBISweden/AGAT" | ||
licence: ["GPL v3"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- gff: | ||
type: file | ||
description: Input gtf/gff file | ||
pattern: "*.{gff,gff3,gtf}" | ||
- config: | ||
type: file | ||
description: Optional input agat config file | ||
pattern: "*.{yaml,yml}" | ||
|
||
output: | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- gff: | ||
type: file | ||
description: Output gff3 file with introns | ||
pattern: "*.gff" | ||
|
||
authors: | ||
- "@anoronh4" | ||
maintainers: | ||
- "@anoronh4" |
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,61 @@ | ||
nextflow_process { | ||
|
||
name "Test Process AGAT_SPADDINTRONS" | ||
script "../main.nf" | ||
process "AGAT_SPADDINTRONS" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "agat" | ||
tag "agat/spaddintrons" | ||
|
||
test("homo_sapiens - gtf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], | ||
file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo_sapiens - gtf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], | ||
file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.gff.collect { file(it[1]).getName() } + | ||
process.out.versions ).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 @@ | ||
agat/spaddintrons: | ||
- "modules/nf-core/agat/spaddintrons/**" |