-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
275 additions
and
14 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 |
---|---|---|
|
@@ -9,4 +9,4 @@ results/ | |
test.xml | ||
testing* | ||
testing/ | ||
work/ | ||
work/ |
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,3 +1,4 @@ | ||
#!/usr/bin/python3 | ||
import pandas as pd | ||
import argparse | ||
|
||
|
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
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,3 +1,4 @@ | ||
#!/usr/bin/python3 | ||
import pandas as pd | ||
import argparse | ||
import os | ||
|
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
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
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
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,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::agat=1.4.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,48 @@ | ||
process AGAT_CONVERTSPGXF2GXF { | ||
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.4.0--pl5321hdfd78af_0' : | ||
'biocontainers/agat:1.4.0--pl5321hdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(gxf) | ||
|
||
output: | ||
tuple val(meta), path("*.agat.gff") , emit: output_gff | ||
tuple val(meta), path("*.log") , emit: log | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
agat_convert_sp_gxf2gxf.pl \\ | ||
--gxf $gxf \\ | ||
--output ${prefix}.agat.gff \\ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
agat: \$(agat_convert_sp_gxf2gxf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.agat.gff | ||
touch ${gxf}.agat.log | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
agat: \$(agat_convert_sp_gxf2gxf.pl --help | sed -n 's/.*(AGAT) - Version: \\(.*\\) .*/\\1/p') | ||
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,56 @@ | ||
name: agat_convertspgxf2gxf | ||
description: | | ||
Fixes and standardizes GFF/GTF files and outputs a cleaned GFF/GTF file | ||
keywords: | ||
- genome | ||
- gff | ||
- gtf | ||
- conversion | ||
tools: | ||
- agat: | ||
description: "AGAT is a toolkit for manipulation and getting information from | ||
GFF/GTF files" | ||
homepage: "https://github.com/NBISweden/AGAT" | ||
documentation: "https://agat.readthedocs.io/" | ||
tool_dev_url: "https://github.com/NBISweden/AGAT" | ||
doi: "10.5281/zenodo.3552717" | ||
licence: ["GPL v3"] | ||
identifier: biotools:AGAT | ||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- gxf: | ||
type: file | ||
description: Annotation file in GFF3/GTF format | ||
pattern: "*.{gff, gtf}" | ||
output: | ||
- output_gff: | ||
- meta: | ||
type: file | ||
description: Cleaned annotation file in GFF3 format | ||
pattern: "*.{gff}" | ||
- "*.agat.gff": | ||
type: file | ||
description: Cleaned annotation file in GFF3 format | ||
pattern: "*.{gff}" | ||
- log: | ||
- meta: | ||
type: file | ||
description: Log file of the conversion process | ||
pattern: "*.{log}" | ||
- "*.log": | ||
type: file | ||
description: Log file of the conversion process | ||
pattern: "*.{log}" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@toniher" | ||
maintainers: | ||
- "@toniher" |
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,60 @@ | ||
nextflow_process { | ||
|
||
name "Test Process AGAT_CONVERTSPGXF2GXF" | ||
script "../main.nf" | ||
process "AGAT_CONVERTSPGXF2GXF" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "agat" | ||
tag "agat/convertspgxf2gxf" | ||
|
||
test("sarscov2 genome [gtf]") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id: 'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.output_gff, | ||
process.out.versions).match() }, | ||
{ assert path(process.out.log[0][1]).exists() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 genome [gtf] - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id: 'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gtf', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
71 changes: 71 additions & 0 deletions
71
modules/nf-core/agat/convertspgxf2gxf/tests/main.nf.test.snap
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,71 @@ | ||
{ | ||
"sarscov2 genome [gtf] - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.agat.gff:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"genome.gtf.agat.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
"versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" | ||
], | ||
"log": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"genome.gtf.agat.log:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"output_gff": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.agat.gff:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-04-12T12:25:34.583294" | ||
}, | ||
"sarscov2 genome [gtf]": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.agat.gff:md5,7d7e9bcd82a2f0bb7d8a38f85e82f0bc" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,5ec6166c5c080ec4bc08a8fe55ada486" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.10.1" | ||
}, | ||
"timestamp": "2024-04-12T12:21:21.310464" | ||
} | ||
} |
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/convertspgxf2gxf: | ||
- "modules/nf-core/agat/convertspgxf2gxf/**" |
Oops, something went wrong.