-
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.
Merge pull request #26 from GallVp/repeatmasker/rmOutToGFF3
Added repeatmasker/rmouttogff3
- Loading branch information
Showing
7 changed files
with
254 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
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,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "repeatmasker_rmouttogff3" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::repeatmasker=4.1.5" |
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 REPEATMASKER_RMOUTTOGFF3 { | ||
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/repeatmasker:4.1.5--pl5321hdfd78af_0': | ||
'biocontainers/repeatmasker:4.1.5--pl5321hdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(out) | ||
|
||
output: | ||
tuple val(meta), path("*.gff3") , emit: gff3 | ||
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}" | ||
|
||
""" | ||
rm_path=\$(dirname \$(realpath \$(which RepeatMasker))) | ||
PERL5LIB=\$rm_path rmOutToGFF3.pl \\ | ||
$out \\ | ||
> ${prefix}.gff3 | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
repeatmasker: \$(RepeatMasker -v | sed 's/RepeatMasker version //1') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.gff3 | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
repeatmasker: \$(RepeatMasker -v | sed 's/RepeatMasker version //1') | ||
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,51 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "repeatmasker_rmouttogff3" | ||
description: A utility script to assist to convert old RepeatMasker *.out files to version 3 gff files. | ||
keywords: | ||
- sort | ||
- example | ||
- genomics | ||
tools: | ||
- repeatmasker: | ||
description: | | ||
RepeatMasker is a program that screens DNA sequences for interspersed | ||
repeats and low complexity DNA sequences | ||
homepage: "https://www.repeatmasker.org/" | ||
documentation: "https://www.repeatmasker.org/webrepeatmaskerhelp.html" | ||
tool_dev_url: "https://github.com/rmhubley/RepeatMasker" | ||
licence: ["Open Software License v. 2.1"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
- out: | ||
type: file | ||
description: RepeatMasker out file | ||
pattern: "*.out" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
- gff3: | ||
type: file | ||
description: Sorted BAM/CRAM/SAM file | ||
pattern: "*.gff3" | ||
|
||
authors: | ||
- "@GallVp" | ||
maintainers: | ||
- "@GallVp" |
68 changes: 68 additions & 0 deletions
68
modules/gallvp/repeatmasker/rmouttogff3/tests/main.nf.test
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,68 @@ | ||
nextflow_process { | ||
|
||
name "Test Process REPEATMASKER_RMOUTTOGFF3" | ||
script "../main.nf" | ||
process "REPEATMASKER_RMOUTTOGFF3" | ||
|
||
tag "modules" | ||
tag "modules_gallvp" | ||
tag "repeatmasker" | ||
tag "repeatmasker/rmouttogff3" | ||
tag "repeatmasker/repeatmasker" | ||
|
||
setup { | ||
run("REPEATMASKER_REPEATMASKER") { | ||
script "../../repeatmasker" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("sarscov2 - genome - fasta - repeatmasker - out") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = REPEATMASKER_REPEATMASKER.out.out | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - genome - fasta - repeatmasker - out - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = input[0] = REPEATMASKER_REPEATMASKER.out.out | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
72 changes: 72 additions & 0 deletions
72
modules/gallvp/repeatmasker/rmouttogff3/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,72 @@ | ||
{ | ||
"sarscov2 - genome - fasta - repeatmasker - out - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d6620b9419b24f5807b1335468594601" | ||
], | ||
"gff3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d6620b9419b24f5807b1335468594601" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.3" | ||
}, | ||
"timestamp": "2024-08-07T12:41:49.415629" | ||
}, | ||
"sarscov2 - genome - fasta - repeatmasker - out": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.gff3:md5,5c991b62d99cf84149c1d1e90efa4f99" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,d6620b9419b24f5807b1335468594601" | ||
], | ||
"gff3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.gff3:md5,5c991b62d99cf84149c1d1e90efa4f99" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d6620b9419b24f5807b1335468594601" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.3" | ||
}, | ||
"timestamp": "2024-08-07T12:42:58.865985" | ||
} | ||
} |