Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction to clinvar no date supplied #313

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:1.1.4", "config": {"workflow": {"sequencing_type": "genome"}, "cohorts": {}}, "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:1.1.4", "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
4 changes: 3 additions & 1 deletion helpers/prepare_aip_cohort.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ def process_pedigree(
ped_lines = []
for entry in ped_with_permutations:
for sample, mother, father in product(
entry['individual_id'], entry['paternal_id'], entry['maternal_id']
entry['individual_id'],
entry['paternal_id'] or ['0'],
entry['maternal_id'] or ['0'],
):
ped_lines.append(
'\t'.join(
Expand Down
2 changes: 1 addition & 1 deletion reanalysis/clinvar_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def main(date: str | None = None, folder: str | None = None):

dependency = None

# generate a new round of clinva decisions
# generate a new round of clinvar decisions
if not all(output.exists() for output in [clinvar_table_path, snv_vcf]):
dependency = generate_clinvar_table(clinvar_table_path, folder, snv_vcf, date)

Expand Down
9 changes: 5 additions & 4 deletions reanalysis/summarise_clinvar_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,13 @@ def main(
all_decisions = sort_decisions(all_decisions)

# if there's no defined config, write a local file
date_string = (
date.strftime('%Y-%m-%d') if date else datetime.now().strftime('%Y-%m-%d')
)
try:
temp_output = output_path(
f'{date.strftime("%Y-%m-%d")}_clinvar_table.json', category='tmp'
)
temp_output = output_path(f'{date_string}_clinvar_table.json', category='tmp')
except (ConfigError, KeyError):
temp_output = f'{date.strftime("%Y-%m-%d")}_clinvar_table.json'
temp_output = f'{date_string}_clinvar_table.json'

logging.info(f'temp JSON location: {temp_output}')

Expand Down
Loading