| 1 | package WWW::PDB; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | WWW::PDB - Perl interface to the Protein Data Bank | ||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | use WWW::PDB qw(:all); | ||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | # set directory for caching downloads | ||||||||||||||||||||||||||||||||||||||||||
| 12 | WWW::PDB->cache('/foo/bar'); | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | my $fh = get_structure('2ili'); | ||||||||||||||||||||||||||||||||||||||||||
| 15 | print while <$fh>; | ||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | my @pdbids = WWW::PDB->keyword_query('carbonic anhydrase'); | ||||||||||||||||||||||||||||||||||||||||||
| 18 | for(@pdbids) { | ||||||||||||||||||||||||||||||||||||||||||
| 19 | my $citation = WWW::PDB->get_primary_citation_title($_), | ||||||||||||||||||||||||||||||||||||||||||
| 20 | my @chains = WWW::PDB->get_chains($_); | ||||||||||||||||||||||||||||||||||||||||||
| 21 | printf("%s\t%s\t[%s]\n", $_, $citation, join(', ', @chains)); | ||||||||||||||||||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | my $seq = q( | ||||||||||||||||||||||||||||||||||||||||||
| 25 | VLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTK | ||||||||||||||||||||||||||||||||||||||||||
| 26 | TYFPHFDLSHGSAQVKGHGKKVADALTAVAHVDDMPNAL | ||||||||||||||||||||||||||||||||||||||||||
| 27 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 28 | print WWW::PDB->blast($seq, 10.0, 'BLOSUM62', 'HTML'); | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | The Protein Data Bank (PDB) was established in 1971 as a repository of the | ||||||||||||||||||||||||||||||||||||||||||
| 33 | atomic coordinates of protein structures (Bernstein I<et al.>, 1997). It | ||||||||||||||||||||||||||||||||||||||||||
| 34 | has since outgrown that role, proving invaluable not only to the research | ||||||||||||||||||||||||||||||||||||||||||
| 35 | community but also to students and educators (Berman I<et al.>, 2002). | ||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | L<WWW::PDB> is a Perl interface to the Protein Data Bank. It provides | ||||||||||||||||||||||||||||||||||||||||||
| 38 | functions for retrieving files, optionally caching them locally. | ||||||||||||||||||||||||||||||||||||||||||
| 39 | Additionally, it wraps the functionality of the PDB's SOAP web services. | ||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 2 | ▶ | use 5.006; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 45 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | 2 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 48 | 2 | ▶ | use Exporter; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 49 | 2 | ▶ | use Fcntl; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 2 | ▶ | use File::Path; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | 2 | ▶ | use File::Spec; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 52 | 2 | ▶ | use IO::File; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 53 | 2 | ▶ | use IO::Uncompress::Gunzip; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 54 | 2 | ▶ | use Net::FTP; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 55 | 2 | ▶ | use SOAP::Lite; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||
| 57 | 2 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 58 | 2 | BOOLEAN => 0, | |||||||||||||||||||||||||||||||||||||||||
| 59 | DOUBLE => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 60 | INT => 2, | ||||||||||||||||||||||||||||||||||||||||||
| 61 | SELF => 3, | ||||||||||||||||||||||||||||||||||||||||||
| 62 | STRING => 4, | ||||||||||||||||||||||||||||||||||||||||||
| 63 | 2 | }; | |||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 2 | our @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||
| 66 | 2 | our $VERSION = '0.00_03'; | |||||||||||||||||||||||||||||||||||||||||
| 67 | 2 | $VERSION = eval $VERSION; | |||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 2 | our %EXPORT_TAGS = ( | |||||||||||||||||||||||||||||||||||||||||
| 70 | file => [qw(get_structure get_structure_factors)], | ||||||||||||||||||||||||||||||||||||||||||
| 71 | status => [qw(get_status is_current is_obsolete is_unreleased | ||||||||||||||||||||||||||||||||||||||||||
| 72 | is_model is_unknown)], | ||||||||||||||||||||||||||||||||||||||||||
| 73 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 74 | 2 | our @EXPORT_OK = map {@$_} values %EXPORT_TAGS; | |||||||||||||||||||||||||||||||||||||||||
| 75 | 2 | $EXPORT_TAGS{all} = \@EXPORT_OK; | |||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||
| 77 | 2 | my($uri, $proxy, $ftp, $cache, $soap); | |||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | =head1 FUNCTIONS | ||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | =head2 CUSTOMIZATION | ||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | Let's start with some functions that let you customize how the module does | ||||||||||||||||||||||||||||||||||||||||||
| 84 | its job. You probably won't play with any of these very often (if at all) | ||||||||||||||||||||||||||||||||||||||||||
| 85 | except for C<cache>, which is recommended for anyone that expects to do | ||||||||||||||||||||||||||||||||||||||||||
| 86 | extensive work with a set of files: that way you don't waste resources | ||||||||||||||||||||||||||||||||||||||||||
| 87 | downloading them each time. | ||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | =item WWW::PDB->ftp( [ $HOST ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | Returns the host name for the PDB FTP archive, first setting it to $FTP if | ||||||||||||||||||||||||||||||||||||||||||
| 94 | it's specified. Default value is F<ftp.wwpdb.org>. | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | 2 | ▶ | sub ftp { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ftp: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 99 | 2 | ▶ | return $ftp = $_[1] ? $_[1] : $ftp || 'ftp.wwpdb.org'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$ftp or "ftp.wwpdb.org"
MC/DC100%1/1
$ftp or "ftp.wwpdb.org"
$ftp
Truth table100%2/2
A
A= $ftp
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | =item WWW::PDB->cache( [ $DIR ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | Returns the local cache directory, first setting it to $DIR if it's | ||||||||||||||||||||||||||||||||||||||||||
| 105 | specified. If C<defined>, the module will look for files here first and | ||||||||||||||||||||||||||||||||||||||||||
| 106 | also use the directory to store any downloads. | ||||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 4 | ▶ | sub cache { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cache: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | 4 | ▶ | $cache = $_[1] if $_[1]; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 4 | return $cache; | |||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | =item WWW::PDB->ns( [ $URI ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||
| 117 | Returns the namespace URI for the PDB web services, first setting it to $URI | ||||||||||||||||||||||||||||||||||||||||||
| 118 | if it's specified. Default value is http://www.pdb.org/pdb/services/pdbws. | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | 3 | ▶ | sub ns { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ns: called CC=5 SCAR=16.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | 3 | my $tmp = $uri; | |||||||||||||||||||||||||||||||||||||||||
| 124 | 3 | ▶ | $uri = $_[1] ? $_[1] : $uri || 'http://www.pdb.org/pdb/services/pdbws'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$uri or "http://www.pdb.org/pdb/services/pdbws"
MC/DC100%1/1
$uri or "http://www.pdb.org/pdb/services/pdbws"
$uri
Truth table100%2/2
A
A= $uri
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | 3 | ▶ | $_[0]->soap->ns($uri) unless $tmp && $tmp eq $uri; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$tmp and $tmp eq $uri
MC/DC50%1/2
$tmp and $tmp eq $uri
$tmp
$tmp eq $uri
Truth table66%2/3
A and B
A= $tmpB= $tmp eq $uri
| |||||||||||||||||||||||||||||||||||||||||||
| 126 | 3 | return $uri; | |||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||
| 129 | =item WWW::PDB->proxy( [ $URI ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | Returns the proxy for the PDB web services, first setting it to $URI if it's | ||||||||||||||||||||||||||||||||||||||||||
| 132 | specified. Default value is http://www.pdb.org/pdb/services/pdbws. | ||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | 3 | ▶ | sub proxy { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
proxy: called CC=5 SCAR=16.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 137 | 3 | my $tmp = $proxy; | |||||||||||||||||||||||||||||||||||||||||
| 138 | 3 | ▶ | $proxy = $_[1] ? $_[1] : $proxy || 'http://www.pdb.org/pdb/services/pdbws'; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$proxy or "http://www.pdb.org/pdb/services/pdbws"
MC/DC100%1/1
$proxy or "http://www.pdb.org/pdb/services/pdbws"
$proxy
Truth table100%2/2
A
A= $proxy
| |||||||||||||||||||||||||||||||||||||||||||
| 139 | 3 | ▶ | $_[0]->soap->proxy($proxy) unless $tmp && $tmp eq $proxy; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$tmp and $tmp eq $proxy
MC/DC50%1/2
$tmp and $tmp eq $proxy
$tmp
$tmp eq $proxy
Truth table66%2/3
A and B
A= $tmpB= $tmp eq $proxy
| |||||||||||||||||||||||||||||||||||||||||||
| 140 | 3 | return $proxy; | |||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | =item WWW::PDB->soap( [ $CLIENT ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||
| 145 | Returns the client L<SOAP::Lite> object used by this module to talk to | ||||||||||||||||||||||||||||||||||||||||||
| 146 | the PDB's SOAP interface, first setting it to $CLIENT if it's specified. | ||||||||||||||||||||||||||||||||||||||||||
| 147 | It's best not to access it directly, but if you must, this is how. | ||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||
| 151 | 3 | ▶ | sub soap { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
soap: called CC=3 SCAR=14.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 152 | 3 | ▶ | return $soap = $_[1] ? $_[1] : $soap || | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$soap or "SOAP::Lite"->ns($_[0]->ns)->proxy($_[0]->proxy)
MC/DC0%0/2
$soap or "SOAP::Lite"->ns($_[0]->ns)->proxy($_[0]->proxy)
$soap
"SOAP::Lite"->ns($_[0]->ns)->proxy($_[0]->proxy)
Truth table33%1/3
A or B
A= $soapB= "SOAP::Lite"->ns($_[0]->ns)->proxy($_[0]->proxy)
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | SOAP::Lite->ns($_[0]->ns)->proxy($_[0]->proxy); | ||||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||
| 156 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||
| 158 | =head2 FILE RETRIEVAL | ||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||
| 160 | Each of the following functions takes a PDB ID as input and returns a file | ||||||||||||||||||||||||||||||||||||||||||
| 161 | handle (or C<undef> on failure). You can import these into your namespace | ||||||||||||||||||||||||||||||||||||||||||
| 162 | with the C<file> tag, as in C<use WWW::PDB qw(:file)>. | ||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||
| 164 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||
| 166 | =item get_structure( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | Retrieves the structure in PDB format. | ||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||
| 170 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | 1 | ▶ | sub get_structure { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_structure: called CC=4 SCAR=15.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 173 | 1 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table33%1/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 174 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||||||||||||
| 176 | 1 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 1 | my $pdbid = lc(shift); | |||||||||||||||||||||||||||||||||||||||||
| 178 | 1 | ▶ | return $pdbid =~ /^.(..).$/ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 179 | ? $class->_get_file(qw(pub pdb data structures divided pdb), $1, | ||||||||||||||||||||||||||||||||||||||||||
| 180 | "pdb${pdbid}.ent.gz") : undef; | ||||||||||||||||||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | =item get_structure_factors( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | Retrieves the structure factors file. | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | 1 | ▶ | sub get_structure_factors { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_structure_factors: called CC=4 SCAR=15.6
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 190 | 1 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table33%1/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 191 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | 1 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 194 | 1 | my $pdbid = lc(shift); | |||||||||||||||||||||||||||||||||||||||||
| 195 | 1 | ▶ | return $pdbid =~ /^.(..).$/ | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 196 | ? $class->_get_file(qw(pub pdb data structures divided | ||||||||||||||||||||||||||||||||||||||||||
| 197 | structure_factors), $1, "r${pdbid}sf.ent.gz") : undef; | ||||||||||||||||||||||||||||||||||||||||||
| 198 | } | ||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||
| 200 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||
| 202 | =head2 PDB ID STATUS | ||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||
| 204 | The following functions deal with the status of PDB IDs. You can import | ||||||||||||||||||||||||||||||||||||||||||
| 205 | them into your namespace with the C<status> tag: | ||||||||||||||||||||||||||||||||||||||||||
| 206 | C<use WWW::PDB qw(:status)>. | ||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||
| 208 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||
| 210 | =item get_status( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||
| 212 | Finds the status of the structure with the given $PDBID. Return is in | ||||||||||||||||||||||||||||||||||||||||||
| 213 | C<qw(CURRENT OBSOLETE UNRELEASED MODEL UNKNOWN)>. | ||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||
| 215 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | sub get_status { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_status: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 219 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ▶ | return 'UNKNOWN' if length($_[1]) != 4; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 225 | 'getIdStatus', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 226 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||
| 230 | =item is_current( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||
| 232 | Checks whether or not the specified $PDBID corresponds to a current | ||||||||||||||||||||||||||||||||||||||||||
| 233 | structure. Implemented for orthogonality, all this does is check | ||||||||||||||||||||||||||||||||||||||||||
| 234 | if C<get_status> returns C<CURRENT>. | ||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||
| 236 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | ▶ | sub is_current { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_current: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | ▶ | my $class = UNIVERSAL::isa($_[0], __PACKAGE__) ? shift : __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | return $class->get_status(@_) eq 'CURRENT'; | |||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||
| 243 | =item is_obsolete( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||
| 245 | Checks whether or not the specified $PDBID corresponds to an obsolete | ||||||||||||||||||||||||||||||||||||||||||
| 246 | structure. This is actually defined by the PDB web services interface. | ||||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||||
| 248 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | sub is_obsolete { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_obsolete: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 252 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 257 | 'isStructureIdObsolete', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 258 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 260 | } | ||||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||
| 262 | =item is_unreleased( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||
| 264 | Checks whether or not the specified $PDBID corresponds to an unreleased | ||||||||||||||||||||||||||||||||||||||||||
| 265 | structure. Implemented for orthogonality, all this does is check | ||||||||||||||||||||||||||||||||||||||||||
| 266 | if C<get_status> returns C<UNRELEASED>. | ||||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||||
| 268 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | sub is_unreleased { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_unreleased: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | ▶ | my $class = UNIVERSAL::isa($_[0], __PACKAGE__) ? shift : __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | return $class->get_status(@_) eq 'UNRELEASED'; | |||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||
| 275 | =item is_model( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||||||||||||
| 277 | Checks whether or not the specified $PDBID corresponds to a model | ||||||||||||||||||||||||||||||||||||||||||
| 278 | structure. Implemented for orthogonality, all this does is check | ||||||||||||||||||||||||||||||||||||||||||
| 279 | if C<get_status> returns C<MODEL>. | ||||||||||||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||||||||||||
| 281 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||
| 283 | 0 | ▶ | sub is_model { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_model: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | ▶ | my $class = UNIVERSAL::isa($_[0], __PACKAGE__) ? shift : __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | return $class->get_status(@_) eq 'MODEL'; | |||||||||||||||||||||||||||||||||||||||||
| 286 | } | ||||||||||||||||||||||||||||||||||||||||||
| 287 | |||||||||||||||||||||||||||||||||||||||||||
| 288 | =item is_unknown( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||
| 290 | Checks whether or not the specified $PDBID is unknown. Implemented | ||||||||||||||||||||||||||||||||||||||||||
| 291 | for orthogonality, all this does is check if C<get_status> returns | ||||||||||||||||||||||||||||||||||||||||||
| 292 | C<UNKNOWN>. | ||||||||||||||||||||||||||||||||||||||||||
| 293 | |||||||||||||||||||||||||||||||||||||||||||
| 294 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | ▶ | sub is_unknown { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_unknown: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | ▶ | my $class = UNIVERSAL::isa($_[0], __PACKAGE__) ? shift : __PACKAGE__; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | return $class->get_status(@_) eq 'UNKNOWN'; | |||||||||||||||||||||||||||||||||||||||||
| 299 | } | ||||||||||||||||||||||||||||||||||||||||||
| 300 | |||||||||||||||||||||||||||||||||||||||||||
| 301 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||
| 303 | =head2 PDB WEB SERVICES | ||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||
| 305 | The following methods are the interface to the PDB web services. | ||||||||||||||||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||||||||||||||||
| 307 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | =item blast( $SEQUENCE , $CUTOFF , $MATRIX , $OUTPUT_FORMAT ) | ||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||
| 311 | =item blast( $PDBID , $CHAINID, $CUTOFF , $MATRIX , $OUTPUT_FORMAT ) | ||||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | =item blast( $SEQUENCE , $CUTOFF ) | ||||||||||||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||||||||||||
| 315 | =item blast( $PDBID , $CHAINID , $CUTOFF ) | ||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||
| 317 | Performs a BLAST against sequences in the PDB and returns the output of | ||||||||||||||||||||||||||||||||||||||||||
| 318 | the BLAST program. XML is used if the output format is unspecified. | ||||||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||||||
| 320 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 321 | |||||||||||||||||||||||||||||||||||||||||||
| 322 | 1 | ▶ | sub _blast_pdb { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_blast_pdb: called CC=1 SCAR=0.4
| |||||||||||||||||||||||||||||||||||||||||||
| 323 | 1 | my($class, $sequence, $cutoff, $matrix, $output_format) = | |||||||||||||||||||||||||||||||||||||||||
| 324 | _wrap(\@_ => [SELF, STRING, DOUBLE, STRING, STRING]); | ||||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||
| 326 | 1 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 327 | 'blastPDB', $sequence, $cutoff, $matrix, $output_format | ||||||||||||||||||||||||||||||||||||||||||
| 328 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 330 | } | ||||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | ▶ | sub _blast_structure_id_pdb { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_blast_structure_id_pdb: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||
| 335 | # I keep getting "ERROR: No Results Found" using the PDB's 5 argument | ||||||||||||||||||||||||||||||||||||||||||
| 336 | # form of blastPDB. Here's a workaround: | ||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | my $seq = $class->get_sequence(shift, shift); | |||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | return $class->blast($seq, @_); | |||||||||||||||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||||||||||||||||
| 340 | # my($class, $pdbid, $chainid, $cutoff, $matrix, $output_format) = | ||||||||||||||||||||||||||||||||||||||||||
| 341 | # _wrap(\@_ => [SELF, STRING, STRING, DOUBLE, STRING, STRING]); | ||||||||||||||||||||||||||||||||||||||||||
| 342 | # my $ret = $class->_call( | ||||||||||||||||||||||||||||||||||||||||||
| 343 | # 'blastPDB', $pdbid, $chainid, $cutoff, $matrix, $output_format | ||||||||||||||||||||||||||||||||||||||||||
| 344 | # ); | ||||||||||||||||||||||||||||||||||||||||||
| 345 | # return $ret; | ||||||||||||||||||||||||||||||||||||||||||
| 346 | } | ||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | sub _blast_query_xml { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_blast_query_xml: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | my($class, $sequence, $cutoff) = _wrap(\@_ => [SELF, STRING, DOUBLE]); | |||||||||||||||||||||||||||||||||||||||||
| 350 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 351 | 'blastQueryXml', $sequence, $cutoff | ||||||||||||||||||||||||||||||||||||||||||
| 352 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | ▶ | sub _blast_structure_id_query_xml { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_blast_structure_id_query_xml: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 357 | 0 | my($class, $pdbid, $chainid, $cutoff) | |||||||||||||||||||||||||||||||||||||||||
| 358 | = _wrap(\@_ => [SELF, STRING, STRING, DOUBLE]); | ||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 360 | 'blastStructureIdQueryXml', $pdbid, $chainid, $cutoff | ||||||||||||||||||||||||||||||||||||||||||
| 361 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | 1 | ▶ | sub blast { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
blast: called CC=7 SCAR=29.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 366 | 1 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table33%1/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 367 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 368 | |||||||||||||||||||||||||||||||||||||||||||
| 369 | 1 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 370 | 1 | my $ret; | |||||||||||||||||||||||||||||||||||||||||
| 371 | 1 | my $c = scalar(@_); | |||||||||||||||||||||||||||||||||||||||||
| 372 | 1 | ▶ | if ($c == 4) { $ret = $class->_blast_pdb(@_) } | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | elsif($c == 5) { $ret = $class->_blast_structure_id_pdb(@_) } | |||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | elsif($c == 2) { $ret = $class->_blast_query_xml(@_) } | |||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | elsif($c == 3) { $ret = $class->_blast_structure_id_query_xml(@_) } | |||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | else { confess 'Called blast with unexpected number of arguments' } | |||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | =item fasta( $SEQUENCE , $CUTOFF ) | ||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||
| 382 | =item fasta( $PDBID , $CHAINID , $CUTOFF ) | ||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||
| 384 | Takes a sequence or PDB ID and chain identifier and runs FASTA using the | ||||||||||||||||||||||||||||||||||||||||||
| 385 | specified cut-off. The results are overloaded to give PDB IDs when used | ||||||||||||||||||||||||||||||||||||||||||
| 386 | as strings, but they can also be explicitly probed for a C<pdbid> or | ||||||||||||||||||||||||||||||||||||||||||
| 387 | FASTA C<cutoff>: | ||||||||||||||||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||||||||||||||||
| 389 | printf("%s %s %s\n", $_, $_->pdbid, $_->cutoff) | ||||||||||||||||||||||||||||||||||||||||||
| 390 | for $pdb->fasta("2ili", "A"); | ||||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||
| 392 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | ▶ | sub _fasta_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_fasta_query: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | my $sequence = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | my $cutoff = _to_double(shift); | |||||||||||||||||||||||||||||||||||||||||
| 398 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 399 | 'fastaQuery', $sequence, $cutoff | ||||||||||||||||||||||||||||||||||||||||||
| 400 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | ▶ | sub _fasta_structure_id_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_fasta_structure_id_query: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | my($class, $pdbid, $chainid, $cutoff) | |||||||||||||||||||||||||||||||||||||||||
| 406 | = _wrap(\@_ => [SELF, STRING, STRING, DOUBLE]); | ||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 408 | 'fastaStructureIdQuery', $pdbid, $chainid, $cutoff | ||||||||||||||||||||||||||||||||||||||||||
| 409 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 410 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 411 | } | ||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | sub fasta { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fasta: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 415 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 418 | 0 | my $c = scalar(@_); | |||||||||||||||||||||||||||||||||||||||||
| 419 | 0 | my $ret; | |||||||||||||||||||||||||||||||||||||||||
| 420 | 0 | ▶ | if ($c == 2) { $ret = $class->_fasta_query(@_) } | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | elsif($c == 3) { $ret = $class->_fasta_structure_id_query(@_) } | |||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | else { confess 'Called fasta with unexpected number of arguments' } | |||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | $_ = bless(\"$_", 'WWW::PDB::_FastaResult') for @$ret; | |||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | ▶ | return wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 425 | } | ||||||||||||||||||||||||||||||||||||||||||
| 426 | |||||||||||||||||||||||||||||||||||||||||||
| 427 | =item get_chain_length( $PDBID , $CHAINID ) | ||||||||||||||||||||||||||||||||||||||||||
| 428 | |||||||||||||||||||||||||||||||||||||||||||
| 429 | Returns the length of the specified chain. | ||||||||||||||||||||||||||||||||||||||||||
| 430 | |||||||||||||||||||||||||||||||||||||||||||
| 431 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | ▶ | sub get_chain_length { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_chain_length: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 435 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 440 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 441 | 'getChainLength', $pdbid, $chainid | ||||||||||||||||||||||||||||||||||||||||||
| 442 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 443 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 444 | } | ||||||||||||||||||||||||||||||||||||||||||
| 445 | |||||||||||||||||||||||||||||||||||||||||||
| 446 | =item get_chains( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||||||||||||||||
| 448 | Returns a list of all the chain identifiers for a given structure, or a | ||||||||||||||||||||||||||||||||||||||||||
| 449 | reference to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 450 | |||||||||||||||||||||||||||||||||||||||||||
| 451 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | ▶ | sub get_chains { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_chains: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 455 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 456 | |||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 458 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 460 | 'getChains', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 461 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 462 | 0 | ▶ | return wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 463 | } | ||||||||||||||||||||||||||||||||||||||||||
| 464 | |||||||||||||||||||||||||||||||||||||||||||
| 465 | =item get_cif_chain( $PDBID , $CHAINID ) | ||||||||||||||||||||||||||||||||||||||||||
| 466 | |||||||||||||||||||||||||||||||||||||||||||
| 467 | Converts the specified author-assigned chain identifier to its mmCIF | ||||||||||||||||||||||||||||||||||||||||||
| 468 | equivalent. | ||||||||||||||||||||||||||||||||||||||||||
| 469 | |||||||||||||||||||||||||||||||||||||||||||
| 470 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 471 | |||||||||||||||||||||||||||||||||||||||||||
| 472 | 0 | ▶ | sub get_cif_chain { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_cif_chain: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 473 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 474 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 475 | |||||||||||||||||||||||||||||||||||||||||||
| 476 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 477 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 478 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 479 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 480 | 'getCifChain', $pdbid, $chainid | ||||||||||||||||||||||||||||||||||||||||||
| 481 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 482 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 483 | } | ||||||||||||||||||||||||||||||||||||||||||
| 484 | |||||||||||||||||||||||||||||||||||||||||||
| 485 | =item get_cif_chain_length( $PDBID , $CHAINID ) | ||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||
| 487 | Returns the length of the specified chain, just like C<get_chain_length>, | ||||||||||||||||||||||||||||||||||||||||||
| 488 | except it expects the chain identifier to be the mmCIF version. | ||||||||||||||||||||||||||||||||||||||||||
| 489 | |||||||||||||||||||||||||||||||||||||||||||
| 490 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | ▶ | sub get_cif_chain_length { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_cif_chain_length: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 493 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 494 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||||||||||||||||
| 496 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 497 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 498 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 499 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 500 | 'getCifChainLength', $pdbid, $chainid | ||||||||||||||||||||||||||||||||||||||||||
| 501 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 502 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 503 | } | ||||||||||||||||||||||||||||||||||||||||||
| 504 | |||||||||||||||||||||||||||||||||||||||||||
| 505 | =item get_cif_chains( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 506 | |||||||||||||||||||||||||||||||||||||||||||
| 507 | Returns a list of all the mmCIF chain identifiers for a given structure, or | ||||||||||||||||||||||||||||||||||||||||||
| 508 | a reference to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 509 | |||||||||||||||||||||||||||||||||||||||||||
| 510 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 511 | |||||||||||||||||||||||||||||||||||||||||||
| 512 | 0 | ▶ | sub get_cif_chains { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_cif_chains: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 514 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 515 | |||||||||||||||||||||||||||||||||||||||||||
| 516 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 517 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 518 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 519 | 'getCifChains', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 520 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | ▶ | return wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 522 | } | ||||||||||||||||||||||||||||||||||||||||||
| 523 | |||||||||||||||||||||||||||||||||||||||||||
| 524 | =item get_cif_residue( $PDBID , $CHAINID , $RESIDUEID ) | ||||||||||||||||||||||||||||||||||||||||||
| 525 | |||||||||||||||||||||||||||||||||||||||||||
| 526 | Converts the specified author-assigned residue identifier to its mmCIF | ||||||||||||||||||||||||||||||||||||||||||
| 527 | equivalent. | ||||||||||||||||||||||||||||||||||||||||||
| 528 | |||||||||||||||||||||||||||||||||||||||||||
| 529 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | ▶ | sub get_cif_residue { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_cif_residue: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 533 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 534 | |||||||||||||||||||||||||||||||||||||||||||
| 535 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 536 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 537 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 538 | 0 | my $residueid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 540 | 'getCifResidue', $pdbid, $chainid, $residueid | ||||||||||||||||||||||||||||||||||||||||||
| 541 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 542 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 543 | } | ||||||||||||||||||||||||||||||||||||||||||
| 544 | |||||||||||||||||||||||||||||||||||||||||||
| 545 | =item get_current_pdbids( ) | ||||||||||||||||||||||||||||||||||||||||||
| 546 | |||||||||||||||||||||||||||||||||||||||||||
| 547 | Returns a list of the identifiers (PDB IDs) corresponding to "current" | ||||||||||||||||||||||||||||||||||||||||||
| 548 | structures (i.e. not obsolete, models, etc.), or a reference to such a | ||||||||||||||||||||||||||||||||||||||||||
| 549 | list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 550 | |||||||||||||||||||||||||||||||||||||||||||
| 551 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 552 | |||||||||||||||||||||||||||||||||||||||||||
| 553 | 0 | ▶ | sub get_current_pdbids { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_current_pdbids: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 554 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 555 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 556 | |||||||||||||||||||||||||||||||||||||||||||
| 557 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 558 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 559 | 'getCurrentPdbIds' | ||||||||||||||||||||||||||||||||||||||||||
| 560 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | ▶ | return wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 562 | } | ||||||||||||||||||||||||||||||||||||||||||
| 563 | |||||||||||||||||||||||||||||||||||||||||||
| 564 | =item get_ec_nums( @PDBIDS ) | ||||||||||||||||||||||||||||||||||||||||||
| 565 | |||||||||||||||||||||||||||||||||||||||||||
| 566 | =item get_ec_nums( ) | ||||||||||||||||||||||||||||||||||||||||||
| 567 | |||||||||||||||||||||||||||||||||||||||||||
| 568 | Retrieves the Enzyme Classification (EC) numbers associated with the | ||||||||||||||||||||||||||||||||||||||||||
| 569 | specified PDB IDs or with all PDB structures if called with no arguments. | ||||||||||||||||||||||||||||||||||||||||||
| 570 | |||||||||||||||||||||||||||||||||||||||||||
| 571 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 572 | |||||||||||||||||||||||||||||||||||||||||||
| 573 | 0 | ▶ | sub get_ec_nums { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_ec_nums: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 574 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 575 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 576 | |||||||||||||||||||||||||||||||||||||||||||
| 577 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 578 | 0 | my $ret; | |||||||||||||||||||||||||||||||||||||||||
| 579 | 0 | ▶ | if(@_) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 580 | 0 | ▶ | my @pdbids = map(_to_string($_), map { ref($_) ? @$_ : $_ } @_); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 581 | 0 | $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 582 | 'getEcNumsForStructures', \@pdbids | ||||||||||||||||||||||||||||||||||||||||||
| 583 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 584 | } | ||||||||||||||||||||||||||||||||||||||||||
| 585 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 586 | 0 | $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 587 | 'getEcNums' | ||||||||||||||||||||||||||||||||||||||||||
| 588 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 589 | } | ||||||||||||||||||||||||||||||||||||||||||
| 590 | 0 | $_ = bless(\"$_", 'WWW::PDB::_EcNumsResult') for @$ret; | |||||||||||||||||||||||||||||||||||||||||
| 591 | 0 | ▶ | return wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 592 | } | ||||||||||||||||||||||||||||||||||||||||||
| 593 | |||||||||||||||||||||||||||||||||||||||||||
| 594 | =item get_entities( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 595 | |||||||||||||||||||||||||||||||||||||||||||
| 596 | Returns a list of the entity IDs for a given structure, or a reference | ||||||||||||||||||||||||||||||||||||||||||
| 597 | to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 598 | |||||||||||||||||||||||||||||||||||||||||||
| 599 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||||||||||||||||
| 601 | 0 | ▶ | sub get_entities { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_entities: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 602 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 603 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 604 | |||||||||||||||||||||||||||||||||||||||||||
| 605 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 606 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 607 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 608 | 'getEntities', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 609 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 610 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 611 | } | ||||||||||||||||||||||||||||||||||||||||||
| 612 | |||||||||||||||||||||||||||||||||||||||||||
| 613 | =item get_genome_details( ) | ||||||||||||||||||||||||||||||||||||||||||
| 614 | |||||||||||||||||||||||||||||||||||||||||||
| 615 | Retrieves genome details for all PDB structures. | ||||||||||||||||||||||||||||||||||||||||||
| 616 | |||||||||||||||||||||||||||||||||||||||||||
| 617 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 618 | |||||||||||||||||||||||||||||||||||||||||||
| 619 | 0 | ▶ | sub get_genome_details { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_genome_details: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 620 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 621 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 622 | |||||||||||||||||||||||||||||||||||||||||||
| 623 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 624 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 625 | 'getGenomeDetails' | ||||||||||||||||||||||||||||||||||||||||||
| 626 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 627 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 628 | } | ||||||||||||||||||||||||||||||||||||||||||
| 629 | |||||||||||||||||||||||||||||||||||||||||||
| 630 | =item get_kabsch_sander( $PDBID , $CHAINID ) | ||||||||||||||||||||||||||||||||||||||||||
| 631 | |||||||||||||||||||||||||||||||||||||||||||
| 632 | Finds secondary structure for the given chain. | ||||||||||||||||||||||||||||||||||||||||||
| 633 | |||||||||||||||||||||||||||||||||||||||||||
| 634 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 635 | |||||||||||||||||||||||||||||||||||||||||||
| 636 | 0 | ▶ | sub get_kabsch_sander { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_kabsch_sander: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 637 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 638 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 639 | |||||||||||||||||||||||||||||||||||||||||||
| 640 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 641 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 642 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 643 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 644 | 'getKabschSander', $pdbid, $chainid | ||||||||||||||||||||||||||||||||||||||||||
| 645 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 646 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 647 | } | ||||||||||||||||||||||||||||||||||||||||||
| 648 | |||||||||||||||||||||||||||||||||||||||||||
| 649 | =item get_obsolete_pdbids( ) | ||||||||||||||||||||||||||||||||||||||||||
| 650 | |||||||||||||||||||||||||||||||||||||||||||
| 651 | Returns a list of the identifiers (PDB IDs) corresponding to obsolete | ||||||||||||||||||||||||||||||||||||||||||
| 652 | structures, or a reference to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 653 | |||||||||||||||||||||||||||||||||||||||||||
| 654 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 655 | |||||||||||||||||||||||||||||||||||||||||||
| 656 | 0 | ▶ | sub get_obsolete_pdbids { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_obsolete_pdbids: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 657 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 658 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 659 | |||||||||||||||||||||||||||||||||||||||||||
| 660 | 0 | my $ret = shift->_call( | |||||||||||||||||||||||||||||||||||||||||
| 661 | 'getObsoletePdbIds' | ||||||||||||||||||||||||||||||||||||||||||
| 662 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 663 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 664 | } | ||||||||||||||||||||||||||||||||||||||||||
| 665 | |||||||||||||||||||||||||||||||||||||||||||
| 666 | =item get_primary_citation_title( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 667 | |||||||||||||||||||||||||||||||||||||||||||
| 668 | Finds the title of the specified structure's primary citation (if it has | ||||||||||||||||||||||||||||||||||||||||||
| 669 | one). | ||||||||||||||||||||||||||||||||||||||||||
| 670 | |||||||||||||||||||||||||||||||||||||||||||
| 671 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 672 | |||||||||||||||||||||||||||||||||||||||||||
| 673 | 0 | ▶ | sub get_primary_citation_title { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_primary_citation_title: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 674 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 675 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 676 | |||||||||||||||||||||||||||||||||||||||||||
| 677 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 678 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 679 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 680 | 'getPrimaryCitationTitle', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 681 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 682 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 683 | } | ||||||||||||||||||||||||||||||||||||||||||
| 684 | |||||||||||||||||||||||||||||||||||||||||||
| 685 | =item get_pubmed_ids( ) | ||||||||||||||||||||||||||||||||||||||||||
| 686 | |||||||||||||||||||||||||||||||||||||||||||
| 687 | Retrieves the PubMed IDs associated with all PDB structures. | ||||||||||||||||||||||||||||||||||||||||||
| 688 | |||||||||||||||||||||||||||||||||||||||||||
| 689 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 690 | |||||||||||||||||||||||||||||||||||||||||||
| 691 | 0 | ▶ | sub get_pubmed_ids { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_pubmed_ids: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 692 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 693 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 694 | |||||||||||||||||||||||||||||||||||||||||||
| 695 | 0 | my $ret = shift->_call( | |||||||||||||||||||||||||||||||||||||||||
| 696 | 'getPubmedIdForAllStructures' | ||||||||||||||||||||||||||||||||||||||||||
| 697 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 698 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 699 | } | ||||||||||||||||||||||||||||||||||||||||||
| 700 | |||||||||||||||||||||||||||||||||||||||||||
| 701 | =item get_pubmed_id( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 702 | |||||||||||||||||||||||||||||||||||||||||||
| 703 | Retrieves the PubMed ID associated with the specified structure. | ||||||||||||||||||||||||||||||||||||||||||
| 704 | |||||||||||||||||||||||||||||||||||||||||||
| 705 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 706 | |||||||||||||||||||||||||||||||||||||||||||
| 707 | 0 | ▶ | sub get_pubmed_id { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_pubmed_id: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 708 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 709 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 710 | |||||||||||||||||||||||||||||||||||||||||||
| 711 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 712 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 713 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 714 | 'getPubmedIdForStructure', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 715 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 716 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 717 | } | ||||||||||||||||||||||||||||||||||||||||||
| 718 | |||||||||||||||||||||||||||||||||||||||||||
| 719 | =item get_release_dates( @PDBIDS ) | ||||||||||||||||||||||||||||||||||||||||||
| 720 | |||||||||||||||||||||||||||||||||||||||||||
| 721 | Maps the given PDB IDs to their release dates. | ||||||||||||||||||||||||||||||||||||||||||
| 722 | |||||||||||||||||||||||||||||||||||||||||||
| 723 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 724 | |||||||||||||||||||||||||||||||||||||||||||
| 725 | 0 | ▶ | sub get_release_dates { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_release_dates: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 726 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 727 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 728 | |||||||||||||||||||||||||||||||||||||||||||
| 729 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 730 | 0 | ▶ | my @pdbids = map(_to_string($_), map { ref($_) ? @$_ : $_ } @_); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 731 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 732 | 'getReleaseDates', \@pdbids | ||||||||||||||||||||||||||||||||||||||||||
| 733 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 734 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 735 | } | ||||||||||||||||||||||||||||||||||||||||||
| 736 | |||||||||||||||||||||||||||||||||||||||||||
| 737 | =item get_sequence( $PDBID , $CHAINID ) | ||||||||||||||||||||||||||||||||||||||||||
| 738 | |||||||||||||||||||||||||||||||||||||||||||
| 739 | Retrieves the sequence of the specified chain. | ||||||||||||||||||||||||||||||||||||||||||
| 740 | |||||||||||||||||||||||||||||||||||||||||||
| 741 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 742 | |||||||||||||||||||||||||||||||||||||||||||
| 743 | 0 | ▶ | sub get_sequence { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_sequence: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 744 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 745 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 746 | |||||||||||||||||||||||||||||||||||||||||||
| 747 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 748 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 749 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 750 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 751 | 'getSequenceForStructureAndChain', $pdbid, $chainid | ||||||||||||||||||||||||||||||||||||||||||
| 752 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 753 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 754 | } | ||||||||||||||||||||||||||||||||||||||||||
| 755 | |||||||||||||||||||||||||||||||||||||||||||
| 756 | =item get_space_group( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 757 | |||||||||||||||||||||||||||||||||||||||||||
| 758 | Returns the space group of the specified structure (the | ||||||||||||||||||||||||||||||||||||||||||
| 759 | C<symmetry.space_group_name_H_M> field according to the mmCIF dictionary). | ||||||||||||||||||||||||||||||||||||||||||
| 760 | |||||||||||||||||||||||||||||||||||||||||||
| 761 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 762 | |||||||||||||||||||||||||||||||||||||||||||
| 763 | 0 | ▶ | sub get_space_group { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_space_group: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 764 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 765 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 766 | |||||||||||||||||||||||||||||||||||||||||||
| 767 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 768 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 769 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 770 | 'getSpaceGroupForStructure', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 771 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 772 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 773 | } | ||||||||||||||||||||||||||||||||||||||||||
| 774 | |||||||||||||||||||||||||||||||||||||||||||
| 775 | =item homology_reduction_query( @PDBIDS , $CUTOFF ) | ||||||||||||||||||||||||||||||||||||||||||
| 776 | |||||||||||||||||||||||||||||||||||||||||||
| 777 | Reduces the set of PDB IDs given as input based on sequence homology. | ||||||||||||||||||||||||||||||||||||||||||
| 778 | |||||||||||||||||||||||||||||||||||||||||||
| 779 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 780 | |||||||||||||||||||||||||||||||||||||||||||
| 781 | 0 | ▶ | sub homology_reduction_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
homology_reduction_query: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 782 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 783 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 784 | |||||||||||||||||||||||||||||||||||||||||||
| 785 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 786 | 0 | my $cutoff = _to_int(int(pop)); | |||||||||||||||||||||||||||||||||||||||||
| 787 | 0 | ▶ | my @pdbids = map(_to_string($_), map { ref($_) ? @$_ : $_ } @_); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 788 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 789 | 'homologyReductionQuery', \@pdbids, $cutoff | ||||||||||||||||||||||||||||||||||||||||||
| 790 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 791 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 792 | } | ||||||||||||||||||||||||||||||||||||||||||
| 793 | |||||||||||||||||||||||||||||||||||||||||||
| 794 | =item keyword_query( $KEYWORD_EXPR [, $EXACT_MATCH [, $AUTHORS_ONLY ] ] ) | ||||||||||||||||||||||||||||||||||||||||||
| 795 | |||||||||||||||||||||||||||||||||||||||||||
| 796 | Runs a keyword query with the specified expression. Search can be made | ||||||||||||||||||||||||||||||||||||||||||
| 797 | stricter by requiring an exact match or restricting the search to | ||||||||||||||||||||||||||||||||||||||||||
| 798 | authors. Both boolean arguments are optional and default to false. Returns | ||||||||||||||||||||||||||||||||||||||||||
| 799 | a list of PDB IDs or a reference to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 800 | |||||||||||||||||||||||||||||||||||||||||||
| 801 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 802 | |||||||||||||||||||||||||||||||||||||||||||
| 803 | 0 | ▶ | sub keyword_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
keyword_query: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 804 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 805 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 806 | |||||||||||||||||||||||||||||||||||||||||||
| 807 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 808 | 0 | my $keyword = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 809 | 0 | my $exact_match = _to_boolean(shift); | |||||||||||||||||||||||||||||||||||||||||
| 810 | 0 | my $authors_only = _to_boolean(shift); | |||||||||||||||||||||||||||||||||||||||||
| 811 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 812 | 'keywordQuery', $keyword, $exact_match, $authors_only | ||||||||||||||||||||||||||||||||||||||||||
| 813 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 814 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 815 | } | ||||||||||||||||||||||||||||||||||||||||||
| 816 | |||||||||||||||||||||||||||||||||||||||||||
| 817 | =item pubmed_abstract_query( $KEYWORD_EXPR ) | ||||||||||||||||||||||||||||||||||||||||||
| 818 | |||||||||||||||||||||||||||||||||||||||||||
| 819 | Runs a keyword query on PubMed Abstracts. Returns a list of PDB IDs or | ||||||||||||||||||||||||||||||||||||||||||
| 820 | a reference to such a list in scalar context. | ||||||||||||||||||||||||||||||||||||||||||
| 821 | |||||||||||||||||||||||||||||||||||||||||||
| 822 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 823 | |||||||||||||||||||||||||||||||||||||||||||
| 824 | 0 | ▶ | sub pubmed_abstract_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pubmed_abstract_query: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 825 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 826 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 827 | |||||||||||||||||||||||||||||||||||||||||||
| 828 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 829 | 0 | my $keyword = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 830 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 831 | 'pubmedAbstractQuery', $keyword | ||||||||||||||||||||||||||||||||||||||||||
| 832 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 833 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 834 | } | ||||||||||||||||||||||||||||||||||||||||||
| 835 | |||||||||||||||||||||||||||||||||||||||||||
| 836 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 837 | |||||||||||||||||||||||||||||||||||||||||||
| 838 | =head3 UNTESTED | ||||||||||||||||||||||||||||||||||||||||||
| 839 | |||||||||||||||||||||||||||||||||||||||||||
| 840 | The following methods are defined by the PDB web services interface, so | ||||||||||||||||||||||||||||||||||||||||||
| 841 | they are wrapped here, but they have not been tested. | ||||||||||||||||||||||||||||||||||||||||||
| 842 | |||||||||||||||||||||||||||||||||||||||||||
| 843 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 844 | |||||||||||||||||||||||||||||||||||||||||||
| 845 | =item get_annotations( $STATE_FILE ) | ||||||||||||||||||||||||||||||||||||||||||
| 846 | |||||||||||||||||||||||||||||||||||||||||||
| 847 | Given a string in the format of a ViewState object from Protein | ||||||||||||||||||||||||||||||||||||||||||
| 848 | Workshop, returns another ViewState object. | ||||||||||||||||||||||||||||||||||||||||||
| 849 | |||||||||||||||||||||||||||||||||||||||||||
| 850 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 851 | |||||||||||||||||||||||||||||||||||||||||||
| 852 | 0 | ▶ | sub get_annotations { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_annotations: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 853 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 854 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 855 | |||||||||||||||||||||||||||||||||||||||||||
| 856 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 857 | 0 | my $state_file = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 858 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 859 | 'getAnnotations', $state_file | ||||||||||||||||||||||||||||||||||||||||||
| 860 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 861 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 862 | } | ||||||||||||||||||||||||||||||||||||||||||
| 863 | |||||||||||||||||||||||||||||||||||||||||||
| 864 | =item get_atom_site( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 865 | |||||||||||||||||||||||||||||||||||||||||||
| 866 | Returns the first atom site object for a structure. | ||||||||||||||||||||||||||||||||||||||||||
| 867 | |||||||||||||||||||||||||||||||||||||||||||
| 868 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 869 | |||||||||||||||||||||||||||||||||||||||||||
| 870 | 0 | ▶ | sub get_atom_site { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_atom_site: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 871 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 872 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 873 | |||||||||||||||||||||||||||||||||||||||||||
| 874 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 875 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 876 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 877 | 'getAtomSite', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 878 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 879 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 880 | } | ||||||||||||||||||||||||||||||||||||||||||
| 881 | |||||||||||||||||||||||||||||||||||||||||||
| 882 | =item get_atom_sites( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 883 | |||||||||||||||||||||||||||||||||||||||||||
| 884 | Returns the atom site objects for a structure. | ||||||||||||||||||||||||||||||||||||||||||
| 885 | |||||||||||||||||||||||||||||||||||||||||||
| 886 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 887 | |||||||||||||||||||||||||||||||||||||||||||
| 888 | 0 | ▶ | sub get_atom_sites { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_atom_sites: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 889 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 890 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 891 | |||||||||||||||||||||||||||||||||||||||||||
| 892 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 893 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 894 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 895 | 'getAtomSites', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 896 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 897 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 898 | } | ||||||||||||||||||||||||||||||||||||||||||
| 899 | |||||||||||||||||||||||||||||||||||||||||||
| 900 | =item get_domain_fragments( $PDBID , $CHAINID , $METHOD ) | ||||||||||||||||||||||||||||||||||||||||||
| 901 | |||||||||||||||||||||||||||||||||||||||||||
| 902 | Finds all structural protein domain fragments for a given structure. | ||||||||||||||||||||||||||||||||||||||||||
| 903 | |||||||||||||||||||||||||||||||||||||||||||
| 904 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 905 | |||||||||||||||||||||||||||||||||||||||||||
| 906 | 0 | ▶ | sub get_domain_fragments { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_domain_fragments: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 907 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 908 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 909 | |||||||||||||||||||||||||||||||||||||||||||
| 910 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 911 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 912 | 0 | my $chainid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 913 | 0 | my $method = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 914 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 915 | 'getDomainFragments', $pdbid, $chainid, $method | ||||||||||||||||||||||||||||||||||||||||||
| 916 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 917 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 918 | } | ||||||||||||||||||||||||||||||||||||||||||
| 919 | |||||||||||||||||||||||||||||||||||||||||||
| 920 | =item get_first_struct_conf( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 921 | |||||||||||||||||||||||||||||||||||||||||||
| 922 | Finds the first struct_conf for the given structure. | ||||||||||||||||||||||||||||||||||||||||||
| 923 | |||||||||||||||||||||||||||||||||||||||||||
| 924 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 925 | |||||||||||||||||||||||||||||||||||||||||||
| 926 | 0 | ▶ | sub get_first_struct_conf { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_first_struct_conf: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 927 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 928 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 929 | |||||||||||||||||||||||||||||||||||||||||||
| 930 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 931 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 932 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 933 | 'getFirstStructConf', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 934 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 935 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 936 | } | ||||||||||||||||||||||||||||||||||||||||||
| 937 | |||||||||||||||||||||||||||||||||||||||||||
| 938 | =item get_first_struct_sheet_range( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 939 | |||||||||||||||||||||||||||||||||||||||||||
| 940 | Finds the first struct_sheet_range for the given structure. | ||||||||||||||||||||||||||||||||||||||||||
| 941 | |||||||||||||||||||||||||||||||||||||||||||
| 942 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 943 | |||||||||||||||||||||||||||||||||||||||||||
| 944 | 0 | ▶ | sub get_first_struct_sheet_range { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_first_struct_sheet_range: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 945 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 946 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 947 | |||||||||||||||||||||||||||||||||||||||||||
| 948 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 949 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 950 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 951 | 'getFirstStructSheetRange', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 952 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 953 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 954 | } | ||||||||||||||||||||||||||||||||||||||||||
| 955 | |||||||||||||||||||||||||||||||||||||||||||
| 956 | =item get_struct_confs( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 957 | |||||||||||||||||||||||||||||||||||||||||||
| 958 | Finds the struct_confs for the given structure. | ||||||||||||||||||||||||||||||||||||||||||
| 959 | |||||||||||||||||||||||||||||||||||||||||||
| 960 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 961 | |||||||||||||||||||||||||||||||||||||||||||
| 962 | 0 | ▶ | sub get_struct_confs { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_struct_confs: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 963 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 964 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 965 | |||||||||||||||||||||||||||||||||||||||||||
| 966 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 967 | 0 | my $pdbid = _to_string(shift); | |||||||||||||||||||||||||||||||||||||||||
| 968 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 969 | 'getStructConfs', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 970 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 971 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 972 | } | ||||||||||||||||||||||||||||||||||||||||||
| 973 | |||||||||||||||||||||||||||||||||||||||||||
| 974 | =item get_struct_sheet_ranges( $PDBID ) | ||||||||||||||||||||||||||||||||||||||||||
| 975 | |||||||||||||||||||||||||||||||||||||||||||
| 976 | Finds the struct_sheet_ranges for the given structure. | ||||||||||||||||||||||||||||||||||||||||||
| 977 | |||||||||||||||||||||||||||||||||||||||||||
| 978 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 979 | |||||||||||||||||||||||||||||||||||||||||||
| 980 | 0 | ▶ | sub get_struct_sheet_ranges { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_struct_sheet_ranges: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 981 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 982 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 983 | |||||||||||||||||||||||||||||||||||||||||||
| 984 | 0 | my($class, $pdbid) = _wrap(\@_ => [SELF, STRING]); | |||||||||||||||||||||||||||||||||||||||||
| 985 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 986 | 'getStructSheetRanges', $pdbid | ||||||||||||||||||||||||||||||||||||||||||
| 987 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 988 | 0 | return $ret; | |||||||||||||||||||||||||||||||||||||||||
| 989 | } | ||||||||||||||||||||||||||||||||||||||||||
| 990 | |||||||||||||||||||||||||||||||||||||||||||
| 991 | =item get_structural_genomics_pdbids( ) | ||||||||||||||||||||||||||||||||||||||||||
| 992 | |||||||||||||||||||||||||||||||||||||||||||
| 993 | Finds info for structural genomics structures. | ||||||||||||||||||||||||||||||||||||||||||
| 994 | |||||||||||||||||||||||||||||||||||||||||||
| 995 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 996 | |||||||||||||||||||||||||||||||||||||||||||
| 997 | 0 | ▶ | sub get_structural_genomics_pdbids { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_structural_genomics_pdbids: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 998 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 999 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 1000 | |||||||||||||||||||||||||||||||||||||||||||
| 1001 | 0 | my $class = _wrap(\@_ => [SELF]); | |||||||||||||||||||||||||||||||||||||||||
| 1002 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 1003 | 'getStructureGenomicsPdbIds' | ||||||||||||||||||||||||||||||||||||||||||
| 1004 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 1005 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 1006 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1007 | |||||||||||||||||||||||||||||||||||||||||||
| 1008 | =item xml_query( $XML ) | ||||||||||||||||||||||||||||||||||||||||||
| 1009 | |||||||||||||||||||||||||||||||||||||||||||
| 1010 | Runs any query that can be constructed, pretty much. | ||||||||||||||||||||||||||||||||||||||||||
| 1011 | |||||||||||||||||||||||||||||||||||||||||||
| 1012 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 1013 | |||||||||||||||||||||||||||||||||||||||||||
| 1014 | 0 | ▶ | sub xml_query { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
xml_query: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 1015 | 0 | ▶ | unshift @_, __PACKAGE__ # add the package name unless already there | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
MC/DC0%0/2
defined $_[0] and UNIVERSAL::isa($_[0], __PACKAGE__)
defined $_[0]
UNIVERSAL::isa($_[0], __PACKAGE__)
Truth table0%0/3
A and B
A= defined $_[0]B= UNIVERSAL::isa($_[0], __PACKAGE__)
| |||||||||||||||||||||||||||||||||||||||||||
| 1016 | unless defined($_[0]) && UNIVERSAL::isa($_[0], __PACKAGE__); | ||||||||||||||||||||||||||||||||||||||||||
| 1017 | |||||||||||||||||||||||||||||||||||||||||||
| 1018 | 0 | my($class, $xml) = _wrap(\@_ => [SELF, STRING]); | |||||||||||||||||||||||||||||||||||||||||
| 1019 | 0 | my $ret = $class->_call( | |||||||||||||||||||||||||||||||||||||||||
| 1020 | 'xmlQuery', $xml | ||||||||||||||||||||||||||||||||||||||||||
| 1021 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 1022 | 0 | ▶ | return $ret && wantarray ? @$ret : $ret; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$ret and wantarray
MC/DC0%0/2
$ret and wantarray
$ret
wantarray
Truth table0%0/3
A and B
A= $retB= wantarray
| |||||||||||||||||||||||||||||||||||||||||||
| 1023 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1024 | |||||||||||||||||||||||||||||||||||||||||||
| 1025 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 1026 | |||||||||||||||||||||||||||||||||||||||||||
| 1027 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 1028 | |||||||||||||||||||||||||||||||||||||||||||
| 1029 | ################################################################################ | ||||||||||||||||||||||||||||||||||||||||||
| 1030 | |||||||||||||||||||||||||||||||||||||||||||
| 1031 | 2 | ▶ | sub _get_file { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_file: called CC=13 SCAR=41.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1032 | 2 | my($class, @dir) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 1033 | 2 | my $file = pop @dir; | |||||||||||||||||||||||||||||||||||||||||
| 1034 | 2 | my($dir, $local_path, $store, $fh); | |||||||||||||||||||||||||||||||||||||||||
| 1035 | 2 | ▶ | if($class->cache) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1036 | 0 | $dir = File::Spec->catfile($class->cache, @dir); | |||||||||||||||||||||||||||||||||||||||||
| 1037 | 0 | $local_path = File::Spec->catfile($dir, $file); | |||||||||||||||||||||||||||||||||||||||||
| 1038 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1039 | 2 | ▶ | unless($class->cache && ($store = new IO::File($local_path))) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$class->cache and $store = "IO::File"->new($local_path)
MC/DC0%0/2
$class->cache and $store = "IO::File"->new($local_path)
$class->cache
$store = "IO::File"->new($local_path)
Truth table33%1/3
A and B
A= $class->cacheB= $store = "IO::File"->new($local_path)
| |||||||||||||||||||||||||||||||||||||||||||
| 1040 | 2 | my $ftp; | |||||||||||||||||||||||||||||||||||||||||
| 1041 | 2 | ▶ | if( ($ftp = new Net::FTP($class->ftp, Debug => 0)) # connect | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
$ftp = "Net::FTP"->new($class->ftp, "Debug", 0) and $ftp->login("anonymous", "-anonymous\@") and $ftp->cwd(join("", map(("/$_"), @dir)))
$ftp = "Net::FTP"->new($class->ftp, "Debug", 0) and $ftp->login("anonymous", "-anonymous\@")
MC/DC0%0/3
$ftp = "Net::FTP"->new($class->ftp, "Debug", 0) and $ftp->login("anonymous", "-anonymous\@") and $ftp->cwd(join("", map(("/$_"), @dir)))
$ftp = "Net::FTP"->new($class->ftp, "Debug", 0)
$ftp->login("anonymous", "-anonymous\@")
$ftp->cwd(join("", map(("/$_"), @dir)))
Truth table25%1/4
A and B and C
A= $ftp = "Net::FTP"->new($class->ftp, "Debug", 0)B= $ftp->login("anonymous", "-anonymous\@")C= $ftp->cwd(join("", map(("/$_"), @dir)))
| |||||||||||||||||||||||||||||||||||||||||||
| 1042 | && $ftp->login(qw(anonymous -anonymous@)) # login | ||||||||||||||||||||||||||||||||||||||||||
| 1043 | && $ftp->cwd(join('', map("/$_", @dir))) # chdir | ||||||||||||||||||||||||||||||||||||||||||
| 1044 | ) { | ||||||||||||||||||||||||||||||||||||||||||
| 1045 | # store in temporary file unless there's a cache | ||||||||||||||||||||||||||||||||||||||||||
| 1046 | 0 | ▶ | $store = IO::File->new_tmpfile unless $class->cache # cache exists | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$class->cache and File::Path::mkpath($dir) and $store = "IO::File"->new($local_path, "+>")
$class->cache and File::Path::mkpath($dir)
MC/DC0%0/3
$class->cache and File::Path::mkpath($dir) and $store = "IO::File"->new($local_path, "+>")
$class->cache
File::Path::mkpath($dir)
$store = "IO::File"->new($local_path, "+>")
Truth table0%0/4
A and B and C
A= $class->cacheB= File::Path::mkpath($dir)C= $store = "IO::File"->new($local_path, "+>")
| |||||||||||||||||||||||||||||||||||||||||||
| 1047 | && File::Path::mkpath($dir) # mkdir | ||||||||||||||||||||||||||||||||||||||||||
| 1048 | && ($store = new IO::File($local_path, '+>')); # create file | ||||||||||||||||||||||||||||||||||||||||||
| 1049 | |||||||||||||||||||||||||||||||||||||||||||
| 1050 | # seek to start if successful get otherwise delete file | ||||||||||||||||||||||||||||||||||||||||||
| 1051 | 0 | ▶ | if($ftp->get($file => $store)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1052 | 0 | seek($store, 0, SEEK_SET); | |||||||||||||||||||||||||||||||||||||||||
| 1053 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1054 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 1055 | 0 | undef $store; | |||||||||||||||||||||||||||||||||||||||||
| 1056 | 0 | ▶ | $class->cache and unlink $local_path; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1057 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1058 | |||||||||||||||||||||||||||||||||||||||||||
| 1059 | # clean up | ||||||||||||||||||||||||||||||||||||||||||
| 1060 | 0 | $ftp->quit; | |||||||||||||||||||||||||||||||||||||||||
| 1061 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1062 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1063 | |||||||||||||||||||||||||||||||||||||||||||
| 1064 | # if file stored, decompress it | ||||||||||||||||||||||||||||||||||||||||||
| 1065 | 2 | ▶ | if($store) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1066 | 0 | $fh = IO::File->new_tmpfile; | |||||||||||||||||||||||||||||||||||||||||
| 1067 | 0 | IO::Uncompress::Gunzip::gunzip($store => $fh); | |||||||||||||||||||||||||||||||||||||||||
| 1068 | 0 | seek($fh, 0, SEEK_SET); | |||||||||||||||||||||||||||||||||||||||||
| 1069 | 0 | close $store; | |||||||||||||||||||||||||||||||||||||||||
| 1070 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1071 | |||||||||||||||||||||||||||||||||||||||||||
| 1072 | 2 | return $fh; | |||||||||||||||||||||||||||||||||||||||||
| 1073 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1074 | |||||||||||||||||||||||||||||||||||||||||||
| 1075 | 1 | ▶ | sub _call { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_call: called CC=2 SCAR=14.0
| |||||||||||||||||||||||||||||||||||||||||||
| 1076 | 1 | my $result = shift->soap->call(@_); | |||||||||||||||||||||||||||||||||||||||||
| 1077 | 0 | ▶ | confess $result->faultstring if $result->fault; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1078 | 0 | return $result->result; | |||||||||||||||||||||||||||||||||||||||||
| 1079 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1080 | |||||||||||||||||||||||||||||||||||||||||||
| 1081 | 1 | ▶ | sub _wrap { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_wrap: called CC=6 SCAR=19.1
| |||||||||||||||||||||||||||||||||||||||||||
| 1082 | 1 | my @data = @{shift()}; | |||||||||||||||||||||||||||||||||||||||||
| 1083 | 1 | my @type = @{shift()}; | |||||||||||||||||||||||||||||||||||||||||
| 1084 | return map { | ||||||||||||||||||||||||||||||||||||||||||
| 1085 | 1 | my $type = shift @type; | |||||||||||||||||||||||||||||||||||||||||
| 1086 | 5 | ▶ | if($type == BOOLEAN) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 1087 | 0 | ▶ | $_ = SOAP::Data->type(boolean => ($_ ? 1 : 0)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1088 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1089 | elsif($type == DOUBLE) { | ||||||||||||||||||||||||||||||||||||||||||
| 1090 | 1 | $_ = SOAP::Data->type(double => $_); | |||||||||||||||||||||||||||||||||||||||||
| 1091 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1092 | elsif($type == INT) { | ||||||||||||||||||||||||||||||||||||||||||
| 1093 | 0 | $_ = SOAP::Data->type('int' => $_); | |||||||||||||||||||||||||||||||||||||||||
| 1094 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1095 | elsif($type == STRING) { | ||||||||||||||||||||||||||||||||||||||||||
| 1096 | 3 | $_ = SOAP::Data->type(string => $_); | |||||||||||||||||||||||||||||||||||||||||
| 1097 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1098 | 5 | $_} @data; | |||||||||||||||||||||||||||||||||||||||||
| 1099 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1100 | |||||||||||||||||||||||||||||||||||||||||||
| 1101 | 0 | ▶ | sub _to_int { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_to_int: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1102 | 0 | my $var = shift; | |||||||||||||||||||||||||||||||||||||||||
| 1103 | 0 | return SOAP::Data->type('int' => $var); | |||||||||||||||||||||||||||||||||||||||||
| 1104 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1105 | |||||||||||||||||||||||||||||||||||||||||||
| 1106 | 0 | ▶ | sub _to_string { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_to_string: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1107 | 0 | my $var = shift; | |||||||||||||||||||||||||||||||||||||||||
| 1108 | 0 | return SOAP::Data->type(string => $var); | |||||||||||||||||||||||||||||||||||||||||
| 1109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1110 | |||||||||||||||||||||||||||||||||||||||||||
| 1111 | 0 | ▶ | sub _to_boolean { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_to_boolean: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1112 | 0 | my $var = shift; | |||||||||||||||||||||||||||||||||||||||||
| 1113 | 0 | ▶ | return SOAP::Data->type(boolean => ($var ? 1 : 0)); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1114 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1115 | |||||||||||||||||||||||||||||||||||||||||||
| 1116 | 0 | ▶ | sub _to_double { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_to_double: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1117 | 0 | my $var = shift; | |||||||||||||||||||||||||||||||||||||||||
| 1118 | 0 | return SOAP::Data->type(double => $var); | |||||||||||||||||||||||||||||||||||||||||
| 1119 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1120 | |||||||||||||||||||||||||||||||||||||||||||
| 1121 | ################################################################################ | ||||||||||||||||||||||||||||||||||||||||||
| 1122 | |||||||||||||||||||||||||||||||||||||||||||
| 1123 | package WWW::PDB::_FastaResult; | ||||||||||||||||||||||||||||||||||||||||||
| 1124 | |||||||||||||||||||||||||||||||||||||||||||
| 1125 | 0 | ▶ | use overload '""' => sub { shift->pdbid }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||||||||||||||||||||||||||||||||||||||||||
| 1126 | |||||||||||||||||||||||||||||||||||||||||||
| 1127 | 0 | ▶ | sub pdbid { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pdbid: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1128 | 0 | return substr(${$_[0]}, 0, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1129 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1130 | |||||||||||||||||||||||||||||||||||||||||||
| 1131 | 0 | ▶ | sub cutoff { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cutoff: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1132 | 0 | return substr(${$_[0]}, 5); | |||||||||||||||||||||||||||||||||||||||||
| 1133 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1134 | |||||||||||||||||||||||||||||||||||||||||||
| 1135 | ################################################################################ | ||||||||||||||||||||||||||||||||||||||||||
| 1136 | |||||||||||||||||||||||||||||||||||||||||||
| 1137 | package WWW::PDB::_EcNumsResult; | ||||||||||||||||||||||||||||||||||||||||||
| 1138 | |||||||||||||||||||||||||||||||||||||||||||
| 1139 | 0 | ▶ | use overload '""' => sub { scalar shift->ec }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
Subroutine
__ANON__: not called CC=1 SCAR=0.2
| |||||||||||||||||||||||||||||||||||||||||||
| 1140 | |||||||||||||||||||||||||||||||||||||||||||
| 1141 | 0 | ▶ | sub pdbid { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pdbid: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1142 | 0 | return substr(${$_[0]}, 0, 4); | |||||||||||||||||||||||||||||||||||||||||
| 1143 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1144 | |||||||||||||||||||||||||||||||||||||||||||
| 1145 | 0 | ▶ | sub chainid { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
chainid: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1146 | 0 | return substr(${$_[0]}, 5, 1); | |||||||||||||||||||||||||||||||||||||||||
| 1147 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1148 | |||||||||||||||||||||||||||||||||||||||||||
| 1149 | 0 | ▶ | sub ec { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
ec: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 1150 | 0 | local $_ = substr(${$_[0]}, 7); | |||||||||||||||||||||||||||||||||||||||||
| 1151 | 0 | ▶ | return wantarray ? split(', ', $_) : $_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1152 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1153 | |||||||||||||||||||||||||||||||||||||||||||
| 1154 | ################################################################################ | ||||||||||||||||||||||||||||||||||||||||||
| 1155 | |||||||||||||||||||||||||||||||||||||||||||
| 1156 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 1157 | |||||||||||||||||||||||||||||||||||||||||||
| 1158 | __END__ | ||||||||||||||||||||||||||||||||||||||||||