Skip to content

Commit

Permalink
Fix failure to export haplo GTs (#374)
Browse files Browse the repository at this point in the history
* fix failure to export haplo GTs to VCF
* Bump version: 3.2.0 → 3.2.1
  • Loading branch information
MattWellie authored Mar 26, 2024
1 parent fe4f176 commit a615f49
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.2.0
current_version = 3.2.1
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clinvar_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
curl --fail --silent --show-error -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type:application/json" \
-d '{"output": "generate_clinvar_${{ steps.date.outputs.date }}", "dataset": "talos", "accessLevel": "full", "repo": "automated-interpretation-pipeline", "commit": "${{ github.sha }}", "cwd": "reanalysis", "script": ["./clinvar_runner.py"], "description": "Generate Latest Clinvar Summaries", "image": "australia-southeast1-docker.pkg.dev/cpg-common/images/cpg_aip:3.2.0", "config": {"workflow": {"sequencing_type": "genome"}, "cohorts": {"talos": {"clinvar_filter": ["victorian clinical genetics services, murdoch childrens research institute"]}}}, "wait": false}' \
-d '{"output": "generate_clinvar_${{ steps.date.outputs.date }}", "dataset": "talos", "accessLevel": "full", "repo": "automated-interpretation-pipeline", "commit": "${{ github.sha }}", "cwd": "reanalysis", "script": ["./clinvar_runner.py"], "description": "Generate Latest Clinvar Summaries", "image": "australia-southeast1-docker.pkg.dev/cpg-common/images/cpg_aip:3.2.1", "config": {"workflow": {"sequencing_type": "genome"}, "cohorts": {"talos": {"clinvar_filter": ["victorian clinical genetics services, murdoch childrens research institute"]}}}, "wait": false}' \
https://server-a2pko7ameq-ts.a.run.app
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
contents: read

env:
VERSION: 3.2.0
VERSION: 3.2.1

jobs:
docker:
Expand Down
25 changes: 25 additions & 0 deletions reanalysis/hail_filter_sv.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@ def rearrange_filters(mt: hl.MatrixTable) -> hl.MatrixTable:
)


def fix_hemi_calls(mt: hl.MatrixTable) -> hl.MatrixTable:
"""
Hail's MT -> VCF export doesn't handle hemizygous calls
adjust the relevant single allele calls to a biallelic representation
going with Hom-Alt/Hom-Ref
if GT == 1, recast as [1, 1]
if GT == 0, recast as [0, 0]
Args:
mt ():
"""

return mt.annotate_entries(
GT=hl.if_else(
mt.GT.is_diploid(),
mt.GT,
hl.if_else(mt.GT.is_non_ref(), hl.call(1, 1), hl.call(0, 0)),
)
)


def main(
mt_path: str,
panelapp_path: str,
Expand Down Expand Up @@ -186,6 +208,9 @@ def main(
# filter to labelled entries
mt = mt.filter_rows(mt.info.categorybooleansv1 == ONE_INT)

# Hail's MT -> VCF export doesn't handle hemizygous calls
mt = fix_hemi_calls(mt)

# now write that badboi
hl.export_vcf(mt, vcf_out, tabix=True)

Expand Down
2 changes: 1 addition & 1 deletion reanalysis/reanalysis_global.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ default_memory = 'highmem'

[images]
gatk = 'australia-southeast1-docker.pkg.dev/cpg-common/images/gatk:4.2.6.1'
aip = 'australia-southeast1-docker.pkg.dev/cpg-common/images/cpg_aip:3.2.0'
aip = 'australia-southeast1-docker.pkg.dev/cpg-common/images/cpg_aip:3.2.1'
vep_110 = "australia-southeast1-docker.pkg.dev/cpg-common/images/vep_110:release_110.1"
cpg_workflows = "australia-southeast1-docker.pkg.dev/cpg-common/images/cpg_workflows:latest"

Expand Down
2 changes: 1 addition & 1 deletion reanalysis/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""

# Do not edit this file manually
__version__ = '3.2.0'
__version__ = '3.2.1'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def read_reqs(filename: str) -> list[str]:
name='automated-interpretation-pipeline',
description='CPG Variant Prioritisation',
long_description=readme,
version='3.2.0',
version='3.2.1',
author='Matthew Welland, CPG',
author_email=(
'[email protected], '
Expand Down

0 comments on commit a615f49

Please sign in to comment.