Skip to content

Conversation

@nakib103
Copy link
Contributor

@nakib103 nakib103 commented Dec 10, 2025

population_to_haplotype.py

Currently the script is taking variant where GT is missing. For missing GT (.) we get -1 from the cyvcf2 module which passes through if gt: condition.

We can take the variant only if gt > 0 (-1 for missing, and 0 is for ref). Furthermore we need to take the correct variant allele as mentioned in the GT.

Beside this fix also added,

  • option to update the variant id with modified SPDI notation. If we update the SPDI notation using this script there is no need to later update the id using update_variant_id.py. But it would remove variants that are different but has same SPDI notation - see example 1 in this doc. Keep the original node id in the INFO/NODEID if variant id is updated.
  • Some variants can be practically same as one another but appear multiple time in the output (see example 2 in the doc). Keep only one variant in such case.

update_variant_id.py

  • VEP SPDI output can have number instead of sequence in deletion segment of SPDI, added logic to handle that.
  • Instead of using the original variant id to create hash key use ref and alt sequence. It let us avoid the hassle in case we need to fix something and run the script again (using the old method we could not run second time as the file would have new SPDI identifier which may not be unique and have clash)
  • Optionally add INFO/NODEID to keep the original node id in the INFO field.
  • Added logging.

Other fixes/updates

  • create_metadata_payload.py: Handle when human haplotype does not have chrom 1 and fails on example variant generation.
  • create_track_api_metadata.py: Add a space in description text.
  • generate_vep_config.py: Fix cache version in VEP config ini. Causes error when running non-vertebrate species.
  • update_fields.py: Keep INFO/NODEID info in the output.
  • bed_to_bigbed.nf: Fixed a bug introduced when type variable was switched from nextflow variable to bash variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants