NAME

Bio::LiveSeq::IO::SRS - Loader for LiveSeq from EMBL entries with SRS

SYNOPSIS

my $db="EMBL";
my $acc_id="M20132";
my $query="embl-acc:$acc_id";

my $loader=Bio::LiveSeq::IO::SRS->load(-db=>"EMBL", -query=>"$query");

my @translationobjects=$loader->entry2liveseq();

my $gene="AR";
my $gene=$loader->gene2liveseq("gene");

NOTE: The only -db now supported is EMBL. Hence it defaults to EMBL.

DESCRIPTION

This package uses the SRS (Sequence Retrieval System) to fetch a sequence database entry, analyse it and create LiveSeq objects out of it.

An embl-acc ID has to be passed to this package which will return references to all translation objects created from the EMBL entry. References to Transcription, DNA and Exon objects can all be retrieved departing from these.

Alternatively, a specific "gene" name can be specified, together with the embl-acc ID. This will create a LiveSeq::Gene object with all relevant gene features attached/created.

AUTHOR - Joseph A.L. Insana

Email: Insana@ebi.ac.uk, jinsana@gmx.net

Address:

EMBL Outstation, European Bioinformatics Institute
Wellcome Trust Genome Campus, Hinxton
Cambs. CB10 1SD, United Kingdom 

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

load

Title   : load
Usage   : my $acc_id="M20132";
          my $query="embl-acc:$acc_id";
          $loader=Bio::LiveSeq::IO::SRS->load(-db=>"EMBL", -query=>"$query");

Function: loads an entry with SRS from a database into a hash
Returns : reference to a new object of class IO::SRS holding an entry
Errorcode 0
Args    : an SRS query resulting in one fetched EMBL (by default) entry

embl2hash

  Title   : embl2hash
  Function: retrieves with SRS an EMBL entry, parses it and creates
            a hash that contains all the information.
  Returns : a reference to a hash
  Errorcode: 0
  Args    : an SRS query resulting in one fetched EMBL entry
              i.e. a string in a form like "embl-acc:accession_number"
	    two array references to skip features and qualifiers (for
	    performance)
  Example: @valid_features=qw(CDS exon prim_transcript mRNA);
           @valid_qualifiers=qw(gene codon_start db_xref product rpt_family);
           $hashref=&embl2hash("$query",\@valid_features,\@valid_qualifiers);

get_swisshash

Title   : get_swisshash
Usage   : $loader->get_swisshash();
Example : $swisshash=$loader->swissprot2hash("SWISS-PROT:P10275")
Function: retrieves with SRS a SwissProt entry, parses it and creates
          a hash that contains all the information.
Returns : a reference to a hash
Errorcode: 0
Args    : the db_xref qualifier's value from an EMBL CDS Feature
          i.e. a string in the form "SWISS-PROT:accession_number"
Note    : this can be modified (adding a second argument) to retrieve
          and parse SWTREMBL, SWALL... entries

swissprot2hash

Title   : swissprot2hash
Usage   : $loader->swissprot2hash();
Example : $swisshash=$loader->swissprot2hash("swissprot-acc:P10275")
Function: retrieves with SRS a SwissProt entry, parses it and creates
          a hash that contains all the information.
Returns : a reference to a hash
Errorcode: 0
Args    : an SRS query resulting in one entry from SwissProt database
          i.e. a string in the form "swissprot-acc:accession_number"
Note    : this can be modified (adding a second argument) to retrieve
          and parse SWTREMBL, SWALL... entries

novelaasequence2gene

Title   : novelaasequence2gene
Usage   : $gene=Bio::LiveSeq::IO::SRS->novelaasequence2gene(-aasequence => "MGLAAPTRS*");
        : $gene=Bio::LiveSeq::IO::SRS->novelaasequence2gene(-aasequence => "MGLAAPTRS*",
                                           -genome => "Homo sapiens");
        : $gene=Bio::LiveSeq::IO::SRS->novelaasequence2gene(-aasequence => "MGLAAPTRS*",
                                           -genome => "Mitochondrion Homo sapiens",
                                           -gene_name => "tyr-kinase");

Function: creates LiveSeq objects from a novel amino acid sequence,
          using codon usage database to choose codons according to
          relative frequencies.
          If a genome latin name is not specified, the default is to use
          'Homo sapiens' (taxonomy ID 9606).
Returns : reference to a Gene object containing references to LiveSeq objects
Errorcode 0
Args    : string containing an amino acid sequence
          string (optional) with a species/genome latin name
          string specifying a gene name
Note    : SRS access to TAXON and CODONUSAGE databases is required