Skip to content

Commit

Permalink
Merge branch 'CW-733' into 'dev'
Browse files Browse the repository at this point in the history
Restrict assembly to only reads from mpx

See merge request epi2melabs/workflow-containers/wf-mpx!6
  • Loading branch information
mattdmem committed Jun 9, 2022
2 parents 1f2dc22 + f6b07b1 commit 20b1867
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,9 +4,10 @@ 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).

## [unreleased]
## [v0.0.2]
### Changed
- Tidied up docs
- Restricting assembly to only reads that map to mpx

## [v0.0.1]

Expand Down
9 changes: 5 additions & 4 deletions main.nf
Expand Up @@ -110,17 +110,18 @@ process flyeAssembly {
label "wfmpx"
cpus params.threads
input:
tuple val(sample_id), val(type), path(sample_fastq), path(sample_stats)
tuple val(sample_id), val(type), path("${sample_id}.bam"), path("${sample_id}.bam.bai")
path reference
output:
tuple val(sample_id), val(type), path("medaka/consensus.fasta"), path("${sample_id}_assembly_mapped.bam"), path("${sample_id}_assembly.bed")
script:
"""
flye --nano-raw ${sample_fastq} -g 197k -t ${params.threads} --meta -o flye
samtools bam2fq ${sample_id}.bam > ${sample_id}_restricted.fastq
flye --nano-raw ${sample_id}_restricted.fastq -g 197k -t ${params.threads} --meta -o flye
# polish assembly with medaka
medaka_consensus -i ${sample_fastq} -t ${params.threads} -d flye/assembly.fasta ${params.medaka_options}
medaka_consensus -i ${sample_id}_restricted.fastq -t ${params.threads} -d flye/assembly.fasta ${params.medaka_options}
minimap2 -ax map-ont ${reference} medaka/consensus.fasta | samtools view -bh - | samtools sort - > ${sample_id}_assembly_mapped.bam
Expand Down Expand Up @@ -221,7 +222,7 @@ workflow pipeline {
workflow_params = getParams()

if (params.assembly == true) {
assembly = flyeAssembly(summary.sample, reference)
assembly = flyeAssembly(alignment.alignment, reference)
}


Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Expand Up @@ -17,7 +17,7 @@ params {
sample = null
sample_sheet = null
sanitize_fastq = false
wfversion = "v0.0.1"
wfversion = "v0.0.2"
threads = 4
assembly = true
medaka_options = null
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Expand Up @@ -127,7 +127,7 @@
},
"wfversion": {
"type": "string",
"default": "v0.0.1",
"default": "v0.0.2",
"hidden": true
},
"monochrome_logs": {
Expand Down

0 comments on commit 20b1867

Please sign in to comment.