113
113
Bioperl modules. Send your comments and suggestions preferably to one
114
114
of the Bioperl mailing lists. Your participation is much appreciated.
116
bioperl-l@bioperl.org - General discussion
117
http://bio.perl.org/MailList.html - About the mailing lists
116
bioperl-l@bioperl.org - General discussion
117
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
119
119
=head2 Reporting Bugs
121
121
Report bugs to the Bioperl bug tracking system to help us keep track
122
the bugs and their resolution. Bug reports can be submitted via email
122
the bugs and their resolution. Bug reports can be submitted via the
125
bioperl-bugs@bio.perl.org
126
http://bugzilla.bioperl.org/
125
http://bugzilla.open-bio.org/
128
127
=head1 AUTHOR - Ed Green
845
Usage : returns array of residue identifiers for all residues in
846
the output file, or in a specific chain
848
Example : @residues_ids = $dssp_obj->residues()
849
Returns : array of residue identifiers
850
Args : if none => returns residue ids of all residues of all
851
chains (in order); if chain id is given, returns just the residue
852
ids of residues in that chain
857
# Can't use the standard interface for getting the amino acid,
858
# pdb_resnum, etc. in this method because we don't *know* the residue
859
# indentifiers - we are building a list of them.
864
my $num_res = $self->_numResLines();
866
for ( my $i = 1; $i <= $num_res; $i++ ) {
867
# find what character was in the slot for tha amino acid code,
868
# if it's a '!' we know this is not a *real* amino acid, it's
869
# a chain discontinuity marker
870
$aa = $self->{ 'Res' }->[ $i ]->{ 'amino_acid' };
873
$chain eq $self->{ 'Res' }->[ $i ]->{ 'pdb_chain' } ) {
875
$self->{ 'Res' }->[ $i ]->{ 'pdb_resnum' }.
876
$self->{ 'Res' }->[ $i ]->{ 'insertionco' }.
878
$self->{ 'Res' }->[ $i ]->{ 'pdb_chain' } );
892
933
push( @frags, $pot_chain );
896
937
# if that didn't work, just get the first one
897
938
if ( !( @frags ) ) {
898
939
$chain = $contSegs_pnt->[ 0 ]->[ 2 ];
899
940
foreach $pot_chain ( @{ $contSegs_pnt } ) {
900
941
if ( $pot_chain->[ 2 ] eq $chain ) {
901
push( @frags, $chain );
942
push( @frags, $pot_chain );
1165
1206
# Now find the residue which fits this description. Linear search is
1166
1207
# probably not the best way to do this, but oh well...
1167
1208
for ( my $i = 1; $i <= $self->_numResLines(); $i++ ) {
1168
if ( $key_num == $self->{'Res'}->[$i]->{'pdb_resnum'} ) {
1169
if ( $chain_id ) { # if a chain was specified
1170
if ( $chain_id eq $self->{'Res'}->[$i]->{'pdb_chain'} ) {
1171
# and it's the right one
1172
if ( $ins_code ) { # if insertion code was specified
1173
if ( $ins_code eq $self->{'Res'}->[$i]->{'insertionco'} ) {
1174
# and it's the right one
1209
unless ( ($self->{'Res'}->[$i]->{'term_sig'} eq '*') ||
1210
($self->{'Res'}->[$i]->{'amino_acid'} eq '!') ) {
1211
# chain break 'residue', doesn't match anything
1212
if ( $key_num == $self->{'Res'}->[$i]->{'pdb_resnum'} ) {
1213
if ( $chain_id ) { # if a chain was specified
1214
if ( $chain_id eq $self->{'Res'}->[$i]->{'pdb_chain'} ) {
1215
# and it's the right one
1216
if ( $ins_code ) { # if insertion code was specified
1217
if ( $ins_code eq $self->{'Res'}->[$i]->{'insertionco'} ) {
1218
# and it's the right one
1222
else { # no isertion code specified, this is it
1178
else { # no isertion code specified, this is it
1183
else { # no chain was specified
1227
else { # no chain was specified
1264
# REFERENCE line (always there)
1219
1265
$cur = <$file>;
1220
1266
( $element ) = ( $cur =~ /^REFERENCE\s+(.+?)\s+\./ );
1221
1267
$head{ 'REFERENCE' } = $element;
1223
1269
$cur = <$file>;
1224
@elements = split( /\s+/, $cur );
1225
pop( @elements ); # take off that annoying period
1226
$head{ 'PDB' } = pop( @elements );
1227
$head{ 'DATE' } = pop( @elements );
1228
# now, everything else is "header" except for the word
1231
$element = shift( @elements );
1232
while ( @elements ) {
1233
$element = $element." ".shift( @elements );
1235
$head{ 'HEADER' } = $element;
1238
($element) = ( $cur =~ /^COMPND\s+(.+?)\s+\./ );
1239
$head{ 'COMPND' } = $element;
1242
($element) = ( $cur =~ /^PDBSOURCE\s+(.+?)\s+\./ );
1243
$head{ 'SOURCE' } = $element;
1246
($element) = ( $cur =~ /^AUTHOR\s+(.+?)\s+/ );
1247
$head{ 'AUTHOR' } = $element;
1270
# Check for HEADER line (not always there)
1271
if ( $cur =~ /^HEADER\s/ ) {
1272
@elements = split( /\s+/, $cur );
1273
pop( @elements ); # take off that annoying period
1274
$head{ 'PDB' } = pop( @elements );
1275
$head{ 'DATE' } = pop( @elements );
1276
# now, everything else is "header" except for the word
1279
$element = shift( @elements );
1280
while ( @elements ) {
1281
$element = $element." ".shift( @elements );
1283
$head{ 'HEADER' } = $element;
1288
# Check for COMPND line (not always there)
1289
if ( $cur =~ /^COMPND\s/ ) {
1290
($element) = ( $cur =~ /^COMPND\s+(.+?)\s+\./ );
1291
$head{ 'COMPND' } = $element;
1296
# Check for SOURCE or PDBSOURCE line (not always there)
1297
if ( $cur =~ /^PDBSOURCE\s/ ) {
1298
($element) = ( $cur =~ /^PDBSOURCE\s+(.+?)\s+\./ );
1299
$head{ 'SOURCE' } = $element;
1304
elsif ( $cur =~ /^SOURCE\s/ ) {
1305
($element) = ( $cur =~ /^SOURCE\s+(.+?)\s+\./ );
1306
$head{ 'SOURCE' } = $element;
1311
# Check for AUTHOR line (not always there)
1312
if ( $cur =~ /^AUTHOR/ ) {
1313
($element) = ( $cur =~ /^AUTHOR\s+(.+?)\s+/ );
1314
$head{ 'AUTHOR' } = $element;
1319
# A B C D E TOTAL NUMBER OF RESIDUES, NUMBER ... line
1250
1320
@elements = split( /\s+/, $cur );
1251
1321
shift( @elements );
1252
1322
$head{ 'TotNumRes' } = shift( @elements );