-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fix custom annotation of breakends and non-supported SVs (exact mode) #1498
Fix custom annotation of breakends and non-supported SVs (exact mode) #1498
Conversation
## unsupported SV types | ||
if ($self->isa('Bio::EnsEMBL::VEP::Parser')) { | ||
$self->skipped_variant_msg("$abbrev type is not supported") unless $res; | ||
} |
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.
Should we not also report skipped variant even if it is ensembl-io parser?
## unsupported SV types | |
if ($self->isa('Bio::EnsEMBL::VEP::Parser')) { | |
$self->skipped_variant_msg("$abbrev type is not supported") unless $res; | |
} | |
## unsupported SV types - always use vep parser | |
Bio::EnsEMBL::VEP::Parser->skipped_variant_msg("$abbrev type is not supported") unless $res; |
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.
Hey Nakib! We only use ensembl-io directly for reading custom annotation: this means we will warn the user about the multiple types of variants that are skipped in custom annotation (and these can be a lot of them in some cases). Is this information useful by default or just noise?
What about if it's only printed for custom annotation if using --verbose
? Something like:
## unsupported SV types | |
if ($self->isa('Bio::EnsEMBL::VEP::Parser')) { | |
$self->skipped_variant_msg("$abbrev type is not supported") unless $res; | |
} | |
## unsupported SV types | |
if ($self->isa('Bio::EnsEMBL::VEP::Parser') || $self->param('verbose')) { | |
Bio::EnsEMBL::VEP::Parser->skipped_variant_msg("$abbrev type is not supported") unless $res; | |
} |
# do not match if only one of the types is defined | ||
return 0 if defined $ref_class xor defined $vf_class; |
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.
This is redundant with the next check as it makes sure both are defined.
# do not match if only one of the types is defined | |
return 0 if defined $ref_class xor defined $vf_class; |
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.
This is not redundant:
- The other check only returns 0 if both variables are defined and not equal.
- If one is defined but the other is not, then they are not equal, and should also return 0. This check is required for this condition.
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.
ah, sorry - I missed that it was an if
, you can modify the next condition to have unless -
return 0 unless defined $ref_class && defined $vf_class && $ref_class eq $vf_class
;
the condition can only be true if both are defined and equal.
# do not match if only one of the types is defined | ||
return 0 if defined $ref_class xor defined $vf_class; |
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.
ah, sorry - I missed that it was an if
, you can modify the next condition to have unless -
return 0 unless defined $ref_class && defined $vf_class && $ref_class eq $vf_class
;
the condition can only be true if both are defined and equal.
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.
LOTM !~
ENSVAR-5610, fixes #1397
Changelog
skipped_variant_msg()
with ensembl-io's parserDocumentation
--custom
usage for older versions of VEP (e111) public-plugins#728Testing
Run VEP with custom annotation in exact mode containing breakends and
NON_REF
SVs, such as:Run VEP using a command such as:
Output should not contain custom annotation for NON_REF and breakend variants.