ArrayExpress::AutoSubmission::Creator - A class providing convenience methods for experiment object creation and insertion into the autosubmissions tracking database.
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();
This module provides some basic convenience methods to automate error handling when inserting new experiments into the tracking database.
new()Object constructor. Takes a hashref of options, including the following:
loginThe login name of the user to which the experiment should be assigned.
nameThe name of the experiment
spreadsheetThe path to spreadsheet file to be inserted.
data_filesAn arrayref listing the paths to the data files to be inserted.
accessionThe accession number for the experiment.
commentAny comments to be attached to the experiment.
experiment_typeThe experiment type. This should typically be one of the following: MAGE-TAB, Tab2MAGE, MIAMExpress, GEO, MUGEN, Unknown.
clobberA flag indicating whether to overwrite files without prompting the user.
organismsAn arrayref of organism scientific names to associate with this experiment.
mk_passwdReturns a random string suitable for use as an account password. Can pass an optional length argument, otherwise defaults to eight characters.
insert_spreadsheetCopy the spreadsheet file into the appropriate filesystem location and insert a record into the database.
insert_data_filesCopy the data files into the appropriate filesystem location and insert records into the database.
get_userReturns the appropriate Class::DBI user object as retrieved from (or inserted into) the database.
get_experimentReturns the appropriate Class::DBI experiment object as retrieved from (or inserted into) the database.
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.