~ubuntu-branches/ubuntu/precise/bioperl/precise

« back to all changes in this revision

Viewing changes to Bio/DB/HIV.pm

  • Committer: Bazaar Package Importer
  • Author(s): Ilya Barygin
  • Date: 2010-01-27 22:48:22 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100127224822-ebot4qbrjxcv38au
Tags: 1.6.1-1ubuntu1
* Merge from Debian testing, remaining changes:
  - disable tests, they produce a FTBFS trying to access the network 
    during run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# BioPerl module for Bio::DB::HIV
4
4
#
 
5
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
 
6
#
5
7
# Cared for by Mark A. Jensen <maj@fortinbras.us>
6
8
#
7
9
# Copyright Mark A. Jensen
52
54
  bioperl-l@bioperl.org                  - General discussion
53
55
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
54
56
 
 
57
=head2 Support 
 
58
 
 
59
Please direct usage questions or support issues to the mailing list:
 
60
 
 
61
I<bioperl-l@bioperl.org>
 
62
 
 
63
rather than to the module maintainer directly. Many experienced and 
 
64
reponsive experts will be able look at the problem and quickly 
 
65
address it. Please include a thorough description of the problem 
 
66
with code and data examples if at all possible.
 
67
 
55
68
=head2 Reporting Bugs
56
69
 
57
70
Report bugs to the Bioperl bug tracking system to help us keep track
66
79
 
67
80
=head1 CONTRIBUTORS
68
81
 
 
82
Mark A. Jensen
 
83
 
69
84
=head1 APPENDIX
70
85
 
71
86
The rest of the documentation details each of the object methods.
78
93
 
79
94
package Bio::DB::HIV;
80
95
use strict;
 
96
use warnings;
81
97
use vars qw( $LANL_BASE $LANL_MAP_DB $LANL_MAKE_SEARCH_IF $LANL_SEARCH );
82
98
 
83
99
# Object preamble - inherits from Bio::DB::WebDBSeqI
367
383
        $self->throw(-class=>'Bio::Root::BadParameter',
368
384
                     -text=>'No data found in repsonse',
369
385
                     -value=>%args) unless (@data);
370
 
        shift @data; # number-returned line
 
386
        my $l;
 
387
        do {
 
388
            $l = shift @data;
 
389
        } while  ( $l !~ /Number/ ); # number-returned line
371
390
        @cols = split( /\t/, shift @data);
372
391
 
373
392
        # if Accession column is present, get_Stream_by_acc was called
374
393
        # otherwise, return lanl ids
375
 
        ($idkey) = grep /SE.id/, @cols unless ($idkey) = grep /Accession/, @cols;
 
394
        ($idkey) = grep /SE.id/i, @cols unless ($idkey) = grep /Accession/i, @cols;
376
395
        $self->throw(-class=>"Bio::ResponseProblem::Exception",
377
396
                     -text=>"Trouble with column headers in LANL response",
378
 
                     -value=>\@cols) unless $idkey;
 
397
                     -value=>join(' ',@cols)) unless $idkey;
379
398
        
380
399
        foreach (@data) {
381
400
            chop;