Skip to content

Commit

Permalink
Merge branch 'CW-3773-chrM' into 'dev'
Browse files Browse the repository at this point in the history
ChrM annotations [CW-3773]

Closes CW-3773

See merge request epi2melabs/workflows/wf-human-variation!299
  • Loading branch information
SamStudio8 committed Jul 9, 2024
2 parents 83871ca + 0a178ce commit dba375b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ 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).

## [unreleased]
### Fixed
- ERROR_OUT_OF_CHROMOSOME_RANGE annotation in VCF on `chrM` variants due to different nomenclature used by SnpEff.
### Changed
- Reconciled workflow with wf-template v5.2.0
- Removed `FXN` homopolymer region from list of STRs genotyped by `--str` sub-workflow
Expand Down
8 changes: 6 additions & 2 deletions modules/local/common.nf
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ process annotate_vcf {
else
# SNP is slow to annotate, we'll break it apart by contig
# and merge it back later. filter the master VCF to current contig
bcftools view -r !{contig} input.vcf.gz | bgzip > input.chr.vcf.gz
# Also, relabel chrM as chrMT so SnpEff can annotate
bcftools view -r !{contig} input.vcf.gz | sed 's/^chrM\\t/chrMT\\t/' | bgzip > input.chr.vcf.gz
INPUT_FILENAME=input.chr.vcf.gz
OUTPUT_LABEL="!{output_label}.!{contig}"
fi
Expand All @@ -451,7 +453,9 @@ process annotate_vcf {
clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh37.vcf.gz"
fi
snpEff -Xmx!{task.memory.giga - 1}g ann -noStats -noLog $snpeff_db ${INPUT_FILENAME} > !{params.sample_name}.intermediate.snpeff_annotated.vcf
# Revert back chrMT to chrM
snpEff -Xmx!{task.memory.giga - 1}g ann -noStats -noLog $snpeff_db ${INPUT_FILENAME} | sed 's/^chrMT\\t/chrM\\t/' > !{params.sample_name}.intermediate.snpeff_annotated.vcf
# Add ClinVar annotations
SnpSift annotate $clinvar_vcf !{params.sample_name}.intermediate.snpeff_annotated.vcf | bgzip > !{params.sample_name}.wf_${OUTPUT_LABEL}.vcf.gz
tabix !{params.sample_name}.wf_${OUTPUT_LABEL}.vcf.gz
Expand Down

0 comments on commit dba375b

Please sign in to comment.