|
0
|
1 =head1 LICENSE
|
|
|
2
|
|
|
3 Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
|
|
|
4 Copyright [2016-2018] EMBL-European Bioinformatics Institute
|
|
|
5
|
|
|
6 Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
7 you may not use this file except in compliance with the License.
|
|
|
8 You may obtain a copy of the License at
|
|
|
9
|
|
|
10 http://www.apache.org/licenses/LICENSE-2.0
|
|
|
11
|
|
|
12 Unless required by applicable law or agreed to in writing, software
|
|
|
13 distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
15 See the License for the specific language governing permissions and
|
|
|
16 limitations under the License.
|
|
|
17
|
|
|
18 =head1 CONTACT
|
|
|
19
|
|
|
20 Ensembl <http://www.ensembl.org/info/about/contact/index.html>
|
|
|
21
|
|
|
22 =cut
|
|
|
23
|
|
|
24 =head1 NAME
|
|
|
25
|
|
|
26 REVEL
|
|
|
27
|
|
|
28 =head1 SYNOPSIS
|
|
|
29
|
|
|
30 mv REVEL.pm ~/.vep/Plugins
|
|
|
31 ./vep -i variations.vcf --plugin REVEL,/path/to/revel/data.tsv.gz
|
|
|
32
|
|
|
33 =head1 DESCRIPTION
|
|
|
34
|
|
|
35 This is a plugin for the Ensembl Variant Effect Predictor (VEP) that
|
|
|
36 adds the REVEL score for missense variants to VEP output.
|
|
|
37
|
|
|
38 Please cite the REVEL publication alongside the VEP if you use this resource:
|
|
|
39 https://www.ncbi.nlm.nih.gov/pubmed/27666373
|
|
|
40
|
|
|
41 REVEL scores can be downloaded from: https://sites.google.com/site/revelgenomics/downloads
|
|
|
42 and can be tabix-processed by:
|
|
|
43
|
|
|
44 cat revel_all_chromosomes.csv | tr "," "\t" > tabbed_revel.tsv
|
|
|
45 sed '1s/.*/#&/' tabbed_revel.tsv > new_tabbed_revel.tsv
|
|
|
46 bgzip new_tabbed_revel.tsv
|
|
|
47 tabix -f -s 1 -b 2 -e 2 new_tabbed_revel.tsv.gz
|
|
|
48
|
|
|
49 The tabix utility must be installed in your path to use this plugin.
|
|
|
50
|
|
|
51 =cut
|
|
|
52 package REVEL;
|
|
|
53
|
|
|
54 use strict;
|
|
|
55 use warnings;
|
|
|
56
|
|
|
57 use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp);
|
|
|
58
|
|
|
59 use Bio::EnsEMBL::Variation::Utils::BaseVepTabixPlugin;
|
|
|
60
|
|
|
61 use base qw(Bio::EnsEMBL::Variation::Utils::BaseVepTabixPlugin);
|
|
|
62
|
|
|
63 sub new {
|
|
|
64 my $class = shift;
|
|
|
65
|
|
|
66 my $self = $class->SUPER::new(@_);
|
|
|
67
|
|
|
68 $self->expand_left(0);
|
|
|
69 $self->expand_right(0);
|
|
|
70
|
|
|
71 $self->get_user_params();
|
|
|
72
|
|
|
73 return $self;
|
|
|
74 }
|
|
|
75
|
|
|
76 sub feature_types {
|
|
|
77 return ['Transcript'];
|
|
|
78 }
|
|
|
79
|
|
|
80 sub get_header_info {
|
|
|
81 return { REVEL => 'Rare Exome Variant Ensemble Learner '};
|
|
|
82 }
|
|
|
83
|
|
|
84 sub run {
|
|
|
85 my ($self, $tva) = @_;
|
|
|
86 # only for missense variants
|
|
|
87 return {} unless grep {$_->SO_term eq 'missense_variant'} @{$tva->get_all_OverlapConsequences};
|
|
|
88
|
|
|
89 my $vf = $tva->variation_feature;
|
|
|
90 my $allele = $tva->variation_feature_seq;
|
|
|
91 my ($res) = grep {
|
|
|
92 $_->{alt} eq $allele &&
|
|
|
93 $_->{start} eq $vf->{start} &&
|
|
|
94 $_->{end} eq $vf->{end} &&
|
|
|
95 $_->{altaa} eq $tva->peptide
|
|
|
96 } @{$self->get_data($vf->{chr}, $vf->{start}, $vf->{end})};
|
|
|
97
|
|
|
98 return $res ? $res->{result} : {};
|
|
|
99 }
|
|
|
100
|
|
|
101 sub parse_data {
|
|
|
102 my ($self, $line) = @_;
|
|
|
103
|
|
|
104 my ($c, $s, $ref, $alt, $refaa, $altaa, $revel_value) = split /\t/, $line;
|
|
|
105
|
|
|
106 return {
|
|
|
107 alt => $alt,
|
|
|
108 start => $s,
|
|
|
109 end => $s,
|
|
|
110 altaa => $altaa,
|
|
|
111 result => {
|
|
|
112 REVEL => $revel_value,
|
|
|
113 }
|
|
|
114 };
|
|
|
115 }
|
|
|
116
|
|
|
117 sub get_start {
|
|
|
118 return $_[1]->{start};
|
|
|
119 }
|
|
|
120
|
|
|
121 sub get_end {
|
|
|
122 return $_[1]->{end};
|
|
|
123 }
|
|
|
124
|
|
|
125 1;
|