diff --git a/tripal_analysis_expression/includes/TripalImporter/tripal_expression_data_loader.inc b/tripal_analysis_expression/includes/TripalImporter/tripal_expression_data_loader.inc index 47e8ebf6..d3253b0a 100644 --- a/tripal_analysis_expression/includes/TripalImporter/tripal_expression_data_loader.inc +++ b/tripal_analysis_expression/includes/TripalImporter/tripal_expression_data_loader.inc @@ -373,52 +373,15 @@ class tripal_expression_data_loader extends TripalImporter{ $quantificationunits = $arguments['quantificationunits']; - //missing - $assaydate = '';//$arguments['assaydate']; - $contact_id = '';//$arguments['contact_id']; - // $acquisitiondate = $arguments['acquisitiondate']; - // $create_biosamples = $arguments['create_biosamples']; - // $quantificationdate = $arguments['quantificationdate']; + //we dont actually use these variables so lets not collect the data. + //but, we do pass it around a million ways so lets declare the variables + $assaydate = null;//$arguments['assaydate']; + $contact_id = null;//$arguments['contact_id']; + $acquisitiondate = null;// $acquisitiondate = $arguments['acquisitiondate']; + $create_biosamples = null;// $create_biosamples = $arguments['create_biosamples']; + $quantificationdate = null;// $quantificationdate = $arguments['quantificationdate']; // - //$record = ['table' => 'analysis', 'id' => $node->analysis_id]; - // - ////insert properties - ////note this is a subset of properties from the original, and im also not sure that we still need it - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_filetype', - // 'cv_name' => 'tripal', - // 'value' => trim($node->filetype), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_submit_job', - // 'cv_name' => 'tripal', - // 'value' => trim($node->submit_job), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_fileext', - // 'cv_name' => 'tripal', - // 'value' => trim($node->fileext), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_filepath', - // 'cv_name' => 'tripal', - // 'value' => trim($node->filepath), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_re_start', - // 'cv_name' => 'tripal', - // 'value' => trim($node->re_start), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_re_end', - // 'cv_name' => 'tripal', - // 'value' => trim($node->re_end), - //]); - //chado_insert_property($record, [ - // 'type_name' => 'analysis_expression_feature_uniquenames', - // 'cv_name' => 'tripal', - // 'value' => trim($node->feature_uniquenames), - //]); + tripal_set_message(t("Job Submitted! If new Biosamples will be created in this job, remember to") . l('publish them after the job runs.', diff --git a/tripal_biomaterial/api/tripal_biomaterial.api.inc b/tripal_biomaterial/api/tripal_biomaterial.api.inc index c11d06a2..d7f726fa 100644 --- a/tripal_biomaterial/api/tripal_biomaterial.api.inc +++ b/tripal_biomaterial/api/tripal_biomaterial.api.inc @@ -268,15 +268,26 @@ function expression_create_biomaterial_structure( //Attach the units to the quantification if ($quantificationunits) { - //insert cvterm. - //TODO move to install. - $cvterm_id = tripal_insert_cvterm([ - 'id' => 'sep:00056', + //get cvterm. + + + $cvterm_id = tripal_get_cvterm([ + 'name' => 'unit_of_measure', - 'cv_name' => 'sep', - 'definition' => 'A unit of measure is a quantity which is a standard of measurement for some dimension. For example, the Meter is a Unit O fMeasure for the dimension of length, as is the Inch. There is no intrinsic property of a UnitOfMeasure that makes it primitive or fundamental; rather, a system of units (e.g. Systeme International Unit) defines a set of orthogonal dimensions and assigns units for each. [ SUMO:unit of measure ]', + 'cv_id' => [ + 'name' => 'sep' + ] ])->cvterm_id; + if (!$cvterm_id) { + $cvterm_id = tripal_insert_cvterm([ + 'id' => 'sep:00056', + 'name' => 'unit_of_measure', + 'cv_name' => 'sep', + 'definition' => 'A unit of measure is a quantity which is a standard of measurement for some dimension. For example, the Meter is a Unit O fMeasure for the dimension of length, as is the Inch. There is no intrinsic property of a UnitOfMeasure that makes it primitive or fundamental; rather, a system of units (e.g. Systeme International Unit) defines a set of orthogonal dimensions and assigns units for each. [ SUMO:unit of measure ]', + ])->cvterm_id; + } + $values = [ 'quantification_id' => $quantification_id, 'type_id' => $cvterm_id,