Skip to content

Commit

Permalink
missed a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Jul 25, 2024
1 parent f9b0556 commit ecb923b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dcd_mapping/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _get_vrs_1_3_haplotype_id(cpb: CisPhasedBlock) -> str:
]
serialized_allele_ids = ",".join([f'"{a_id}"' for a_id in allele_ids])
serialized_haplotype = f'{{"members":[{serialized_allele_ids}],"type":"Haplotype"}}'
return sha512t24u(serialized_haplotype.encode("ascii"))
return f"ga4gh:VH.{sha512t24u(serialized_haplotype.encode("ascii"))}"


def _annotate_cpb_mapping(
Expand Down Expand Up @@ -274,7 +274,7 @@ def _annotate_cpb_mapping(
pre_mapped.extensions = [
Extension(name="vrs_v1.3_id", value=_get_vrs_1_3_haplotype_id(pre_mapped))
]
post_mapped.mappings = [
post_mapped.extensions = [
Extension(name="vrs_v1.3_id", value=_get_vrs_1_3_haplotype_id(post_mapped))
]

Expand Down
4 changes: 2 additions & 2 deletions src/dcd_mapping/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ class ScoreAnnotation(BaseModel):
This model defines what an individual mapping instance looks like in the final JSON.
"""

pre_mapped: Allele | CisPhasedBlock
post_mapped: Allele | CisPhasedBlock
pre_mapped: CisPhasedBlock | Allele
post_mapped: CisPhasedBlock | Allele
mavedb_id: StrictStr
relation: Literal["SO:is_homologous_to"] = "SO:is_homologous_to"
score: float | None
Expand Down

0 comments on commit ecb923b

Please sign in to comment.