|
@@ -317,31 +317,38 @@ function tripal_feature_job_describe_args($callback, $args) {
|
|
|
$new_args = array();
|
|
|
if ($callback == 'tripal_feature_load_fasta') {
|
|
|
$new_args['FASTA file'] = $args[0];
|
|
|
- $organism = chado_select_record('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 organism.
|
|
|
+ if ($args[1] AND is_numeric($args[1])) {
|
|
|
+ $organism = chado_select_record('organism', array('genus', 'species'), array('organism_id' => $args[1]));
|
|
|
+ $new_args['Organism'] = $organism[0]->genus . " " . $organism[0]->species;
|
|
|
+ }
|
|
|
+ $new_args['Sequence Type'] = $args[2];
|
|
|
+ if (isset($args[14])) {
|
|
|
+ $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];
|
|
|
+ if ($args[8]) {
|
|
|
+ $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]) {
|
|
|
+ if ($args[7] AND is_numeric($args[7])) {
|
|
|
$db = chado_select_record('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];
|
|
|
}
|
|
|
- $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 = chado_select_record('analysis', array('name'), array('analysis_id' => $args[13]));
|
|
|
+ if ($args[12] AND is_numeric($args[12])) {
|
|
|
+ $analysis = chado_select_record('analysis', array('name'), array('analysis_id' => $args[12]));
|
|
|
+ $new_args['Analysis'] = $analysis[0]->name;
|
|
|
}
|
|
|
- $new_args['Analysis'] = $analysis[0]->name;
|
|
|
}
|
|
|
if ($callback == 'tripal_feature_delete_features') {
|
|
|
if ($args[0]) {
|