Skip to content

Commit

Permalink
Merge branch 'cw-994b' into 'dev'
Browse files Browse the repository at this point in the history
Fix slow snp:readStats

See merge request epi2melabs/workflows/wf-human-variation!11
  • Loading branch information
SamStudio8 committed Sep 22, 2022
2 parents 91e23bb + f6c89ea commit 898280e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
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).

## [v0.2.1]
## [v0.2.2]
### Fixed
* "No such property" when using the `minimap2_ubam` alignment step
* Slow performance on `minimap2_ubam` step when providing uCRAM
* Slow performance on `minimap2_ubam` step when providing CRAM as `--ubam`
* Slow performance on `snp:readStats` process
### Removed
* "Missing reference index" warning was unnecessary

Expand Down
12 changes: 8 additions & 4 deletions modules/local/wf-human-snp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,16 @@ process readStats {
cpus 1
input:
tuple path(reads), path(reads_index)
tuple path(ref), path(ref_idx), path(ref_cache)
output:
path "readstats.txt", emit: stats
"""
# using multithreading inside docker container does strange things
bamstats --threads 2 ${reads} > readstats.txt
"""
script:
def ref_path = "${ref_cache}/%2s/%2s/%s:" + System.getenv("REF_PATH")
"""
export REF_PATH=${ref_path}
# using multithreading inside docker container does strange things
bamstats --threads 2 ${reads} > readstats.txt
"""
}

process getVersions {
Expand Down
1 change: 1 addition & 0 deletions modules/local/wf-human-sv.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import groovy.json.JsonBuilder

// TODO bam2fq_ref is probably a bit silly here, we should just prevent minimap2_ubam working with referenced CRAM
process minimap2_ubam {
label "wf_human_sv"
cpus {params.ubam_map_threads + params.ubam_sort_threads + params.ubam_bam2fq_threads}
Expand Down
4 changes: 2 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params {
ubam_sort_threads = 3
ubam_bam2fq_threads = 1

wfversion = "v0.2.1" // specifies the container image version, not the workflow version
wfversion = "v0.2.2" // specifies the container image version, not the workflow version

aws_image_prefix = null
aws_queue = null
Expand Down Expand Up @@ -116,7 +116,7 @@ manifest {
description = 'consolidated human variation calling pipeline for ONT data'
mainScript = 'main.nf'
nextflowVersion = '>=21.05.0'
version = '0.2.1'
version = '0.2.2'
}

executor {
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
},
"wfversion": {
"type": "string",
"default": "v0.2.1",
"default": "v0.2.2",
"hidden": true
},
"monochrome_logs": {
Expand Down
2 changes: 1 addition & 1 deletion workflows/wf-human-snp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ workflow snp {
make_chunks.out.contigs_file)

// reporting
read_stats = readStats(bam)
read_stats = readStats(bam, ref)
software_versions = getVersions()
workflow_params = getParams()
vcf_stats = vcfStats(clair_final.final_vcf)
Expand Down

0 comments on commit 898280e

Please sign in to comment.