Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions modules/nf-core/paraphase/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ dependencies:
# renovate: datasource=conda depName=bioconda/minimap2
- bioconda::minimap2=2.30
# renovate: datasource=conda depName=bioconda/paraphase
- bioconda::paraphase=3.3.4
- bioconda::paraphase=3.4.0
# renovate: datasource=conda depName=bioconda/samtools
- bioconda::samtools=1.22.1
- bioconda::samtools=1.23
30 changes: 17 additions & 13 deletions modules/nf-core/paraphase/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ process PARAPHASE {

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/65/65e79cfe3a98637330bad85befbbb0baf72366040ce1911f60be8485eae28d55/data':
'community.wave.seqera.io/library/minimap2_paraphase_samtools:ab39f9ad1f898e08' }"
'community.wave.seqera.io/library/minimap2_paraphase_samtools:5cc32e174d09f608' }"

input:
tuple val(meta), path(bam), path(bai)
Expand All @@ -19,7 +19,9 @@ process PARAPHASE {
tuple val(meta), path("*.paraphase.bam.bai") , emit: bai
tuple val(meta), path("${prefix}_paraphase_vcfs/*.vcf.gz") , emit: vcf , optional: true
tuple val(meta), path("${prefix}_paraphase_vcfs/*.vcf.gz.{csi,tbi}"), emit: vcf_index, optional: true
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('minimap2'), eval('minimap2 --version') , emit: versions_minimap2 , topic: versions
tuple val("${task.process}"), val('paraphase'), eval('paraphase --version') , emit: versions_paraphase , topic: versions
tuple val("${task.process}"), val('samtools'), eval('samtools --version | sed \'1!d;s/.* //\'') , emit: versions_samtools , topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -40,17 +42,19 @@ process PARAPHASE {
$config_file \\
--out .

for vcf in ${prefix}_paraphase_vcfs/*.vcf;
do
bgzip \\
$args2 \\
--threads $task.cpus \\
\$vcf;
tabix \\
$args3 \\
--threads $task.cpus \\
\$vcf.gz;
done
if compgen -G "${prefix}_paraphase_vcfs/*.vcf" > /dev/null; then
for vcf in ${prefix}_paraphase_vcfs/*.vcf;
do
bgzip \\
$args2 \\
--threads $task.cpus \\
\$vcf;
tabix \\
$args3 \\
--threads $task.cpus \\
\$vcf.gz;
done
fi

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
75 changes: 63 additions & 12 deletions modules/nf-core/paraphase/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "paraphase"
description: "HiFi-based caller for highly homologous genes"
keywords:
Expand All @@ -12,9 +11,9 @@ tools:
documentation: "https://github.com/PacificBiosciences/paraphase"
tool_dev_url: "https://github.com/PacificBiosciences/paraphase"
doi: "10.1016/j.ajhg.2023.01.001"
licence: ["BSD-3-clause-Clear"]
licence:
- "BSD-3-clause-Clear"
identifier: ""

input:
- - meta:
type: map
Expand Down Expand Up @@ -51,7 +50,7 @@ input:
description: Config file
pattern: "*.yaml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- edam: http://edamontology.org/format_3750
output:
json:
- - meta:
Expand All @@ -64,7 +63,7 @@ output:
description: Summary of haplotype and variant calls
pattern: "*.paraphase.json"
ontologies:
- edam: http://edamontology.org/format_3464 # JSON
- edam: http://edamontology.org/format_3464
bam:
- - meta:
type: map
Expand Down Expand Up @@ -98,7 +97,7 @@ output:
description: compressed VCF file(s) per gene
pattern: "*.vcf.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989
vcf_index:
- - meta:
type: map
Expand All @@ -110,13 +109,65 @@ output:
description: compressed VCF file index
pattern: "*.vcf.gz.{tbi,csi}"
ontologies: []
versions_minimap2:
- - ${task.process}:
type: string
description: The name of the process
- minimap2:
type: string
description: The name of the tool
- minimap2 --version:
type: eval
description: The expression to obtain the version of the tool
versions_paraphase:
- - ${task.process}:
type: string
description: The name of the process
- paraphase:
type: string
description: The name of the tool
- paraphase --version:
type: eval
description: The expression to obtain the version of the tool
versions_samtools:
- - ${task.process}:
type: string
description: The name of the process
- samtools:
type: string
description: The name of the tool
- samtools --version:
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- minimap2:
type: string
description: The name of the tool
- minimap2 --version:
type: eval
description: The expression to obtain the version of the tool
- - ${task.process}:
type: string
description: The name of the process
- paraphase:
type: string
description: The name of the tool
- paraphase --version:
type: eval
description: The expression to obtain the version of the tool
- - ${task.process}:
type: string
description: The name of the process
- samtools:
type: string
description: The name of the tool
- samtools --version:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@fellen31"
maintainers:
Expand Down
45 changes: 39 additions & 6 deletions modules/nf-core/paraphase/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ nextflow_process {
path(process.out.vcf.get(0).get(1)).vcf.summary,
bam(process.out.bam.get(0).get(1)).getReadsMD5(),
file(process.out.bai.get(0).get(1)).name,
file(process.out.vcf_index.get(0).get(1)).name,
process.out.versions
file(process.out.vcf_index.get(0).get(1)).name
).match()
}
)
Expand Down Expand Up @@ -92,8 +91,43 @@ nextflow_process {
path(process.out.vcf.get(0).get(1)).vcf.summary,
bam(process.out.bam.get(0).get(1)).getReadsMD5(),
file(process.out.bai.get(0).get(1)).name,
file(process.out.vcf_index.get(0).get(1)).name,
process.out.versions
file(process.out.vcf_index.get(0).get(1)).name
).match()
}
)
}
}

test("homo_sapiens - [ bam, bai ], no_vcf") {

config "./nextflow.no_vcf.config"

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/test.sorted.bam.bai', checkIfExists: true),
]
input[1] = TABIX_BGZIP.out.output
input[2] = [
[ id:'test_config' ],
file(params.modules_testdata_base_path + 'generic/config/paraphase_config.yaml', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert process.out.vcf?.isEmpty() },
{ assert process.out.vcf_index?.isEmpty() },
{ assert snapshot(
file(process.out.json.get(0).get(1)),
process.out.bam.get(0).get(1).isEmpty(),
file(process.out.bai.get(0).get(1)).name
).match()
}
)
Expand Down Expand Up @@ -130,8 +164,7 @@ nextflow_process {
path(process.out.vcf.get(0).get(1)).vcf.summary,
bam(process.out.bam.get(0).get(1)).getReadsMD5(),
file(process.out.bai.get(0).get(1)).name,
file(process.out.vcf_index.get(0).get(1)).name,
process.out.versions
file(process.out.vcf_index.get(0).get(1)).name
).match()
}
)
Expand Down
Loading
Loading