Skip to content
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 src/dcd_mapping/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Provide dcd mapping version"""

dcd_mapping_version = "2024.1.0"
dcd_mapping_version = "2024.1.1"
10 changes: 2 additions & 8 deletions src/dcd_mapping/vrs_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,8 @@ def _construct_vrs_allele(
msg = "Must provide sequence id to construct pre-mapped VRS allele"
raise ValueError(msg)
allele.location.sequenceReference.refgetAccession = sequence_id
else:
allele.location.sequenceReference.label = hgvs_string.split(":")[0]
Comment on lines +626 to +627
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will always be a colon in the hgvs string right? Just making sure we don't ever raise a key error down below.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should always be a colon in the post-mapped hgvs string, as long as the hgvs string was created by the function _create_post_mapped_hgvs_strings.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are assuming that there's no colon in the transcript or chromosome name, though. I think that's a safe assumption, but if that assumption were to be wrong, then the post-mapped variant would not be created for the variant, and you're right that the associated error for that variant would be a KeyError.


if "dup" in hgvs_string:
allele.state.sequence = SequenceString(2 * _get_allele_sequence(allele))
Expand Down Expand Up @@ -675,14 +677,6 @@ def vrs_map(
:param silent: If true, suppress console output
:return: A list of mapping results
"""
# TODO address this hardcoding, and if we keep it, this should be a score set mapping error message
# if metadata.urn == "urn:mavedb:00000072-a-1":
# msg = f"No RefSeq accession is available for {metadata.urn}."
# if not silent:
# click.echo(msg)
# _logger.warning(msg)
# return None

Comment on lines -678 to -685
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this raise a mapping error now?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This score set raises a mapping error without the hardcoding now. This was addressed in the first release of the mapper for mavedb, but I hadn't removed the commented out code.

if metadata.target_gene_category == TargetType.PROTEIN_CODING and transcript:
return _map_protein_coding(
metadata,
Expand Down