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
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.2] - Ancient Destiny (H1)- [2025-01-30]
## [1.2.2] - Ancient Destiny (H2)- [2025-01-30]

Our 5th release for sanger-tol/treeval, correcting a software bug inside PretextGraph.

### Enhancements & Fixes

- Correction to the PRETEXT_GRAPH module, remade pretextgraph container with newest version 0.0.7.
- Converted shell block modules into script block modules

### Software dependencies

| Module | Old Version | New Versions |
| --------------------- | --------------- | --------------- |
Expand All @@ -23,6 +28,8 @@ Our 4th release for sanger-tol/treeval, focusing on refining methods.
- Remove extra characters
- Correction to the PRETEXT_GRAPH module.

### Software dependencies

| Module | Old Version | New Versions |
| --------------------- | ------------ | --------------- |
| pretextmap + samtools | 0.0.3 + 1.17 | 0.0.2-c4 + 1.17 |
Expand Down
14 changes: 7 additions & 7 deletions modules/local/concatblocks.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ process CONCATBLOCKS {
when:
task.ext.when == null || task.ext.when

shell:
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
cat "${mergeblocks}" \
|awk '{split($4,a,":");print $1"\t"$2"\t"$3"\t"a[1]"\t"$5"\t"$6}'\
|awk 'sqrt(($3-$2)*($3-$2)) > 5000'\
|sort -k 1,1 -k2,2n \
"""
cat "${mergeblocks}" \\
| awk '{split(\$4,a,":");print \$1"\\t"\$2"\\t"\$3"\\t"a[1]"\\t"\$5"\\t"\$6}' \\
| awk 'sqrt((\$3-\$2)*(\$3-\$2)) > 5000' \\
| sort -k 1,1 -k2,2n \\
> ${prefix}_chain.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/extract_telo.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ process EXTRACT_TELO {
tuple val( meta ), file("*bedgraph"), emit: bedgraph
path "versions.yml" , emit: versions

shell:
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
cat "${file}" |awk '{print $2"\t"$4"\t"$5}'|sed 's/>//g' > ${prefix}_telomere.bed
cat "${file}" |awk '{print $2"\t"$4"\t"$5"\t"((($5-$4)<0)?-($5-$4):($5-$4))}' | sed 's/>//g' > ${prefix}_telomere.bedgraph
"""
cat "${file}" | awk '{print \$2"\\t"\$4"\\t"\$5}' | sed 's/>//g' > ${prefix}_telomere.bed
cat "${file}" | awk '{print \$2"\\t"\$4"\\t"\$5"\\t"(((\$5-\$4)<0)?-(\$5-\$4):(\$5-\$4))}' | sed 's/>//g' > ${prefix}_telomere.bedgraph

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/gap_length.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ process GAP_LENGTH {
tuple val( meta ), file( "*bedgraph" ) , emit: bedgraph
path "versions.yml" , emit: versions

shell:
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
cat "${file}" \
| awk '{print $0"\t"sqrt(($3-$2)*($3-$2))}' > ${prefix}_gap.bedgraph
"""
cat "${file}" \\
| awk '{print \$0"\\t"sqrt((\$3-\$2)*(\$3-\$2))}' > ${prefix}_gap.bedgraph

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/get_largest_scaff.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ process GET_LARGEST_SCAFF {
env largest_scaff , emit: scaff_size
path "versions.yml" , emit: versions

shell:
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
largest_scaff=`head -n 1 "${file}" | cut -d$'\t' -f2`
script:
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
largest_scaff=\$(head -n 1 "${file}" | cut -d\$'\t' -f2)

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
10 changes: 5 additions & 5 deletions modules/local/getminmaxpunches.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ process GETMINMAXPUNCHES{
tuple val(meta), path ( '*max.bed' ) , optional: true , emit: max
path "versions.yml" , emit: versions

shell:
script:
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
cat "${bedfile}" \
| awk '{ if ($4 == 0) {print $0 >> "zero.bed" } else if ($4 > 1000) {print $0 >> "max.bed"}}'
"""
cat "${bedfile}" \\
| awk '{ if (\$4 == 0) {print \$0 >> "zero.bed" } else if (\$4 > 1000) {print \$0 >> "max.bed"}}'

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
Expand Down
13 changes: 6 additions & 7 deletions modules/local/reformat_intersect.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@ process REFORMAT_INTERSECT {
output:
tuple val( meta ), file( "*.bed" ), emit: bed

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

$/
cat "${file}" \
| awk '{print $0"\t"sqrt(($3-$2)*($3-$2))}'\
| sed 's/\./0/g' > ${prefix}.bed
"""
cat "${file}" \\
| awk '{print \$0"\\t"sqrt((\$3-\$2)*(\$3-\$2))}' \\
| sed 's/\\./0/g' > ${prefix}.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
12 changes: 5 additions & 7 deletions modules/local/rename_ids.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ process RENAME_IDS {
tuple val( meta ), file( "*bed" ) , emit: bed
path "versions.yml" , emit: versions

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

$/
cat "${file}" \
| sed 's/\./0/g' > ${prefix}_renamed.bed
"""
cat "${file}" \\
| sed 's/\\./0/g' > ${prefix}_renamed.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
rename_ids: \$(rename_ids.sh -v)
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
13 changes: 7 additions & 6 deletions modules/local/replace_dots.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ process REPLACE_DOTS {
tuple val( meta ), file( "*bed" ), emit: bed
path "versions.yml" , emit: versions

shell:
def prefix = task.ext.prefix ?: "${meta.id}"
script:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "9.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
$/
cat "${file}" | sed 's/\./0/g' > "${prefix}_nodot.bed"
"""
cat "${file}" \\
| sed 's/\\./0/g' > ${prefix}_nodot.bed

cat <<-END_VERSIONS > versions.yml
"${task.process}":
coreutils: $VERSION
coreutils: $VERSION
END_VERSIONS
/$
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
Expand Down
12 changes: 6 additions & 6 deletions modules/local/subsample_bam.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ process SUBSAMPLE_BAM {
tuple val(meta), path('*.bam'), emit: subsampled_bam
path "versions.yml", emit: versions

shell:
script:
def prefix = task.ext.prefix ?: "${meta.id}"
'''
percentage=`wc -c !{mergedbam} | cut -d$' ' -f1 | awk '{printf "%.2f\\n", 50000000000 / $0}'`
"""
percentage=\$(wc -c ${mergedbam} | cut -d' ' -f1 | awk '{printf "%.2f\\n", 50000000000 / \$0}')

samtools view -s $percentage -b !{mergedbam} > !{meta.id}_subsampled.bam
samtools view -s \$percentage -b ${mergedbam} > ${meta.id}_subsampled.bam

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

stub:
"""
Expand Down