G2C::Documentation for classes

Introduction to documentation

perlmod2www.pl

These pages have been automatically generated by perlmod2www.pl release 1.1. For any problem or suggestion, please contact Raphael Leplae - see also - SourceForge - for more information.

Navigation

Top right panel
Displays the directory tree with the Perl modules using "Perl syntax" for the paths. Click on one path to display in the bottom right panel the Perl modules available. The All modules link displays all the modules available in the bottom right panel (default view)
Bottom right panel
Displays the modules available in a particular directory level or all the modules available (shown by default). Click on one of the modules to display the documentation in the main (this) panel. Clicking on the library level name will display in the main panel the table of content for the level.
Main panel
Display documentation about a particular Perl module. The documentation is subdivided in several parts (may vary) presenting the POD found in the file, information about included packages, inheritance, subroutines code, etc...

warning

The content presented in these pages might not be 100% accurate! Some data might be missing, in particular in the Perl source code which is presented only as a complement to the POD. Better access the original source code either through the "Raw content" link in the documentation page if available or directly through the Perl module file.

GeneTargeting::ControlledVocabulary

Description
Implements controlled vocabularies/dictionaries for the GeneTargeting package.
Included modules
  • Carp
  • Data::Dumper

Methods

GeneTargeting::DBEntry::ComponentHit

Inherit
GeneTargeting::DBEntry
Description
A sub-alignment from a pairwise similarity search. One or more ComponentHits making up a GeneTargeting::DBEntry::Hit
Included modules
  • Carp
Constructor
 
  my $seq = GeneTargeting::DBEntry::ComponentHit->new;
Database storage
See GeneTargeting::DBSQL::ComponentHitAdaptor

Methods

GeneTargeting::DBEntry::Conf::Exonerate

Inherit
GeneTargeting::DBEntry::Conf
Description
Object holding configuration parameters for an exonerate search. See: http://www.ebi.ac.uk/~guy/exonerate
Private package variables
  • @param = qw{ args fasta_dir ext_db_id query_batch_size }
Included modules
  • Carp
Database storage
See GeneTargeting::DBSQL::ConfAdaptor;

Methods

GeneTargeting::DBEntry::Conf

Inherit
GeneTargeting::DBEntry
Description
Baseclass for configuration objects. See GeneTargeting::DBEntry::Exonerate
Included modules
  • Carp
Constructor
  my $Conf = GeneTargeting::DBEntry::Conf->new;
Database storage
See GeneTargeting::DBSQL::ConfAdaptor
Get/Set methods
  $Conf->id(2);
  my $id = $Conf->id;

  $Conf->name('WuBlastX_SWALL');
  my $Conf_name = $Conf->name;

  $Conf->description('Translated WuBlastX search of SWALL');
  my $description = $Conf->description;

  $Conf->text('text');

Methods

GeneTargeting::DBEntry::ControlledVocabularyItem

Inherit
GeneTargeting::DBEntry
Description
Object representing a single entry in a ControlledVocabulary.
Private package variables
  • $SEPERATOR = ","
Included modules
  • Carp

Methods

GeneTargeting::DBEntry::DNAProbe

Inherit
GeneTargeting::DBEntry
Description
Object representing a Southern blot probe design.
Included modules
  • Carp
Constructor
  my $probe = $GeneTargeting::DBEntry::DNAProbe;
  $probe->name('5primebetapix');
  $probe->description('Upstream of Beta pix'3)
Database storage
See GeneTargeting::DBSQL::DNAProbeAdaptor

Methods

GeneTargeting::DBEntry::ExternalDB

Description
Object representing an external database (from which GeneTargeting::DBEntry::Xref objects are drawn)
Included modules
  • Carp
Database storage
See GeneTargeting::DBSQL::ExternalDBAdaptor

Methods

GeneTargeting::DBEntry::Hit

Inherit
GeneTargeting::DBEntry
Description
Object representing a sequence match (Hit) from a pairwise similarity search, itself composed of several sub-alignments (ComponentHits)
Included modules
  • Carp
  • Digest::MD5
Constructor
 
  my $hit = GeneTargeting::DBEntry::Hit->new;
Database storage
See GeneTargeting::DBSQL::HitAdaptor

Methods

GeneTargeting::DBEntry

Description
Base class for the business objects stored and retrieved in the GeneTargeting (analysis) database
Private package variables
  • $allow_address_defaults_for_contacts;
  • $cv_object;
Included modules

Methods

GeneTargeting::DBEntry::Job

