-
Notifications
You must be signed in to change notification settings - Fork 157
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
Parse CNV:TR alleles from VCF #1561
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nakib103
requested changes
Dec 5, 2023
nakib103
requested changes
Dec 5, 2023
nakib103
requested changes
Dec 14, 2023
nakib103
approved these changes
Dec 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
merged with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ENSVAR-5875: parse CNV:TR alleles (tandem repeats) from VCF
tandem_repeat
consequences should be the same astandem_duplication
- requires: Ensembl/ensembl-variation#1057Motivation
VCF v4.4 (section 5.7) details how to represent tandem repeats using the symbolic allele
<CNV:TR>
. For instance,This is equivalent to having the following alternative allele string, as illustrated in the image below:
CAGCAGCAGCAGTTGTTG,CACACA
The following INFO fields are used to describe tandem repeats (not all are needed simultaneously, as some are redundant):
Logic
We first check if we have any sequence from
RUS
field to parse the<CNV:TR>
alleles. If not, we simply annotate the variant as a structural variant whoseclass_SO_term
istandem_repeat
(should return the same consequences astandem_duplication
, see Ensembl/ensembl-variation#1057).If the
RUS
field is defined, we recreate the alternative sequence by checking the total number of repeats for each allele (RN
1) and then we append the repeat unit sequence as many times as required by either using:RUC
field for that repeat unit as the number of times to append the repeat sequenceRB
field for that repeat unit divided by the length of its sequence (the resulting value is the same as theRUC
field -- when both are defined)To take the sequence of the alternative allele into consideration while calculating variant consequences, we will return a
VariationFeature
object instead of a SV2.Testing
Run VEP with CNV:TR examples, such as:
Currently, if
CIRB
andCIRUC
fields are defined in the VCF, a warning will be thrown stating that these fields are ignored. In the future, we could calculate all possible alternative alleles based onCIRB
andCIRUC
.Footnotes
If RN is omitted, each
<CNV:TR>
allele should have its respective unit repeated only 1 time. ↩Unless the alternative allele length is higher than
--max_sv_size
. ↩