Tab2MAGE logo Module detail: Creator.pm

NAME

ArrayExpress::AutoSubmission::Creator - A class providing convenience methods for experiment object creation and insertion into the autosubmissions tracking database.


SYNOPSIS

 use ArrayExpress::AutoSubmission::Creator;
 my $creator = ArrayExpress::AutoSubmission::Creator->new({
    login           => $login,
    name            => $expt_name,
    spreadsheet     => $startfile,
    data_files      => \@datafiles,
    accession       => $accession,
    experiment_type => 'MAGE-TAB',
    comment         => 'Submission inserted manually',
    clobber         => 0,
 });
 # Create the experiment and insert the spreadsheet.
 my $expt = $creator->get_experiment();
 # Copy the files to the submissions directory.
 print STDERR ("Copying files...\n");
 $creator->insert_spreadsheet();
 $creator->insert_data_files();

DESCRIPTION

This module provides some basic convenience methods to automate error handling when inserting new experiments into the tracking database.


METHODS

new()

Object constructor. Takes a hashref of options, including the following:

login

The login name of the user to which the experiment should be assigned.

name

The name of the experiment

spreadsheet

The path to spreadsheet file to be inserted.

data_files

An arrayref listing the paths to the data files to be inserted.

accession

The accession number for the experiment.

comment

Any comments to be attached to the experiment.

experiment_type

The experiment type. This should typically be one of the following: MAGE-TAB, Tab2MAGE, MIAMExpress, GEO, MUGEN, Unknown.

clobber

A flag indicating whether to overwrite files without prompting the user.

organisms

An arrayref of organism scientific names to associate with this experiment.

mk_passwd

Returns a random string suitable for use as an account password. Can pass an optional length argument, otherwise defaults to eight characters.

insert_spreadsheet

Copy the spreadsheet file into the appropriate filesystem location and insert a record into the database.

insert_data_files

Copy the data files into the appropriate filesystem location and insert records into the database.

get_user

Returns the appropriate Class::DBI user object as retrieved from (or inserted into) the database.

get_experiment

Returns the appropriate Class::DBI experiment object as retrieved from (or inserted into) the database.


AUTHOR

Tim Rayner (rayner@ebi.ac.uk), ArrayExpress team, EBI, 2008.

Acknowledgements go to the ArrayExpress curation team for feature requests, bug reports and other valuable comments.


SourceForge.net Logo