Inherit
GeneTargeting::DBEntry
Description
Object to hold a job for a particular type of analysis for a given set of sequences. In the Southern blot design system these would be putative probes for searching against the target genome with an alignment programme such as Exonerate.
Private package variables
  • %valid = ( 'created' => 1, 'submitted' => 1, 'running' => 1, 'success' => 1, 'failed' => 1, )
Included modules
  • Carp
Constructor
  my $job = $GeneTargeting::DBEntry::Job;
  $job->analysis_conf_id(3)
  $job->state('created');
Database storage
See GeneTargeting::DBSQL::JobAdaptor

Methods

GeneTargeting::DBEntry::Sequence

Inherit
GeneTargeting::DBEntry
Description
Object to hold fragment of genomic sequence from a known position in an assembly. For the object to be stored in the databsase the assembly, chromosome, and start and ending coordinates and strand must be set.
Included modules
Constructor
 
  my $seq = GeneTargeting::DBEntry::Sequence->new;
  $seq->assembly('NCBIM33');
  $seq->chromosome('Y');
  $seq->start(22052902);
  $seq->end(22052962);
  $seq->strand(1);
  $seq->dna('GTTTTATTAGCTTCAAATCAGACAATACCATGAAAGTTCATT
  TTCAGAAGGGTTAAGTGGA');
Database storage
See GeneTargeting::DBSQL::SequenceAdaptor

Methods

GeneTargeting::DBEntry::Xref

Inherit
GeneTargeting::DBEntry
Description
A cross-reference to an entry in an external database.
Included modules
  • Carp
Database storage
See GeneTargeting::DBSQL::XrefAdaptor

Methods

GeneTargetingDB

Included modules
Usage
Add a 'use GeneTargetingDB;' to programs if you want to use the GeneTargeting::DBEntry objects and store and fetch them from the MySQL database, with the various GeneTargeting::DBSQL::DBAdaptor objects

GeneTargeting::DBSQL::BaseAdaptor

Description
This is the super class from which all the GeneTargeting::DBSQL:: adaptors inherit, and is not used directly.
Synopsis
  use GeneTargetingDB;
Private package variables
  • %debug_by_adaptor_type;
  • $all_debug;
  • $debug_privacy;
Included modules
  • Carp
  • Data::Dumper
  • GeneTargeting::Defs
  • GeneTargeting::Utils qw ( map_dbentry_type_to_adaptor map_adaptor_type_to_dbentry validate_date_string convert_date_string_to_mysql_date_string convert_mysql_date_string_to_date_string verify_known_taxon_id strip_dbentry_type_prefix validate_g2c_stable_id_not_fatal )
  • Scalar::Util ' weaken '

Methods

GeneTargeting::DBSQL::ConfAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::Conf objects.
Included modules
  • Carp
Usage
  my $conf = GeneTargeting::DBEntry::Conf::Exonerate->new;
  $conf->name('Exonerate_mouse_NCBIM33');
  $conf->description('Search against mouse genome NCBI33 assembly');
  $conf->args('--bestn 1');
  $conf_aptr->store($conf);

  my $conf = $conf_aptr->fetch_by_db_id(1);
  
  my $conf = $conf_aptr->fetch_by_name('Exonerate_mouse_NCBIM33');
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $conf_aptr = $dba->get_ConfAdaptor()
    or confess "Could not get ConfAdaptor";

Methods

GeneTargeting::DBSQL::DBAdaptor

Description
DBAdaptor for the GeneTargeting MySQL analysis database.
 my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
 $dba->host($host);
 $dba->db($db);
 $dba->user($user);
 $dba->pass($pass);
 $dba->privacy($privacy)
 $dba->dbh;         #To actually make the connection
The method names are pretty self-explanatory.
Call the various get_Adaptor methods to get specific DBAdaptors allowing one to store and retrieve the various GeneTargeting::DBEntry:: objects from the database e.g.
  my $seq_aptr = $dba->get_SequenceAdaptor();
Connecting to the database with $dba->dbh causes controlled vocabulary information to be read from the database, which is cached in the GeneTargeting::DBEntry module (this doesnt happen if $dba->db =~ /login/i)
Included modules

Methods

GeneTargeting::DBSQL::DNAProbeAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::DNAProbe objects, and also the Sequence ids that are linked to the DNAProbe
Included modules
  • Carp
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $job_aptr = $dba->get_DNAProbeAdaptor()
    or confess "Could not get DNAProbeAdaptor";

Methods

GeneTargeting::DBSQL::ExernalDBAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::ExternalDB objects.
Included modules
  • Carp
Usage
  my $ext_db = GeneTargeting::DBEntry::ExternalDB->new;
  $ext_db->db_name('test');
  $ext_db->display_label('test_db');
  $ext_db->sequence_source('obda::/crap');
  $ext_db->description('description here');
  $ext_db_aptr->store($seq);
    
  my $fetched_ext_db = $ext_db_aptr->fetch_by_db_id(1);
  my $fetched_ext_db = $ext_db_aptr->fetch_by_name('test');
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $ext_db_aptr = $dba->get_ExternalDBAdaptor()
    or confess "Could not get ExternalDBAdaptor";

Methods

GeneTargeting::DBSQL::HitAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing/fetching GeneTargeting::DBEntry::Hit objects
Included modules
  • Carp
Usage
  $hit_aptr->store($hit);
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $hit_aptr = $dba->HitAdaptor()
    or confess "Could not get HitAdaptor";

Methods

GeneTargeting::DBSQL::JobAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::Job objects, and also the Sequence ids that make up the job.
Included modules
  • Carp
Usage
  my $job = GeneTargeting::DBEntry::Job->new;
  $job->analysis_conf_id(10);
  $job->state('created');
   
  $job_aptr->update($job)   #For example to change the state stored in db
  $job_aptr->store($job);
  
  my $fetched_job = $job_aptr->fetch_by_db_id(1);
  
  $job_aptr->store_Job_Error($job, 'failed to complete');
  
  $job_aptr->store_Job_Sequence($job, $sequence);
  my $seq_ids = $job_aptr->get_Sequence_ids($fetched_job);
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $job_aptr = $dba->get_JobAdaptor()
    or confess "Could not get JobAdaptor";

Methods

GeneTargeting::DBSQL::SequenceAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::Sequence objects.
Included modules
  • Carp
Usage
  my $seq = GeneTargeting::DBEntry::Sequence->new;
  $seq->assembly('NCBIM33');
  $seq->chromosome('Y');
  $seq->start(22052902);
  $seq->end(22052962);
  $seq->strand(1);
  $seq->dna('GTTTTATTAGCTTCAAATCAGACAATACCATGAAAGTTCATT
    TTCAGAAGGGTTAAGTGGA');

  $seq_aptr->store($seq);
    
  my $fetched_seq = $seq_aptr->fetch_by_db_id(1);
    
  my $fetched_seq = $seq_aptr->fetch_by_genomic_location(
        'NCBIM33', 'Y', 22052902, 22052962, 1);
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $seq_aptr = $dba->get_SequenceAdaptor()
    or confess "Could not get SequenceAdaptor";

Methods

GeneTargeting::DBSQL::SequenceHitAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing/fetching GeneTargeting::DBEntry::ComponentHit objects
Included modules
  • Carp
Usage
  $seq_hit_aptr->store($seq_hit);

Methods

GeneTargeting::DBSQL::XrefAdaptor

Inherit
GeneTargeting::DBSQL::BaseAdaptor
Description
Database adaptor for storing and fetching GeneTargeting::DBEntry::Xref objects.
Included modules
  • Carp
Usage
  my $xref = GeneTargeting::DBEntry::Xref->new;
  $xref->ext_db_id(3);
  $xref->gene_name('blah1');
  $xref->accession('AF83883');
  $xref->db_name('test');
  $xref->description('the blah1 gene');

  $xref_aptr->store($xref);
  
  my $fetched_xref = $xref_aptr->fetch_by_db_id(2);
  
  my $xref = $xref_aptr->fetch_by_accession_and_ext_db_id('AF83883', 2);
Constructor
  my $dba = GeneTargeting::DBSQL::DBAdaptor->new;
  my $xref_aptr = $dba->get_XrefAdaptor()
    or confess "Could not get XrefAdaptor";

Methods

GeneTargeting::Defs

Description
Use to hold (mostly) constant definitions and keep them from being repeated throughout the codebase. Variables are not exported to Main with Exporter, but instead need to be fully-qualified: Example use:
  use GeneTargeting::Defs;

  print join("\n", @GeneTargeting::Defs::object_types), "\n";
Private package variables
  • $debug = 1
Included modules
  • Carp

GeneTargeting::Utils::Config

Description
Utility module to parse .ini configuration files and check that mandatory and optional parameters are found. Requires a 'configure_parameters' routine in the calling programme to find what the expected parameters are, which returns two references to hashes of arrays, representing the section and value format of the .ini file(s). If these are not found in the parsed file, a fatal error occurs.
    sub configure_parameters {

        my $mandatory = {};
        my $optional  = {};

        $mandatory->{'flank_size'} = ['size'];

        $mandatory->{'five_prime_arm'} = ['min', 'max'];
        $mandatory->{'five_prime_arm'} = ['min', 'max'];

        $optional->{'three_prime_arm'} = ['min', 'max'];
        return ($mandatory, $optional);
    }
The corresponding .ini file would need to contain at least the following first two sections []:
    [flank_size]
    size = 10000

    [five_prime_arm]

    min = 6500
    max = 15000

    [three_prime_arm]

    min = 3500
    max = 15000
Methods names will be the concatenated section_name_variable_name, so in the example above: flank_size_size, five_prime_arm_min, etc.
Thus they need to be valid Perl method names (they cannot contain spaces, and must start with a letter. This is checked, and causes a fatal error should they not be validated. These could then be acessed as: my $size = $config->flank_size_size(); $config->flank_size_size(1000); Information that MUST be present in the .ini file:
--------------------------------------------------
[binary paths]
linux = /nfs/team71/analysis/mdr/bin/linux
osf1  = /nfs/team71/analysis/mdr/bin/osf1 (Or an entry for whatever $^O says the os_type is) (Used by _set_path_by_os_type_from_config)
[tmp_dir]
loc = /tmp (Used by _set_tmp_dir to set $ENV{TMPDIR})
Optional sections in the .ini file
----------------------------------
[http_proxy]
url = http://wwwcache.sanger.ac.uk:3128
Utilises the Config::IniFiles library for .ini file parsing.
Synopsis
my $config = GeneTargeting::Utils::Config->new($filename, $debug);
Private package variables
  • (@parameters, @values);
Included modules

Methods

GeneTargeting::Utils::Exonerate

Description
Utility module to parse exonerate output
Synopsis
  my $file = 'exonerate_output';

  {
     my $exonerate_fh = parse_exonerate_file($file);
     unless ($exonerate_fh) {
       die "Could not open exonerate file for reading '$file': $!"
     } 
     while (my $exonerate_result = get_next_exonerate_result($exonerate_fh)) {
       #Do something;
     }
  }
Global variables
  • @EXPORT = ('parse_exonerate_file', 'get_next_exonerate_result')
Included modules
  • Carp
  • Exporter
  • IO::File

Methods

GeneTargeting::Utils::GD

Global variables
  • @EXPORT
Private package variables
  • %valid_font_names = ( 'Small' => 1, 'Large' => 1, 'MediumBold' => 1, 'Tiny' => 1, 'Giant' => 1, )
  • (%rgb_codes, %allocated_colours, @colours);
Included modules
  • Carp
  • Exporter
  • GD

Methods

GeneTargeting::Utils

Description
Utility package used extensively by the various scripts and modules. Individual routines exported to main on request.
Global variables
  • @EXPORT_OK
Private package variables
  • $temp_file_time;
  • %checked_progs;
  • %valid_mime_types;
  • %mime_types_by_ext;
  • $dbh;
  • $debug;
  • %latin_names_by_taxon_id;
  • %taxon_ids;
  • %taxon_ids_by_latin_name;
Included modules

Methods

GeneTargeting::Utils::HTMLReport

Description
Utility module to construct an html file in memory, appending and prepending to it as necessary:
  my $html = GeneTargeting::Utils::HTMLReport->new;
  $html->header('Header txt');
  $html->title('Test output');
  $html->append('text');
  $html->prepend('text);
  $html->write('filename');
Call $html->clear to start building afresh. Also has a number of methods which when passed Ensembl objects, adds various report information to the html.
Included modules
  • Carp
  • IO::File
Constructor
my $html = GeneTargeting::Utils::HTMLReport->new;

Methods

GeneTargeting::Utils::Primer3

Description
Utility module to design primers with Primer3, utilising the wrapping provided by the Bio::Tools::Run::Primer3 module (tested with bioperl-run-1.4.tar.gz) Automatically converts to Bioperl/Ensembl base-numbering conventions, with start always less than end. Exports a number of subroutines into the main package by default.
Global variables
  • @EXPORT
Included modules
  • Bio::Seq
  • Bio::Tools::Run::Primer3
  • Carp
  • Exporter
  • IO::File

Methods

© G2C 2014. The Genes to Cognition Programme received funding from The Wellcome Trust and the EU FP7 Framework Programmes:
EUROSPIN (FP7-HEALTH-241498), SynSys (FP7-HEALTH-242167) and GENCODYS (FP7-HEALTH-241995).

Cookies Policy | Terms and Conditions. This site is hosted by Edinburgh University and the Genes to Cognition Programme.