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

Updating changes for the pick option #1336

Merged
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
4 changes: 2 additions & 2 deletions modules/Bio/EnsEMBL/VEP/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ our %DEFAULTS = (
failed => 0,
core_type => 'core',
polyphen_analysis => 'humvar',
pick_order => [qw(mane canonical appris tsl biotype ccds rank length ensembl refseq )],
pick_order => [qw(mane_select mane_plus_clinical canonical appris tsl biotype ccds rank length ensembl refseq )],
terminal_width => 48,
vcf_info_field => 'CSQ',
ucsc_data_root => 'http://hgdownload.cse.ucsc.edu/goldenpath/',
Expand Down Expand Up @@ -370,7 +370,7 @@ our %VALID = (
terms => [qw(SO display NCBI)],
sift => [qw(s p b)],
polyphen => [qw(s p b)],
pick_order => [qw(mane canonical appris tsl biotype ccds rank length ensembl refseq)],
pick_order => [qw(mane_select mane_plus_clinical canonical appris tsl biotype ccds rank length ensembl refseq)],
nearest => [qw(transcript gene symbol)],
compress_output => [qw(gzip bgzip)],
);
Expand Down
23 changes: 13 additions & 10 deletions modules/Bio/EnsEMBL/VEP/OutputFactory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,15 @@ sub filter_StructuralVariationOverlapAlleles {
Example : $picked = $of->pick_worst_VariationFeatureOverlapAllele($vfoas);
Description: Selects one VariationFeatureOverlapAllele from a list using criteria
defined in the param pick_order. Criteria are in this default order:
1: mane
2: canonical
3: transcript support level
4: biotype (protein coding favoured)
5: consequence rank
6: transcript length
7: transcript from Ensembl?
8: transcript from RefSeq?
1: MANE_Select
2: MANE_Plus_Clinical
3: canonical
4: transcript support level
5: biotype (protein coding favoured)
6: consequence rank
7: transcript length
8: transcript from Ensembl?
9: transcript from RefSeq?
Returntype : Bio::EnsEMBL::Variation::VariationFeatureOverlapAllele
Exceptions : none
Caller : filter_VariationFeatureOverlapAlleles(),
Expand All @@ -704,7 +705,8 @@ sub pick_worst_VariationFeatureOverlapAllele {

# these will only be used by transcript types, default to 1 for others
# to avoid writing an else clause below
mane => 1,
mane_select => 1,
mane_plus_clinical => 1,
canonical => 1,
ccds => 1,
length => 0,
Expand All @@ -719,7 +721,8 @@ sub pick_worst_VariationFeatureOverlapAllele {
my $tr = $vfoa->feature;

# 0 is "best"
$info->{mane} = scalar(grep {$_->code eq 'MANE_Select'} @{$tr->get_all_Attributes()}) ? 0 : 1;
$info->{mane_select} = scalar(grep {$_->code eq 'MANE_Select'} @{$tr->get_all_Attributes()}) ? 0 : 1;
$info->{mane_plus_clinical} = scalar(grep {$_->code eq 'MANE_Plus_Clinical'} @{$tr->get_all_Attributes()}) ? 0 : 1;
$info->{canonical} = $tr->is_canonical ? 0 : 1;
$info->{biotype} = $tr->biotype eq 'protein_coding' ? 0 : 1;
$info->{ccds} = $tr->{_ccds} && $tr->{_ccds} ne '-' ? 0 : 1;
Expand Down