perl-UTRdb

The perl-UTRdb module is a simple, yet powerful object-oriented Perl interface to the ITB's UTRdb database. It allows the automatic retrieval of up-to-date UTRs sequences for multiple organisms from UTRdb with a few code lines.

Synopsis

							use UTRdb;
  
							my $utrdb = UTRdb->new(taxid => 9606);
							my $found = $utrdb->search("myc");
							
							if (!$utrdb->error()) {
							  
							  print "Total entries: " . $found . "\n";
							  
							  # Prints UTR Locus for each entry
							  while(my $entry = $utrdb->read()) { print "\nUTRdb Locus: " . $entry->locus(); }
							  
							}

Methods
new()
This method accepts the following parameters:

- database ["UTRef" or 0 - "UTRfull" or 1] (Default: 0)
- type [3 - 5 - ALL] (Default: ALL)
- taxid [Official Taxonomy IDs from NCBI - 0 for ANY] (Default: 0)
- accesstype (Default: 0):

   "Name" or 0,
   "RefSeq" or 1,
   "GeneID" or 2,
   "Unigene" or 3,
   "GOId" or 4,
   "MIM" or 5,
   "Accession" or 6,
   "Locus" or 7,
   "GOTerm" or 10

- timeout [Connection timeouts in seconds] (Default: 10)
- useragent [UserAgent string] (Default: perl-UTRdb)

search($term)
Searches a given search term. Returns the number of available entries.

read()
Reads the next available entry. Returns an UTRdb::UTR object.

							while(my $entry = $utrdb->read()) {
						
								# $entry is an UTRdb::UTR object
						
								print "Name:      " . $entry->name() . "\n" .
								      "Sequence:  " . $entry->sequence() . "\n" .
								      "Accession: " . $entry->accession() . "\n" .
								      "TaxID:     " . $entry->taxid() . "\n" .
								      "Locus:	  " . $entry->locus() . "\n" .
								      "Region:    " . $entry->region() . "\n" .
								      "Length:    " . $entry->length() . "\n\n";
						
							}

error()
If defined, some error has occured. Returns the error's description.

Author(s) & Copyright
Development: Dr. Danny Incarnato (danny.incarnato[at]hugef-torino.org, HuGeF)
XML Schema Implementation: Dr. Antonio Turi (turi.antonio[at]gmail.com, ITB)

This library is free software.
It can be redistributed and/or modified under the same terms as Perl itself, either Perl version 5.12.0 or, at your option, any later version of Perl 5.
Please always cite the original source and author.

Download
Download