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

Update metaschema to use VRS 2.0-alpha changes #476

Closed
korikuzma opened this issue Jul 29, 2023 · 6 comments · Fixed by #512
Closed

Update metaschema to use VRS 2.0-alpha changes #476

korikuzma opened this issue Jul 29, 2023 · 6 comments · Fixed by #512
Assignees
Labels
enhancement New feature or request priority:high High priority

Comments

@korikuzma
Copy link
Member

Will do this once #474 gets merged and VRS-Python has been updated to use pydantic V2 models

@korikuzma korikuzma added enhancement New feature or request priority:high High priority labels Jul 29, 2023
@korikuzma korikuzma self-assigned this Jul 29, 2023
@korikuzma
Copy link
Member Author

Per @ahwagner HGVS Dup Del Mode will be updated to:

This mode helps us interpret deletions and duplications that are represented as HGVS expressions.\
The mode can be set to `default`, `copy_number_count`, `copy_number_change`, `ref_len_expr`, or `literal_seq_expr`.


## Default Characteristics

- if baseline_copies is not set and endpoints are ambiguous:
    - copy_number_change
    - if copy_change not provided:
        - copy_change = `efo:0030067` (loss) if del, `efo:0030070` (gain) if dup
- elif baseline_copies is provided:
    - copy_number_count
    - copies are baseline_copies + 1 for dup, baseline_copies - 1 for del
- elif len dup > 100bp: (use outermost coordinates)
    - ref_len_expr (Allele)
      - state.length is 0 if deletion
- else:
    - literal_seq_expr (normalized LiteralSequenceExpression Allele)

1000_2000dup (assuming inter-residue) will be represented as:

{
  "type": "Allele",
  "location": {
    "sequence": "refseq:1",
    "start": 1000,
    "end": 2000
  },
  "state": {
    "type": "ReferenceLengthExpression",
    "length": 2000,
    "repeatSubunitLength": 1000
  }
}

1000_2000del (assuming inter-residue) will be represented as:

{
  "type": "Allele",
  "location": {
    "sequence": "refseq:1",
    "start": 1000,
    "end": 2000
  },
  "state": {
    "type": "ReferenceLengthExpression",
    "length": 0,
    "repeatSubunitLength": 1000
  }
}

@korikuzma
Copy link
Member Author

Per @ahwagner , we are going to change the HGVS Dup Del Modes to copy_number_count, copy_number_change and allele. We are also going to parameterize the sequence length returned in an Allele in #481 . Since this PR in vrs-python provides a cut off limit, we will use that for now until we get to #481

@korikuzma
Copy link
Member Author

korikuzma commented Aug 25, 2023

Per @ahwagner , we are going to change the HGVS Dup Del Modes to copy_number_count, copy_number_change and allele. We are also going to parameterize the sequence length returned in an Allele in #481 . Since this PR in vrs-python provides a cut off limit, we will use that for now until we get to #481

@ahwagner For allele, should the starting allele (before running through vrs-python's _normalize_allele function) be represented as an Allele with LSE or RLE? Here's my proposal:

if len dup > 100bp: (use outermost coordinates)
    - ref_len_expr
        - state.repeatSubunitLength
            - deletion: length of alt sequence
            - duplication: location.end - location.start
        - state.length
            - deletion: 0
            - duplication: state.repeatSubunitLength * 2
else:
    - literal_seq_expr

Update: Actually, I think it should just be LSE because _normalize_allele needs access to the state.sequence and doesn't look at state.repeatSubunitLength or state.length

@ahwagner
Copy link
Member

I think for now it is fine to just accept LSEs only prior to normalization. If we haven't already, we should probably also write a method that generates the literal sequence for an RLE.

@korikuzma
Copy link
Member Author

korikuzma commented Aug 25, 2023

TODO:

  • Cherry-pick this commit

@korikuzma korikuzma linked a pull request Sep 12, 2023 that will close this issue
@github-actions
Copy link

Closed by #512.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants