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.
* pbsv * [automated] Fix linting with Prettier * version of pbsv module where all the tests pass * getting rid of un-need comments * updated: * changed website: * update * deleting accidental file * small tweak * updating the meta description * pretty * removing trailing space * space * newline * should pass version test * changed pbsv to pbsv/discover - seperating functionality * Update modules/nf-core/pbsv/discover/tests/main.nf.test Co-authored-by: Felix Lenner <[email protected]> * Update modules/nf-core/pbsv/discover/main.nf Co-authored-by: Felix Lenner <[email protected]> * Update modules/nf-core/pbsv/discover/main.nf Co-authored-by: Felix Lenner <[email protected]> * Update modules/nf-core/pbsv/discover/meta.yml Co-authored-by: Felix Lenner <[email protected]> * resolving comments * resolving comments * comments --------- Co-authored-by: nf-core-bot <[email protected]> Co-authored-by: Felix Lenner <[email protected]>
- Loading branch information
1 parent
8a94826
commit 6c32d37
Showing
5 changed files
with
244 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 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- "bioconda::pbsv=2.9.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,46 @@ | ||
process PBSV_DISCOVER { | ||
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/pbsv:2.9.0--h9ee0642_0': | ||
'biocontainers/pbsv:2.9.0--h9ee0642_0' }" | ||
|
||
input: | ||
tuple val(meta), path(bam) | ||
tuple val(meta2), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.svsig.gz"), emit: svsig | ||
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}" | ||
""" | ||
pbsv \\ | ||
discover \\ | ||
$args \\ | ||
${bam} \\ | ||
${prefix}.svsig.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pbsv: \$(pbsv --version |& sed '1!d ; s/pbsv //') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
echo | gzip > ${prefix}.svsig.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
pbsv: \$(pbsv --version |& sed '1!d ; s/pbsv //') | ||
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,54 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "pbsv_discover" | ||
description: "pbsv - PacBio structural variant (SV) signature discovery tool" | ||
keywords: | ||
- variant | ||
- pacbio | ||
- structural | ||
tools: | ||
- "pbsv": | ||
description: "pbsv - PacBio structural variant (SV) calling and analysis tools" | ||
homepage: "https://github.com/PacificBiosciences/pbsv" | ||
documentation: "https://github.com/PacificBiosciences/pbsv" | ||
tool_dev_url: "https://github.com/PacificBiosciences/pbsv" | ||
licence: ["BSD-3-clause-Clear"] | ||
identifier: "" | ||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- bam: | ||
type: file | ||
description: Sorted BAM/CRAM/SAM file | ||
pattern: "*.{bam,cram,sam}" | ||
- - meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information | ||
e.g. `[ id:'reference' ]` | ||
- fasta: | ||
type: file | ||
description: fasta file | ||
pattern: "*.fasta" | ||
output: | ||
- svsig: | ||
- meta: | ||
type: file | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "*.svsig.gz": | ||
type: file | ||
description: structural variant signatures files | ||
pattern: "*.svsig.gz" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@tanyasarkjain" | ||
maintainers: | ||
- "@tanyasarkjain" |
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,65 @@ | ||
nextflow_process { | ||
|
||
name "Test Process PBSV_DISCOVER" | ||
script "../main.nf" | ||
process "PBSV_DISCOVER" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "pbsv" | ||
tag "pbsv/discover" | ||
|
||
test("pbsv_bam") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
|
||
} | ||
|
||
test("pbsv_bam_stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/NA03697B2_downsampled.pbmm2.repeats.bam', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome3.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"pbsv_bam_stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.svsig.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,0cccc59cd231b14091d7a798e2aacc9a" | ||
], | ||
"svsig": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.svsig.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,0cccc59cd231b14091d7a798e2aacc9a" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-10-30T11:24:59.172558" | ||
}, | ||
"pbsv_bam": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.svsig.gz:md5,7c4859b65e51d8d2c9ab1e5338da17c1" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,0cccc59cd231b14091d7a798e2aacc9a" | ||
], | ||
"svsig": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.svsig.gz:md5,7c4859b65e51d8d2c9ab1e5338da17c1" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,0cccc59cd231b14091d7a798e2aacc9a" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-10-30T11:24:46.288774" | ||
} | ||
} |