Skip to content
Merged
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
27 changes: 23 additions & 4 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
"errorMessage": "Assembly level must be provided"
},
"assem_version": {
"anyOf": [{ "type": "string" }, { "type": "integer" }],
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"errorMessage": "Assembly version must be provided"
},
"sample_id": {
Expand Down Expand Up @@ -41,15 +48,24 @@
},
"map_order": {
"type": "string",
"errorMessage": "Map order"
"errorMessage": "Map order",
"enum": [
"length",
"unsorted"
]
},
"assem_reads": {
"type": "object",
"properties": {
"read_type": {
"type": "string",
"errorMessage": "Long read data type",
"enum": ["hifi", "clr", "ont", "illumina"]
"enum": [
"hifi",
"clr",
"ont",
"illumina"
]
},
"read_data": {
"type": "array",
Expand Down Expand Up @@ -77,7 +93,10 @@
"hic_aligner": {
"type": "string",
"errorMessage": "HiC Aligner - minimap2 (default), bwamem2",
"enum": ["minimap2", "bwamem2"]
"enum": [
"minimap2",
"bwamem2"
]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/local/assign/ancestral/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process ASSIGN_ANCESTRAL {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::python=3.9"
Expand Down
2 changes: 1 addition & 1 deletion modules/local/bamtobed/sort/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process BAMTOBED_SORT {
tag "$meta.id"
tag "${meta.id}"
label "process_high"

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process CRAM_FILTER_ALIGN_BWAMEM2_FIXMATE_SORT {
tag "$meta.id"
tag "${meta.id}"
label "process_high"

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process CRAM_FILTER_MINIMAP2_FILTER5END_FIXMATE_SORT {
tag "$meta.id"
tag "${meta.id}"
label "process_high"

container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
2 changes: 1 addition & 1 deletion modules/local/extract/ancestral/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process EXTRACT_ANCESTRAL {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::python=3.9"
Expand Down
25 changes: 6 additions & 19 deletions modules/local/extract/repeat/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process EXTRACT_REPEAT {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::perl=5.26.2"
Expand All @@ -8,38 +8,25 @@ process EXTRACT_REPEAT {
'biocontainers/perl:5.26.2' }"

input:
tuple val( meta ), path( file )
tuple val(meta), path(file)

output:
tuple val( meta ), path( "*.bed" ) , emit: bed
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('extract_repeat.pl'), val("1.0.0"), topic: versions, emit: versions_extractrepeat
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl

when:
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def prefix = task.ext.prefix ?: "${meta.id}"
"""
extract_repeat.pl $file > ${prefix}_repeats.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
extract_repeat.pl: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_repeats.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
extract_repeat.pl: $VERSION
END_VERSIONS
"""
}
15 changes: 2 additions & 13 deletions modules/local/find/half_coverage/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ process FIND_HALF_COVERAGE {

output:
tuple val(meta), path("*.bed") , emit: bed
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('findHalfcoverage.py'), eval("findHalfcoverage.py --version | sed 's/^.*.py //'"), topic: versions, emit: versions_findhalfcoverage
tuple val("${task.process}"), val('python'), eval("python --version | sed 's/^Python //'"), topic: versions, emit: versions_python

when:
task.ext.when == null || task.ext.when
Expand All @@ -23,23 +24,11 @@ process FIND_HALF_COVERAGE {
def prefix = task.ext.prefix ?: "halfcoverage"
"""
findHalfcoverage.py -c $bedfile -m $my_genome -d $depthgraph > ${prefix}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
findHalfcoverage.py: \$(findHalfcoverage.py --version | cut -d' ' -f2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "halfcoverage"
"""
touch ${prefix}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
findHalfcoverage.py: \$(findHalfcoverage.py --version | cut -d' ' -f2)
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/local/get/paired_contact_bed/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process GET_PAIRED_CONTACT_BED {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::coreutils=9.1"
Expand Down
17 changes: 3 additions & 14 deletions modules/local/graph/overall_coverage/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process GRAPH_OVERALL_COVERAGE {
tag "$meta.id"
tag "${meta.id}"
label "process_single"

conda "conda-forge::perl=5.26.2"
Expand All @@ -12,7 +12,8 @@ process GRAPH_OVERALL_COVERAGE {

output:
tuple val(meta), path("*.part") , emit: part
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('graph_overall_coverage.pl'), eval("graph_overall_coverage.pl --version"), topic: versions, emit: versions_graph_overall_coverage
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,23 +22,11 @@ process GRAPH_OVERALL_COVERAGE {
def prefix = task.ext.prefix ?: "${meta.id}"
"""
graph_overall_coverage.pl $bed > ${prefix}.part

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
graph_overall_coverage.pl: \$(graph_overall_coverage.pl --version)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.part

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
graph_overall_coverage.pl: \$(graph_overall_coverage.pl --version)
END_VERSIONS
"""
}
17 changes: 3 additions & 14 deletions modules/local/makecmap/cmap2bed/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process MAKECMAP_CMAP2BED {
tag "$meta.id"
tag "${meta.id}"
label 'process_single'

conda "conda-forge::python=3.9"
Expand All @@ -13,7 +13,8 @@ process MAKECMAP_CMAP2BED {

output:
tuple val(meta), path("*.bed"), emit: bedfile
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('cmap2bed.py'), eval("cmap2bed.py --version | sed 's/^.*.py //'"), topic: versions, emit: versions_cmap2bed
tuple val("${task.process}"), val('python'), eval("python --version | sed 's/^Python //'"), topic: versions, emit: versions_python

when:
task.ext.when == null || task.ext.when
Expand All @@ -23,23 +24,11 @@ process MAKECMAP_CMAP2BED {
"""
grep -v '#' $cmap > ${prefix}_${enzyme}_edited.cmap
cmap2bed.py -t ${prefix}_${enzyme}_edited.cmap -z $enzyme | sort -k1,1 -k2,2n > ${enzyme}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
cmap2bed.py: \$(cmap2bed.py --version | cut -d' ' -f2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_${enzyme}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
cmap2bed.py: \$(cmap2bed.py --version | cut -d' ' -f2)
END_VERSIONS
"""
}
17 changes: 3 additions & 14 deletions modules/local/makecmap/fa2cmapmulticolor/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process MAKECMAP_FA2CMAPMULTICOLOR {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::perl=5.26.2"
Expand All @@ -14,7 +14,8 @@ process MAKECMAP_FA2CMAPMULTICOLOR {
output:
tuple val(meta), path("*.cmap"), emit: cmap
path("*key.txt") , emit: cmapkey
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('fa2cmap_multi_color.pl'), eval("fa2cmap_multi_color.pl -v"), topic: versions, emit: versions_fa2cmap_multi_color
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl

when:
task.ext.when == null || task.ext.when
Expand All @@ -23,22 +24,10 @@ process MAKECMAP_FA2CMAPMULTICOLOR {
def args = task.ext.args ?: ''
"""
fa2cmap_multi_color.pl -i $fasta -e $enzyme 1 $args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
fa2cmap_multi_color.pl: \$(fa2cmap_multi_color.pl -v)
END_VERSIONS
"""

stub:
"""
touch ${enzyme}_key.cmap

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
fa2cmap_multi_color.pl: \$(fa2cmap_multi_color.pl -v)
END_VERSIONS
"""
}
17 changes: 3 additions & 14 deletions modules/local/makecmap/renamecmapids/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process MAKECMAP_RENAMECMAPIDS {
tag "$meta.id"
tag "${meta.id}"
label 'process_low'

conda "conda-forge::perl=5.26.2"
Expand All @@ -13,7 +13,8 @@ process MAKECMAP_RENAMECMAPIDS {

output:
tuple val(meta), path("*.cmap"), emit: renamedcmap
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('rename_cmapids.pl'), eval("rename_cmapids.pl -version"), topic: versions, emit: versions_renamedcmap
tuple val("${task.process}"), val('perl'), eval("perl --version | sed -n 's/.*(v\\([0-9.]\\+\\)).*/\\1/p'"), topic: versions, emit: versions_perl

when:
task.ext.when == null || task.ext.when
Expand All @@ -24,23 +25,11 @@ process MAKECMAP_RENAMECMAPIDS {

"""
rename_cmapids.pl -cmapfile $cmap -idx_key $keys $args > ${prefix}_EDITED.cmap

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
rename_cmapids.pl: \$(rename_cmapids.pl -version)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_EDITED.cmap

cat <<-END_VERSIONS > versions.yml
"${task.process}":
perl: \$(echo \$(perl --version 2>&1) | sed 's/^.*perl //; s/Using.*\$//')
rename_cmapids.pl: \$(rename_cmapids.pl -version)
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/local/pretext/graph/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process PRETEXT_GRAPH {
tag "$meta.id"
tag "${meta.id}"
label 'process_single'

container "quay.io/sanger-tol/pretext:0.0.9-yy5-c2"
Expand Down
4 changes: 2 additions & 2 deletions modules/local/selfcomp/alignmentblocks/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process SELFCOMP_ALIGNMENTBLOCKS {
tag "$meta.id"
tag "${meta.id}"
label "process_medium"

conda "conda-forge::python=3.9"
Expand All @@ -25,7 +25,7 @@ process SELFCOMP_ALIGNMENTBLOCKS {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
python: \$(echo \$(python --version 2>&1) | sed 's/^Python //')
pandas: \$(echo \$(pandas: python -c "import pandas as pd; print(pd.__version__)"))
pybedtools: \$(echo \$(pybedtools: python -c "import pybedtools as pb; print(pb.__version__)"))
build_alignment_block.py: \$(build_alignment_block.py --version | cut -d' ' -f2)
Expand Down
4 changes: 2 additions & 2 deletions modules/local/selfcomp/mapids/main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process SELFCOMP_MAPIDS {
tag "$meta.id"
tag "${meta.id}"
label "process_medium"

conda "conda-forge::python=3.9"
Expand All @@ -25,7 +25,7 @@ process SELFCOMP_MAPIDS {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(echo \$(python --version 2>&1) | sed 's/^.*python //; s/Using.*\$//')
python: \$(echo \$(python --version 2>&1) | sed 's/^Python //')
mapids.py: \$(mapids.py --version | cut -d' ' -f2)
END_VERSIONS
"""
Expand Down
Loading