NAME
Bio::DB::SwissProt - Database object interface to SwissProt retrieval
SYNOPSIS
use Bio::DB::SwissProt;$sp = Bio::DB::SwissProt->new();$seq = $sp->get_Seq_by_id('KPY1_ECOLI'); # SwissProt ID# <4-letter-identifier>_<species 5-letter code># or ...$seq = $sp->get_Seq_by_acc('P43780'); # SwissProt AC# [OPQ]xxxxx# In fact in this implementation# these methods call the same webscript so you can use# then interchangeably# choose a different server to query$sp = Bio::DB::SwissProt->new('-servertype' => 'expasy','-hostlocation' => 'us');$seq = $sp->get_Seq_by_id('BOLA_HAEIN'); # SwissProtID
DESCRIPTION
SwissProt is a curated database of proteins managed by the Swiss Bioinformatics Institute. Additional tools for parsing and manipulating swissprot files can be found at ftp://ftp.ebi.ac.uk/pub/software/swissprot/Swissknife/.
Allows the dynamic retrieval of Sequence objects (Bio::Seq) from the SwissProt database via an Expasy retrieval.
In order to make changes transparent we have host type (currently only expasy) and location (default to Switzerland) separated out. This allows the user to pick the closest Expasy mirror for running their queries.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
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.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email Jason Stajich <[email protected] <
Thanks go to Alexandre Gattiker <[email protected]> of Swiss Institute of Bioinformatics for helping point us in the direction of the correct expasy scripts and for swissknife references.
Also thanks to Heikki Lehvaslaiho <heikki-at-bioperl-dot-org> for help with adding EBI swall server.
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Routines from Bio::DB::RandomAccessI
get_Seq_by_id
Title : get_Seq_by_idUsage : $seq = $db->get_Seq_by_id('ROA1_HUMAN')Function: Gets a Bio::Seq object by its nameReturns : a Bio::Seq objectArgs : the id (as a string) of a sequenceThrows : "id does not exist" exception
get_Seq_by_acc
Title : get_Seq_by_accUsage : $seq = $db->get_Seq_by_acc('X77802');Function: Gets a Bio::Seq object by accession numberReturns : A Bio::Seq objectArgs : accession number (as a string)Throws : "acc does not exist" exception
get_Stream_by_id
Title : get_Stream_by_idUsage : $stream = $db->get_Stream_by_id( [$uid1, $uid2] );Function: Gets a series of Seq objects by unique identifiersReturns : a Bio::SeqIO stream objectArgs : $ref : a reference to an array of unique identifiers forthe desired sequence entries
get_Stream_by_acc
Title : get_Stream_by_accUsage : $seq = $db->get_Seq_by_acc([$acc1, $acc2]);Function: Gets a series of Seq objects by accession numbersReturns : a Bio::SeqIO stream objectArgs : $ref : a reference to an array of accession numbers forthe desired sequence entriesNote : For GenBank, this just calls the same code for get_Stream_by_id()
get_Stream_by_batch
Title : get_Stream_by_batchUsage : $seq = $db->get_Stream_by_batch($ref);Function: Retrieves Seq objects from SwissProt 'en masse', rather than oneat a time. This is implemented the same way as get_Stream_by_id,but is provided here in keeping with access methods of NCBImodules.Example :Returns : a Bio::SeqIO stream objectArgs : $ref : either an array reference, a filename, or a filehandlefrom which to get the list of unique ids/accession numbers.
NOTE: deprecated API. Use get_Stream_by_id() instead.
Implemented Routines from Bio::DB::WebDBSeqI interface
get_request
Title : get_requestUsage : my $url = $self->get_requestFunction: returns a HTTP::Request objectReturns :Args : %qualifiers = a hash of qualifiers (ids, format, etc)
postprocess_data
Title : postprocess_dataUsage : $self->postprocess_data ( 'type' => 'string','location' => \$datastr);Function: process downloaded data before loading into a Bio::SeqIOReturns : voidArgs : hash with two keys - 'type' can be 'string' or 'file'- 'location' either file location or stringreference containing data
default_format
Title : default_formatUsage : my $format = $self->default_formatFunction: Returns default sequence format for this moduleReturns : stringArgs : none
Bio::DB::SwissProt specific routines
servertype
Title : servertypeUsage : my $servertype = $self->servertype$self->servertype($servertype);Function: Get/Set server typeReturns : stringArgs : server type string [optional]
hostlocation
Title : hostlocationUsage : my $location = $self->hostlocation()$self->hostlocation($location)Function: Set/Get HostlocationReturns : string representing hostlocationArgs : string specifying hostlocation [optional]
location_url
Title : locationUsage : my $url = $self->location_url()Function: Get host urlReturns : string representing urlArgs : none
request_format
Title : request_formatUsage : my ($req_format, $ioformat) = $self->request_format;$self->request_format("genbank");$self->request_format("fasta");Function: Get/Set sequence format retrieval. The get-form will normallynot be used outside of this and derived modules.Returns : Array of two strings, the first representing the format forretrieval, and the second specifying the corresponding SeqIOformat.Args : $format = sequence format
idtracker
Title : idtrackerUsage : my ($newid) = $self->idtracker($oldid);Function: Retrieve new ID using old ID.Returns : single ID if one is foundArgs : ID to look for
id_mapper
Title : id_trackerUsage : my $map = $self->id_mapper( -from => '',-to => '',-ids => \@ids);Function: Retrieve new ID using old ID.Returns : hash reference of successfully mapped IDsArgs : -from : database mapping from-to : database mapped to-ids : a single ID or array ref of IDs to mapNote : For a list of valid database IDs, see:http://www.uniprot.org/faq/28#id_mapping_examples