Skip to content

Commit

Permalink
MUSIGHBA1 no longer works as a primary ID, LOCUS apparently is not in…
Browse files Browse the repository at this point in the history
…dexed; fixing
  • Loading branch information
Chris Fields committed Feb 19, 2013
1 parent 7acaea8 commit eb8d5ef
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 108 deletions.
18 changes: 6 additions & 12 deletions Bio/DB/Ace.pm
Expand Up @@ -2,7 +2,7 @@
#
# BioPerl module for Bio::DB::Ace
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Ewan Birney <birney@ebi.ac.uk>
#
Expand All @@ -20,7 +20,7 @@ Bio::DB::Ace - Database object interface to ACeDB servers
$db = Bio::DB::Ace->new( -server => 'myace.server.com', port => '120000');
$seq = $db->get_Seq_by_id('MUSIGHBA1'); # Unique ID
$seq = $db->get_Seq_by_id('J00522'); # Unique ID
# or ...
Expand Down Expand Up @@ -62,15 +62,15 @@ Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Expand Down Expand Up @@ -208,9 +208,3 @@ sub _aceobj {
}

1;






24 changes: 12 additions & 12 deletions Bio/DB/GenBank.pm
@@ -1,7 +1,7 @@
#
# BioPerl module for Bio::DB::GenBank
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Aaron Mackey <amackey@virginia.edu>
#
Expand All @@ -10,7 +10,7 @@
# You may distribute this module under the same terms as perl itself
#
# POD documentation - main docs before the code
#
#
# Added LWP support - Jason Stajich 2000-11-6
# completely reworked by Jason Stajich 2000-12-8
# to use WebDBSeqI
Expand All @@ -32,7 +32,7 @@ Bio::DB::GenBank - Database object interface to GenBank
use Bio::DB::GenBank;
$gb = Bio::DB::GenBank->new();
$seq = $gb->get_Seq_by_id('MUSIGHBA1'); # Unique ID
$seq = $gb->get_Seq_by_id('J00522'); # Unique ID, *not always the LOCUS ID*
# or ...
Expand All @@ -56,11 +56,11 @@ Bio::DB::GenBank - Database object interface to GenBank
# also don't want features, just sequence so let's save bandwith
# and request Fasta sequence
$gb = Bio::DB::GenBank->new(-retrievaltype => 'tempfile' ,
$gb = Bio::DB::GenBank->new(-retrievaltype => 'tempfile' ,
-format => 'Fasta');
my $seqio = $gb->get_Stream_by_acc(['AC013798', 'AC021953'] );
while( my $clone = $seqio->next_seq ) {
print "cloneid is ", $clone->display_id, " ",
print "cloneid is ", $clone->display_id, " ",
$clone->accession_number, "\n";
}
# note that get_Stream_by_version is not implemented
Expand Down Expand Up @@ -130,15 +130,15 @@ of the Bioperl mailing lists. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Expand Down Expand Up @@ -169,7 +169,7 @@ use strict;
use vars qw(%PARAMSTRING $DEFAULTFORMAT $DEFAULTMODE);

use base qw(Bio::DB::NCBIHelper);
BEGIN {
BEGIN {
$DEFAULTMODE = 'single';
$DEFAULTFORMAT = 'gbwithparts';
%PARAMSTRING = (
Expand All @@ -191,7 +191,7 @@ BEGIN {
'usehistory' => 'n',
'tool' => 'bioperl',
'retmode' => 'text'},
'webenv' => {
'webenv' => {
'query_key' => 'querykey',
'WebEnv' => 'cookie',
'db' => 'nucleotide',
Expand Down Expand Up @@ -352,7 +352,7 @@ instead.
Title : get_request
Usage : my $url = $self->get_request
Function: HTTP::Request
Returns :
Returns :
Args : %qualifiers = a hash of qualifiers (ids, format, etc)
=cut
Expand Down
50 changes: 25 additions & 25 deletions Bio/DB/NCBIHelper.pm
@@ -1,7 +1,7 @@
#
# BioPerl module for Bio::DB::NCBIHelper
#
# Please direct questions and support issues to <bioperl-l@bioperl.org>
# Please direct questions and support issues to <bioperl-l@bioperl.org>
#
# Cared for by Jason Stajich
#
Expand All @@ -10,8 +10,8 @@
# You may distribute this module under the same terms as perl itself
#
# POD documentation - main docs before the code
#
# Interfaces with new WebDBSeqI interface
#
# Interfaces with new WebDBSeqI interface

=head1 NAME
Expand All @@ -23,7 +23,7 @@ NCBI databases.
# Do not use this module directly.
# get a Bio::DB::NCBIHelper object somehow
my $seqio = $db->get_Stream_by_acc(['MUSIGHBA1']);
my $seqio = $db->get_Stream_by_acc(['J00522']);
foreach my $seq ( $seqio->next_seq ) {
# process seq
}
Expand Down Expand Up @@ -51,15 +51,15 @@ is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Expand Down Expand Up @@ -173,22 +173,22 @@ sub default_format {
Title : get_request
Usage : my $url = $self->get_request
Function: HTTP::Request
Returns :
Returns :
Args : %qualifiers = a hash of qualifiers (ids, format, etc)
=cut

sub get_request {
my ($self, @qualifiers) = @_;
my ($mode, $uids, $format, $query, $seq_start, $seq_stop, $strand, $complexity) =
my ($mode, $uids, $format, $query, $seq_start, $seq_stop, $strand, $complexity) =
$self->_rearrange([qw(MODE UIDS FORMAT QUERY SEQ_START SEQ_STOP STRAND COMPLEXITY)],
@qualifiers);
$mode = lc $mode;
($format) = $self->request_format() unless ( defined $format);
if( !defined $mode || $mode eq '' ) { $mode = 'single'; }
my %params = $self->get_params($mode);
if( ! %params ) {
$self->throw("must specify a valid retrieval mode 'single' or 'batch' not '$mode'")
$self->throw("must specify a valid retrieval mode 'single' or 'batch' not '$mode'")
}
my $url = URI->new($HOSTBASE . $CGILOCATION{$mode}[1]);
unless( $mode eq 'webenv' || defined $uids || defined $query) {
Expand Down Expand Up @@ -258,10 +258,10 @@ NOTE: deprecated API. Use get_Stream_by_id() instead.
=cut

*get_Stream_by_batch = sub {
*get_Stream_by_batch = sub {
my $self = shift;
$self->deprecated('get_Stream_by_batch() is deprecated; use get_Stream_by_id() instead');
$self->get_Stream_by_id(@_)
$self->get_Stream_by_id(@_)
};

=head2 get_Stream_by_query
Expand Down Expand Up @@ -296,7 +296,7 @@ sub get_Stream_by_query {
Function: process downloaded data before loading into a Bio::SeqIO
Returns : void
Args : hash with two keys - 'type' can be 'string' or 'file'
- 'location' either file location or string
- 'location' either file location or string
reference containing data
=cut
Expand Down Expand Up @@ -324,9 +324,9 @@ sub postprocess_data {
=cut

sub request_format {
my ($self, $value) = @_;
my ($self, $value) = @_;
if( defined $value ) {
$value = lc $value;
$value = lc $value;
if( defined $FORMATMAP{$value} ) {
$self->{'_format'} = [ $value, $FORMATMAP{$value}];
} else {
Expand Down Expand Up @@ -362,7 +362,7 @@ sub redirect_refseq {
Title : complexity
Usage : $db->complexity(3)
Function: get/set complexity value
Function: get/set complexity value
Returns : value from 0-4 indicating level of complexity
Args : value from 0-4 (optional); if unset server assumes 1
Throws : if arg is not an integer or falls outside of noted range above
Expand Down Expand Up @@ -392,7 +392,7 @@ sub complexity {
Title : strand
Usage : $db->strand(1)
Function: get/set strand value
Function: get/set strand value
Returns : strand value if set
Args : value of 1 (plus) or 2 (minus); if unset server assumes 1
Throws : if arg is not an integer or is not 1 or 2
Expand All @@ -408,7 +408,7 @@ sub strand {
$str !~ /^\d+$/ || $str < 1 || $str > 2;
$self->{'_strand'} = $str;
}
return $self->{'_strand'};
return $self->{'_strand'};
}

=head2 seq_start
Expand All @@ -429,7 +429,7 @@ sub seq_start {
$start !~ /^\d+$/;
$self->{'_seq_start'} = $start;
}
return $self->{'_seq_start'};
return $self->{'_seq_start'};
}

=head2 seq_stop
Expand All @@ -450,7 +450,7 @@ sub seq_stop {
$stop !~ /^\d+$/;
$self->{'_seq_stop'} = $stop;
}
return $self->{'_seq_stop'};
return $self->{'_seq_stop'};
}

=head2 Bio::DB::WebDBSeqI methods
Expand Down Expand Up @@ -483,8 +483,8 @@ sub get_Stream_by_acc {
=head2 _check_id
Title : _check_id
Usage :
Function:
Usage :
Function:
Returns : A Bio::DB::RefSeq reference or throws
Args : $id(s), $string
Expand All @@ -495,11 +495,11 @@ sub _check_id {

# NT contigs can not be retrieved
$self->throw("NT_ contigs are whole chromosome files which are not part of regular".
"database distributions. Go to ftp://ftp.ncbi.nih.gov/genomes/.")
"database distributions. Go to ftp://ftp.ncbi.nih.gov/genomes/.")
if $ids =~ /NT_/;

# Asking for a RefSeq from EMBL/GenBank

if ($self->redirect_refseq) {
if ($ids =~ /N._/) {
$self->warn("[$ids] is not a normal sequence database but a RefSeq entry.".
Expand Down

0 comments on commit eb8d5ef

Please sign in to comment.