Skip to content

Commit

Permalink
Merge branch 'CW-3188' into 'dev'
Browse files Browse the repository at this point in the history
Fix joint phasing processing only a single chromosome

Closes CW-3188

See merge request epi2melabs/workflows/wf-human-variation!179
  • Loading branch information
SamStudio8 committed Dec 12, 2023
2 parents dfde912 + 6ee74cb commit 04c3b27
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ docker-run:

- if: $MATRIX_NAME == "wf-human-phase_all"
variables:
NF_BEFORE_SCRIPT: "wget -qO demo_data.tar.gz https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-human-str/demo_data.tar.gz && tar -xzvf demo_data.tar.gz"
NF_BEFORE_SCRIPT: "wget -q -O demo_data.tar.gz https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-human-variation/snp_demo.tar.gz && tar -xzvf demo_data.tar.gz"
NF_PROCESS_FILES: "modules/local/wf-human-sv.nf modules/local/wf-human-snp.nf workflows/phasing.nf"
NF_IGNORE_PROCESSES: "get_coverage,getVersions,getParams,failedQCReport,makeAlignmentReport,hap,phase_contig,post_clair_phase_contig,bed_filter"
NF_WORKFLOW_OPTS: "--mod false --cnv false --str false --sv --snp --joint_phasing --bam demo_data/demo.bam --ref demo_data/GCA_000001405.15_GRCh38_no_alt_analysis_set.fa.gz --sample_name demo --sex female --bam_min_coverage 0.00001 --annotation false"
NF_WORKFLOW_OPTS: "--mod false --cnv false --str false --sv --snp --joint_phasing --bam snp_demo/chr6_chr20.bam --bed snp_demo/chr6_chr20.bed --ref snp_demo/chr6_chr20.fasta --sample_name demo --sex female --bam_min_coverage 0.00001 --annotation false"


aws-run:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [v1.9.2]
### Fixed
- `--joint_phasing` generating single-chromosome VCF files.

## [v1.9.1]
### Changed
- ClinVar annotation of SVs has been temporarily removed due to not being correctly incorporated. SnpEff annotations are still produced as part of the final SV VCF.
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ manifest {
description = 'Basecalling, SNV calling, SV calling, modified base calling, CNV calling, and STR genotyping of human samples.'
mainScript = 'main.nf'
nextflowVersion = '>=23.04.2'
version = '1.9.1'
version = '1.9.2'
}

epi2melabs {
Expand Down
21 changes: 16 additions & 5 deletions workflows/phasing.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ process phase_all {
// Phase VCF for a contig
cpus 4
input:
tuple path(snp_vcf, stageAs: "SNP/snp.vcf.gz"), path(snp_vcf_tbi, stageAs: "SNP/snp.vcf.gz.tbi")
tuple path(sv_vcf, stageAs: "SV/sv.vcf.gz"), path(sv_vcf_tbi, stageAs: "SV/sv.vcf.gz.tbi"), val(is_sv_vcf)
tuple path(ref), path(ref_idx), path(ref_cache), env(REF_PATH)
tuple val(contig), path(xam), path(xam_idx)
tuple val(contig),
path(xam),
path(xam_idx),
path(snp_vcf, stageAs: "SNP/snp.vcf.gz"),
path(snp_vcf_tbi, stageAs: "SNP/snp.vcf.gz.tbi"),
path(sv_vcf, stageAs: "SV/sv.vcf.gz"),
path(sv_vcf_tbi, stageAs: "SV/sv.vcf.gz.tbi"),
val(is_sv_vcf),
path(ref),
path(ref_idx),
path(ref_cache),
env(REF_PATH)
output:
path("phased_${contig}.vcf.gz"), emit: vcf
path("phased_${contig}.vcf.gz.tbi"), emit: tbi
Expand Down Expand Up @@ -95,7 +103,10 @@ workflow phasing {
}

// Phase everything
phase_all(clair_vcf, struct_vcf, reference_ch, haplotagged_bams)
haplotagged_bams
.combine(clair_vcf)
.combine(struct_vcf)
.combine(reference_ch) | phase_all

// Collect phased files
vcfs = phase_all.out.vcf.collect()
Expand Down

0 comments on commit 04c3b27

Please sign in to comment.