| 1 | package Bio::DB::NextProt; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | our $VERSION = '1.05'; | |||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use REST::Client; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use Net::FTP::Tiny qw(ftp_get); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | my ($class, @args) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 13 | #my $self = $class->SUPER::new(@args); | ||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | my $self = {}; | |||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | $self->{_client} = REST::Client->new({host=> "http://www.nextprot.org", timeout => 10,}); | |||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | $self->{_query} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | $self->{_filter} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | $self->{_chromosome} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | $self->{_format} = "json"; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | bless($self, $class); | |||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | sub search_protein() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
search_protein: called CC=6 SCAR=21.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 27 | 1 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | 1 | my $path = "/rest/protein/list"; | |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | 1 | ▶ | $self->{_format} = $param{'-format'} if defined $param{'-format'}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | 1 | ▶ | if (defined $param{'-query'} && defined $param{'-filter'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
Condition33%1/3
defined $param{"-query"} and defined $param{"-filter"}
MC/DC0%0/2
defined $param{"-query"} and defined $param{"-filter"}
defined $param{"-query"}
defined $param{"-filter"}
Truth table33%1/3
A and B
A= defined $param{"-query"}B= defined $param{"-filter"}
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | $self->{_client}->GET($path."?query=".$param{'-query'}."&filter=".$param{'-filter'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | } elsif (defined $param{'-query'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | $self->{_client}->GET($path."?query=".$param{'-query'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | } elsif (defined $param{'-filter'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | $self->{_client}->GET($path."?filter=".$param{'-filter'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | 1 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | 1 | return $self->{_client}->responseContent(); | |||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | ▶ | sub search_cv() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
search_cv: called CC=6 SCAR=22.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 54 | 1 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||
| 56 | 1 | my $path = "/rest/cv/list"; | |||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||
| 58 | 1 | ▶ | $self->{_format} = $param{'-format'} if defined $param{'-format'}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | 1 | ▶ | if (defined $param{'-query'} && defined $param{'-filter'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
Condition33%1/3
defined $param{"-query"} and defined $param{"-filter"}
MC/DC0%0/2
defined $param{"-query"} and defined $param{"-filter"}
defined $param{"-query"}
defined $param{"-filter"}
Truth table33%1/3
A and B
A= defined $param{"-query"}B= defined $param{"-filter"}
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | 1 | $self->{_client}->GET($path."?query=".$param{'-query'}."&filter=".$param{'-filter'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | } elsif (defined $param{'-query'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | $self->{_client}->GET($path."?query=".$param{'-query'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | } elsif (defined $param{'-filter'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | $self->{_client}->GET($path."?filter=".$param{'-filter'}."&format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||
| 73 | 1 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | 1 | return $self->{_client}->responseContent(); | |||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | ▶ | sub get_protein_info() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_protein_info: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | my $path = "/rest/entry/"; | |||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | $self->{_format} = $param{'-format'} if defined $param{'-format'}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | ▶ | if (defined $param{'-query'} && $param{'-retrieve'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/3
defined $param{"-query"} and $param{"-retrieve"}
MC/DC0%0/2
defined $param{"-query"} and $param{"-retrieve"}
defined $param{"-query"}
$param{"-retrieve"}
Truth table0%0/3
A and B
A= defined $param{"-query"}B= $param{"-retrieve"}
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | $self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | } elsif (defined $param{'-query'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | $self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | return $self->{_client}->responseContent(); | |||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | 1 | ▶ | sub get_isoform_info() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_isoform_info: called CC=5 SCAR=18.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 104 | 1 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | my $path = "/rest/isoform/"; | |||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | 1 | ▶ | $self->{_format} = $param{'-format'} if defined $param{'-format'}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 1 | ▶ | if (defined $param{'-query'} && $param{'-retrieve'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%1/3
defined $param{"-query"} and $param{"-retrieve"}
MC/DC0%0/2
defined $param{"-query"} and $param{"-retrieve"}
defined $param{"-query"}
$param{"-retrieve"}
Truth table33%1/3
A and B
A= defined $param{"-query"}B= $param{"-retrieve"}
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | $self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||
| 114 | } elsif (defined $param{'-query'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | $self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||
| 119 | 1 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||
| 121 | 1 | return $self->{_client}->responseContent(); | |||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||
| 125 | 1 | ▶ | sub get_protein_cv_info() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_protein_cv_info: called CC=5 SCAR=18.7
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 126 | 1 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 127 | 1 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||
| 129 | 1 | my $path = "/rest/cv/"; | |||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | 1 | ▶ | $self->{_format} = $param{'-format'} if defined $param{'-format'}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | 1 | ▶ | if (defined $param{'-query'} && $param{'-retrieve'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%1/3
defined $param{"-query"} and $param{"-retrieve"}
MC/DC0%0/2
defined $param{"-query"} and $param{"-retrieve"}
defined $param{"-query"}
$param{"-retrieve"}
Truth table33%1/3
A and B
A= defined $param{"-query"}B= $param{"-retrieve"}
| |||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||
| 135 | 1 | $self->{_client}->GET($path.$param{'-query'}."/".$param{'-retrieve'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||
| 137 | } elsif (defined $param{'-query'}) { | ||||||||||||||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | $self->{_client}->GET($path.$param{'-query'}."?format=".$self->{_format}); | |||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | 1 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | 1 | return $self->{_client}->responseContent(); | |||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | ▶ | sub get_accession_list() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_accession_list: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | my $path = "ftp://ftp.nextprot.org/pub/current_release/ac_lists"; | |||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | my @file = (); | |||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | ▶ | if ( defined $param{'-chromosome'} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | $self->{_chromosome} = $param{'-chromosome'}; | |||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | my $chrom = $self->{_chromosome}; | |||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | ▶ | if ($chrom eq "all") { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_all.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 162 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_chromosome_".$chrom.".txt"); | |||||||||||||||||||||||||||||||||||||||||
| 164 | } | ||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||
| 166 | } elsif ( defined $param{'-evidence'} ) { | ||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | if ( $param{'-evidence'} eq "protein_level" ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 5 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_PE1_at_protein_level.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 170 | } elsif ( $param{'-evidence'} eq "transcript_level" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_PE2_at_transcript_level.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 172 | } elsif ( $param{'-evidence'} eq "homology" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_PE3_homology.txt") | |||||||||||||||||||||||||||||||||||||||||
| 174 | } elsif ( $param{'-evidence'} eq "predicted" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_PE4_predicted.txt") | |||||||||||||||||||||||||||||||||||||||||
| 176 | } elsif ( $param{'-evidence'} eq "uncertain" ) { | ||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | @file = ftp_get($path."/"."nextprot_ac_list_PE5_uncertain.txt") | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | return @file; | |||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | sub get_hpp_report() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_hpp_report: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | my $path = "ftp://ftp.nextprot.org/pub/current_release/custom/hpp"; | |||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | my @file = (); | |||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | if ( defined $param{'-chromosome'} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | my $chrom = $param{'-chromosome'}; | |||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | @file = ftp_get($path."/"."HPP_chromosome_".$chrom.".txt"); | |||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||
| 198 | } elsif ( defined $param{'-phospho'} ) { | ||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | @file = ftp_get($path."/"."HPP_entries_with_phospho_by_chromosome.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 200 | } elsif ( defined $param{'-nacetyl'} ) { | ||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | @file = ftp_get($path."/"."HPP_entries_with_nacetyl_by_chromosome.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | return @file; | |||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | ▶ | sub get_mapping() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_mapping: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 212 | 0 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||
| 214 | 0 | my $path = "ftp://ftp.nextprot.org/pub/current_release/mapping"; | |||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | my @file = (); | |||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | if ( defined $param{'-map'} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | my $db = $param{'-map'}; | |||||||||||||||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | ▶ | if ( $db eq 'ensembl_gene' ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 9 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | @file = ftp_get($path."/"."nextprot_ensg.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 222 | } elsif ( $db eq 'ensembl_protein' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | @file = ftp_get($path."/"."nextprot_ensp.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 224 | } elsif ( $db eq 'ensembl_unmapped' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | @file = ftp_get($path."/"."nextprot_ensp_unmapped.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 226 | } elsif ( $db eq 'ensembl_transcript' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | @file = ftp_get($path."/"."nextprot_enst.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 228 | } elsif ( $db eq 'ensembl_transcript_unmapped' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | @file = ftp_get($path."/"."nextprot_enst_unmapped.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 230 | } elsif ( $db eq 'geneid' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | @file = ftp_get($path."/"."nextprot_geneid.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 232 | } elsif ( $db eq 'hgnc' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | @file = ftp_get($path."/"."nextprot_hgnc.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 234 | } elsif ( $db eq 'mgi' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | @file = ftp_get($path."/"."nextprot_mgi.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 236 | } elsif ( $db eq 'refseq' ) { | ||||||||||||||||||||||||||||||||||||||||||
| 237 | 0 | @file = ftp_get($path."/"."nextprot_refseq.txt"); | |||||||||||||||||||||||||||||||||||||||||
| 238 | } | ||||||||||||||||||||||||||||||||||||||||||
| 239 | } | ||||||||||||||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | return @file; | |||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||
| 244 | } | ||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | ▶ | sub get_chromosome() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_chromosome: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | my %param = @_; | |||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | my @data = (); | |||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | my %table = (); | |||||||||||||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | my $path = "ftp://ftp.nextprot.org/pub/current_release/chr_reports"; | |||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | ▶ | if ( defined $param{'-chromosome'} ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | $self->{_chromosome} = $param{'-chromosome'}; | |||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | my $chrom = $self->{_chromosome}; | |||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | my $file = ftp_get($path."/"."nextprot_"."chromosome_".$chrom.".txt"); | |||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | my @data = split /^/m, $file; | |||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | for my $prot (@data) { | |||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | chomp $prot; | |||||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | if ($prot =~ m/^[A-Za-z|0-9\-]+\s+NX/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $prot =~ s/\s{2,}/\t/g; | |||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | my @temp = split(/\t/, $prot); | |||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||
| 270 | #if (exists $table{$temp[1]}) { | ||||||||||||||||||||||||||||||||||||||||||
| 271 | # print "redundancy detected: $temp[1]\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 272 | #} | ||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | $table{$temp[1]} = { | |||||||||||||||||||||||||||||||||||||||||
| 275 | gene_name => $temp[0], | ||||||||||||||||||||||||||||||||||||||||||
| 276 | position => $temp[2], | ||||||||||||||||||||||||||||||||||||||||||
| 277 | start_position => $temp[3], | ||||||||||||||||||||||||||||||||||||||||||
| 278 | stop_position => $temp[4], | ||||||||||||||||||||||||||||||||||||||||||
| 279 | existence => $temp[5], | ||||||||||||||||||||||||||||||||||||||||||
| 280 | proteomics => $temp[6], | ||||||||||||||||||||||||||||||||||||||||||
| 281 | antibody => $temp[7], | ||||||||||||||||||||||||||||||||||||||||||
| 282 | has_3d => $temp[8], | ||||||||||||||||||||||||||||||||||||||||||
| 283 | disease => $temp[9], | ||||||||||||||||||||||||||||||||||||||||||
| 284 | isoforms => $temp[10], | ||||||||||||||||||||||||||||||||||||||||||
| 285 | variants => $temp[11], | ||||||||||||||||||||||||||||||||||||||||||
| 286 | ptms => $temp[12], | ||||||||||||||||||||||||||||||||||||||||||
| 287 | description => $temp[13], | ||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||
| 290 | } | ||||||||||||||||||||||||||||||||||||||||||
| 291 | } | ||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||
| 295 | 0 | &reset_params(); | |||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | return %table; | |||||||||||||||||||||||||||||||||||||||||
| 298 | } | ||||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | ▶ | sub mapping { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
mapping: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | my $target = shift; | |||||||||||||||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | my $path = 'ftp://ftp.nextprot.org/pub/current_release/mapping/nextprot_'; | |||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | my $file = ftp_get($path.$target.".txt"); | |||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | my @data = split(/\n/, $file); | |||||||||||||||||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | my %map; | |||||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | for my $pair ( @data ) { | |||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | chomp $pair; | |||||||||||||||||||||||||||||||||||||||||
| 313 | 0 | my ($key, $value) = split(/\t/, $pair); | |||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | $map{$key} = $value; | |||||||||||||||||||||||||||||||||||||||||
| 315 | } | ||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | return %map; | |||||||||||||||||||||||||||||||||||||||||
| 318 | } | ||||||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||||||
| 320 | 4 | ▶ | sub reset_params() { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reset_params: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 321 | 4 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||
| 323 | 4 | $self->{_query} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 324 | 4 | $self->{_filter} = undef; | |||||||||||||||||||||||||||||||||||||||||
| 325 | } | ||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||
| 327 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||