Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pbsv/call #6915

Merged
merged 35 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0c9a172
pbsv
tanyasarkjain Sep 27, 2024
5339e16
[automated] Fix linting with Prettier
nf-core-bot Oct 22, 2024
dc0a3a1
version of pbsv module where all the tests pass
tanyasarkjain Oct 22, 2024
71cab1d
getting rid of un-need comments
tanyasarkjain Oct 22, 2024
ec70173
updated:
tanyasarkjain Oct 22, 2024
e6ffe06
changed website:
tanyasarkjain Oct 22, 2024
de912b1
update
tanyasarkjain Oct 22, 2024
763cc70
deleting accidental file
tanyasarkjain Oct 22, 2024
a4e0099
small tweak
tanyasarkjain Oct 22, 2024
1ded937
updating the meta description
tanyasarkjain Oct 22, 2024
b7a62e5
pretty
tanyasarkjain Oct 22, 2024
23b2631
removing trailing space
tanyasarkjain Oct 22, 2024
e8f1cc8
space
tanyasarkjain Oct 22, 2024
108d99c
newline
tanyasarkjain Oct 22, 2024
9c921cf
should pass version test
tanyasarkjain Oct 22, 2024
c77ddb2
Merge branch 'master' into pbsv
fellen31 Oct 25, 2024
d79b6f1
changed pbsv to pbsv/discover - seperating functionality
tanyasarkjain Oct 28, 2024
ba15e72
pbsv/call
tanyasarkjain Oct 31, 2024
a6f3b0f
update
tanyasarkjain Oct 31, 2024
24248d9
Merge branch 'master' into pbsv_call
tanyasarkjain Oct 31, 2024
e336cd5
fixed spacing
tanyasarkjain Oct 31, 2024
c932222
Merge branch 'pbsv_call' of https://github.com/tanyasarkjain/modules …
tanyasarkjain Oct 31, 2024
392466a
adding end line
tanyasarkjain Oct 31, 2024
d5f7523
small change
tanyasarkjain Oct 31, 2024
45ee91a
space
tanyasarkjain Oct 31, 2024
c1a9301
please work
tanyasarkjain Oct 31, 2024
a9ac5ea
spacing
tanyasarkjain Oct 31, 2024
5a3aa68
slight changes
tanyasarkjain Oct 31, 2024
79179ea
args
tanyasarkjain Oct 31, 2024
9d49f85
Update modules/nf-core/pbsv/call/main.nf
tanyasarkjain Oct 31, 2024
b0a8dd3
Merge branch 'master' into pbsv_call
tanyasarkjain Oct 31, 2024
e0060de
trailing space
tanyasarkjain Oct 31, 2024
5b2c442
medium
tanyasarkjain Nov 1, 2024
b67c8b6
change
tanyasarkjain Nov 1, 2024
337f0b8
medium
tanyasarkjain Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/nf-core/pbsv/call/environment.yml
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"
50 changes: 50 additions & 0 deletions modules/nf-core/pbsv/call/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
process PBSV_CALL {
tag "$meta.id"
label 'process_single'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this module can use multiple threads consider changing from process_single to process_medium. I'm not sure how much impact this has since I haven't run pbsv myself. Fig.5 in this paper suggests maybe not that much, but they don't report discover and call separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! Might as well do it, thank you!


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(svsig)
tuple val(meta2), path(fasta)

output:
tuple val(meta), path("*.vcf"), emit: vcf
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 \\
call \\
$args \\
-j ${task.cpus} \\
${fasta} \\
${svsig} \\
${prefix}.vcf

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}"
"""
touch ${prefix}.vcf

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pbsv: \$(pbsv --version |& sed '1!d ; s/pbsv //')
END_VERSIONS
"""
}
50 changes: 50 additions & 0 deletions modules/nf-core/pbsv/call/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "pbsv_call"
description: "pbsv/call - PacBio structural variant (SV) calling and analysis tools"
keywords:
- variant
- pacbio
- genomics
tools:
- "pbsv":
description: "pbsv - PacBio structural variant (SV) calling and analysis tools"
homepage: "https://github.com/PacificBiosciences/"
documentation: "https://github.com/PacificBiosciences/"
tool_dev_url: "https://github.com/PacificBiosciences/"
licence: ["BSD-3-clause-Clear"]
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- svsig:
type: file
description: structural variant file
- - meta2:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'reference']`
- fasta:
type: file
description: fasta file used as reference
output:
- vcf:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- "*.vcf":
type: file
description: structural variant file
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@tanyasarkjain"
maintainers:
- "@tanyasarkjain"
68 changes: 68 additions & 0 deletions modules/nf-core/pbsv/call/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
nextflow_process {
name "Test Process PBSV_CALL"
script "../main.nf"
process "PBSV_CALL"

tag "modules"
tag "modules_nfcore"
tag "pbsv"
tag "pbsv/call"

test("pbsv-call - [svsig] [fasta]") {
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/svsig/NA03697B2_new.pbmm2.repeats.svsig.gz', 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 {
def vcfFile = path(process.out.vcf[0][1]).vcf
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.vcf[0][1]).name,
process.out.versions,
vcfFile.variantsMD5).match() },
{ assert vcfFile.chromosomes == ['chr19:45760000-45770300'] as Set}
)
}
}

test("pbsv-call - [svsig] [fasta] - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/svsig/NA03697B2_new.pbmm2.repeats.svsig.gz', 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() }
)
}
}
}
52 changes: 52 additions & 0 deletions modules/nf-core/pbsv/call/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"pbsv-call - [svsig] [fasta]": {
"content": [

"test.vcf",
[
"versions.yml:md5,a8d62b1557c995607b315babfe0bd28b"
],
"39821c95936a6f9539d3ad53e6562f99"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-30T16:50:00.253251"
},
"pbsv-call - [svsig] [fasta] - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,a8d62b1557c995607b315babfe0bd28b"
],
"vcf": [
[
{
"id": "test",
"single_end": false
},
"test.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,a8d62b1557c995607b315babfe0bd28b"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-30T21:38:47.484071"
}
}
Loading