Documentation read from 05/19/2023 16:24:13 version of /vol/kmer-server-prod/FIGdisk.server.rhel6/dist/releases/dev/common/lib/FigKernelPackages/RASTserver.pm.
This file contains the functions and utilities used by the RAST Submission Server . The various methods listed in the sections below represent function calls direct to the server. These all have a signature similar to the following.
my $document = $rastObject->function_name($args);
where $rastObject
is an object created by this module, $args
is a parameter structure, and function_name
is the RAST Server function name. The output document is a structure, generally a hash reference, but sometimes a string or a list reference.
Use
my $rastObject = RASTserver->new($username, $password); Where $username and $password are your RAST username and password.
my $jobH = $rastObject->submit_RAST_job({ -taxonomyID => The NCBI taxonomy id | Domain => [Archaea | Bacteria | Virus] -filetype => [Fasta|Genbank] if Fasta && ! TaxonomyID -geneticCode => [4 | 11] -organismName => Name of the organism -keepGeneCalls => [0 | 1], -geneCaller => [RAST | Glimmer3], -kmerDataset => dataset-name -file => full path to the input file } );
This method submits a job to the RAST server. It returns a hash of:
{jobid} =id {status} = [submitted|error] {error_message} = message
my $rastjobH = $rastObject->status_of_RAST_job({-job => \@jobs});
Where @jobs is a list of jobs
The return value is a hash keyed by Jobid of
{status} = Job Stage {error_msg} = message {verbose-status} = RAST Metadata
my $result = $rastObject->retrieve_RAST_job(-job => $jobid, -format => $format)
where $jobid is the RAST id of the job and
$format is one of:
genbank (Genbank format) genbank_stripped (Genbank with EC numbers removed) embl (EMBL format) embl_stripped (EMBL with EC numbers stripped) gff3 (GFF3 format) gff3_stripped (GFF3 with EC numbers stripped) rast_tarball (gzipped tar file of the entire job)
The return is a hash of
{status} = ok|error {file} = the downloaded file name {error_msg} = The error message
my $ret = rastObject->kill_RAST_job(-job => \@jobids);
where @jobids is an array of RAST job ids to kill.
Return is a hash keyed by Job ID of
{status} = ok|error {messages} = Messages
my $ret = rastObject->delete_RAST_job(-job => \@jobids);
where @jobids is an array of RAST job ids to kill.
Return is a hash keyed by Job ID of
{status} = ok|error {error_message} = Error Message
my $ret = rastObject->get_job_metadata($jobid)
where $jobid is the RAST id of a RAST job
Return is a hash of
{status} = ok|error {error_message} = Error Message {key} => {metdata}
my $result = $rastObject->copy_to_RAST_dir(-job => $jobid, -from => $file_or_dir, -to => $to_dir);
where $jobid is the RAST id of the job,
$file_or_dir is a file or directory to be copied into the RAST UserSpace, and $to_dir is optional. If omitted the copy is to UserSpace. If present, the copy is to UserSpace/$to_dir (intermediate directories get created, if necessary)
The return is a hash of
{status} = ok|error {error_msg} = The error message