Skip to content

Commit

Permalink
Merge pull request #1336 from olaaustine/update_pick_mane_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nuno-agostinho committed Jan 18, 2023
2 parents 6270b19 + f50d4a6 commit c894a81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
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

0 comments on commit c894a81

Please sign in to comment.