function tripal_feature_job_describe_args
2.x tripal_feature.module | tripal_feature_job_describe_args($callback, $args) |
3.x tripal_feature.module | tripal_feature_job_describe_args($callback, $args) |
1.x tripal_feature.module | tripal_feature_job_describe_args($callback, $args) |
Related topics
File
- tripal_feature/
tripal_feature.module, line 2202 - @todo Add file header description
Code
function tripal_feature_job_describe_args($callback, $args) {
$new_args = array();
if ($callback == 'tripal_feature_load_fasta') {
$new_args['FASTA file'] = $args[0];
$organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[1]));
$new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
$new_args['Sequence Type'] = $args[2];
$new_args['Name Match Type'] = $args[14];
$new_args['Name RE'] = $args[4];
$new_args['Unique Name RE'] = $args[5];
// add in the relationship arguments
$new_args['Relationship Type'] = $args[8];
$new_args['Relationship Parent RE'] = $args[9];
$new_args['Relationship Parent Type'] = $args[10];
// add in the database reference arguments
if ($args[7]) {
$db = tripal_core_chado_select('db', array('name'), array('db_id' => $args[7]));
}
$new_args['Database Reference'] = $db[0]->name;
$new_args['Accession RE'] = $args[6];
$new_args['Method'] = $args[11];
// add in the analysis
if ($args[13]) {
$analysis = tripal_core_chado_select('analysis', array('name'), array('analysis_id' => $args[13]));
}
$new_args['Analysis'] = $analysis[0]->name;
}
if ($callback == 'tripal_feature_delete_features') {
if ($args[0]) {
$organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[0]));
$new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
}
else {
$new_args['Organism'] = '';
}
if ($args[1]) {
$analysis = tripal_core_chado_select('analysis', array('name'), array('analysis_id' => $args[1]));
$new_args['Analysis'] = $analysis[0]->name;
}
else {
$new_args['Analysis'] = '';
}
$new_args['Sequence Type'] = $args[2];
$new_args['Is Unique Name'] = $args[3];
$new_args['Features Names'] = $args[4];
}
elseif ($callback == 'tripal_feature_load_gff3') {
$new_args['GFF File'] = $args[0];
$organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[1]));
$new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
$analysis = tripal_core_chado_select('analysis', array('name'), array('analysis_id' => $args[2]));
$new_args['Analysis'] = $analysis[0]->name;
$new_args['Use a Transaction'] = ($args[7] == 1) ? "Yes" : "No";
$new_args['Import only new features'] = ($args[3] == 1) ? "Yes" : "No";
$new_args['Import all and update'] = ($args[4] == 1) ? "Yes" : "No";
$new_args['Import all and replace'] = ($args[5] == 1) ? "Yes" : "No";
$new_args['Delete features'] = ($args[6] == 1) ? "Yes" : "No";
$target_organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[8]));
$new_args['Target organism'] = $target_organism[0]->genus . " " . $target_organism[0]->species;
$new_args['Target type'] = $args[9];
$new_args['Create target'] = ($args[10] == 1) ? "Yes" : "No";
$new_args['Starting line'] = $args[11];
$new_args['Landmark Type'] = $args[12];
$new_args['Alternate ID attribute'] = $args[13];
$new_args['Create Organism'] = ($args[14] == 1) ? "Yes" : "No";
}
if ($callback == 'tripal_feature_sync_features') {
if ($args[0]) {
$organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $args[0]));
$new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
}
else {
$new_args['Organism'] = '';
}
$new_args['Feature Types'] = $args[1];
}
return $new_args;
}