|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
/**
|
|
|
* @defgroup gff3_loader GFF3 Feature Loader
|
|
|
- * @ingroup tripal_feature
|
|
|
+ * @ingroup tripal_chado
|
|
|
* @{
|
|
|
* Provides gff3 loading functionality. Creates features based on their specification in a GFF3 file.
|
|
|
* @}
|
|
@@ -18,7 +18,7 @@
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_gff3_load_form() {
|
|
|
+function tripal_chado_gff3_load_form() {
|
|
|
|
|
|
$form['gff_file']= array(
|
|
|
'#type' => 'textfield',
|
|
@@ -214,7 +214,7 @@ function tripal_feature_gff3_load_form() {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_gff3_load_form_validate($form, &$form_state) {
|
|
|
+function tripal_chado_gff3_load_form_validate($form, &$form_state) {
|
|
|
|
|
|
$gff_file = trim($form_state['values']['gff_file']);
|
|
|
$organism_id = $form_state['values']['organism_id'];
|
|
@@ -263,7 +263,7 @@ function tripal_feature_gff3_load_form_validate($form, &$form_state) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_gff3_load_form_submit($form, &$form_state) {
|
|
|
+function tripal_chado_gff3_load_form_submit($form, &$form_state) {
|
|
|
global $user;
|
|
|
|
|
|
$gff_file = trim($form_state['values']['gff_file']);
|
|
@@ -302,8 +302,8 @@ function tripal_feature_gff3_load_form_submit($form, &$form_state) {
|
|
|
$type = 'delete features';
|
|
|
}
|
|
|
$fname = preg_replace("/.*\/(.*)/", "$1", $gff_file);
|
|
|
- tripal_add_job("$type GFF3 file: $fname", 'tripal_feature',
|
|
|
- 'tripal_feature_load_gff3', $args, $user->uid);
|
|
|
+ tripal_add_job("$type GFF3 file: $fname", 'tripal_chado',
|
|
|
+ 'tripal_chado_load_gff3', $args, $user->uid);
|
|
|
|
|
|
return '';
|
|
|
}
|
|
@@ -380,7 +380,7 @@ function tripal_feature_gff3_load_form_submit($form, &$form_state) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
+function tripal_chado_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$add_only = 0, $update = 1, $refresh = 0, $remove = 0, $use_transaction = 1,
|
|
|
$target_organism_id = NULL, $target_type = NULL, $create_target = 0,
|
|
|
$start_line = 1, $landmark_type = '', $alt_id_attr = '', $create_organism = FALSE,
|
|
@@ -419,7 +419,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$dfile = $gff_file;
|
|
|
}
|
|
|
if (!file_exists($dfile)) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Cannot find the file: %dfile",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Cannot find the file: %dfile",
|
|
|
array('%dfile' => $dfile));
|
|
|
return 0;
|
|
|
}
|
|
@@ -429,7 +429,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
//$lines = file($dfile,FILE_SKIP_EMPTY_LINES);
|
|
|
$fh = fopen($dfile, 'r');
|
|
|
if (!$fh) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "cannot open file: %dfile",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "cannot open file: %dfile",
|
|
|
array('%dfile' => $dfile));
|
|
|
return 0;
|
|
|
}
|
|
@@ -440,7 +440,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$sql = "SELECT * FROM {cv} WHERE name = :cvname";
|
|
|
$cv = chado_query($sql, array(':cvname' => 'sequence'))->fetchObject();
|
|
|
if (!$cv) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR,
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR,
|
|
|
"Cannot find the 'sequence' ontology", array());
|
|
|
return '';
|
|
|
}
|
|
@@ -478,7 +478,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$result = chado_query($sel_cvterm_sql, $query);
|
|
|
$landmark_cvterm = $result->fetchObject();
|
|
|
if (!$landmark_cvterm) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR,
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR,
|
|
|
'cannot find landmark feature type \'%landmark_type\'.',
|
|
|
array('%landmark_type' => $landmark_type));
|
|
|
return '';
|
|
@@ -513,7 +513,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
// we're done because this is a delete operation so break out of the loop.
|
|
|
break;
|
|
|
}
|
|
|
- tripal_feature_load_gff3_fasta($fh, $interval, $num_read, $intv_read, $line_num, $filesize, $job);
|
|
|
+ tripal_chado_load_gff3_fasta($fh, $interval, $num_read, $intv_read, $line_num, $filesize, $job);
|
|
|
continue;
|
|
|
}
|
|
|
// if the ##sequence-region line is present then we want to add a new feature
|
|
@@ -522,7 +522,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$rstart = $region_matches[2];
|
|
|
$rend = $region_matches[3];
|
|
|
if ($landmark_type) {
|
|
|
- tripal_feature_load_gff3_feature($organism, $analysis_id, $landmark_cvterm, $rid,
|
|
|
+ tripal_chado_load_gff3_feature($organism, $analysis_id, $landmark_cvterm, $rid,
|
|
|
$rid, '', 'f', 'f', 1, 0);
|
|
|
}
|
|
|
continue;
|
|
@@ -541,7 +541,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
// get the columns
|
|
|
$cols = explode("\t", $line);
|
|
|
if (sizeof($cols) != 9) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, 'improper number of columns on line %line_num',
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, 'improper number of columns on line %line_num',
|
|
|
array('%line_num' => $line_num));
|
|
|
return '';
|
|
|
}
|
|
@@ -587,7 +587,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
$cvterm = $result->fetchObject();
|
|
|
$cvterm_lookup[$type] = $cvterm;
|
|
|
if (!$cvterm) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, 'cannot find feature term \'%type\' on line %line_num of the GFF file',
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, 'cannot find feature term \'%type\' on line %line_num of the GFF file',
|
|
|
array('%type' => $type, '%line_num' => $line_num));
|
|
|
return '';
|
|
|
}
|
|
@@ -619,7 +619,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
continue;
|
|
|
}
|
|
|
if (!preg_match('/^[^\=]+\=.+$/', $attr)) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, 'Attribute is not correctly formatted on line %line_num: %attr',
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, 'Attribute is not correctly formatted on line %line_num: %attr',
|
|
|
array('%line_num' => $line_num, '%attr' => $attr));
|
|
|
return '';
|
|
|
}
|
|
@@ -661,13 +661,13 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
if ($create_organism) {
|
|
|
$feature_organism = (object) chado_insert_record('organism', $values);
|
|
|
if (!$feature_organism) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Could not add the organism, '%org', from line %line. Skipping this line. ",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Could not add the organism, '%org', from line %line. Skipping this line. ",
|
|
|
array('%org' => $attr_organism, '%line' => $line_num));
|
|
|
$skip_feature = 1;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The organism attribute '%org' on line %line does not exist. Skipping this line. ",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The organism attribute '%org' on line %line does not exist. Skipping this line. ",
|
|
|
array('%org' => $attr_organism, '%line' => $line_num));
|
|
|
$skip_feature = 1;
|
|
|
}
|
|
@@ -678,7 +678,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The organism attribute '%org' on line %line is not properly formated. It " .
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The organism attribute '%org' on line %line is not properly formated. It " .
|
|
|
"should be of the form: organism=Genus:species. Skipping this line.",
|
|
|
array('%org' => $attr_organism, '%line' => $line_num));
|
|
|
$skip_feature = 1;
|
|
@@ -762,20 +762,20 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
}
|
|
|
$count = chado_select_record('feature', $columns, $select);
|
|
|
if (!$count or count($count) == 0 or $count[0]->num_landmarks == 0) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The landmark '%landmark' cannot be found for this organism (%species) " .
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The landmark '%landmark' cannot be found for this organism (%species) " .
|
|
|
"Please add the landmark and then retry the import of this GFF3 " .
|
|
|
"file", array('%landmark' => $landmark, '%species' => $organism->genus . " " . $organism->species));
|
|
|
return '';
|
|
|
}
|
|
|
elseif ($count[0]->num_landmarks > 1) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The landmark '%landmark' has more than one entry for this organism (%species) " .
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The landmark '%landmark' has more than one entry for this organism (%species) " .
|
|
|
"Cannot continue", array('%landmark' => $landmark, '%species' => $organism->genus . " " . $organism->species));
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if ($count[0]->num_landmarks > 1) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The landmark '%landmark' is not unique for this organism. " .
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The landmark '%landmark' is not unique for this organism. " .
|
|
|
"The features cannot be associated", array('%landmark' => $landmark));
|
|
|
return '';
|
|
|
}
|
|
@@ -794,7 +794,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
);
|
|
|
$result = chado_delete_record('feature', $match);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "cannot delete feature %attr_uniquename",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "cannot delete feature %attr_uniquename",
|
|
|
array('%attr_uniquename' => $attr_uniquename));
|
|
|
}
|
|
|
$feature = 0;
|
|
@@ -805,7 +805,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
if ($update or $refresh or $add_only) {
|
|
|
|
|
|
// Add/update the feature.
|
|
|
- $feature = tripal_feature_load_gff3_feature($feature_organism, $analysis_id, $cvterm,
|
|
|
+ $feature = tripal_chado_load_gff3_feature($feature_organism, $analysis_id, $cvterm,
|
|
|
$attr_uniquename, $attr_name, $residues, $attr_is_analysis,
|
|
|
$attr_is_obsolete, $add_only, $score);
|
|
|
|
|
@@ -825,65 +825,65 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
if (count($results) == 0) {
|
|
|
$result = chado_insert_record('tripal_gff_temp', $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Cound not save record in temporary table, Cannot continue.", array());
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Cound not save record in temporary table, Cannot continue.", array());
|
|
|
exit;
|
|
|
}
|
|
|
}
|
|
|
// add/update the featureloc if the landmark and the ID are not the same
|
|
|
// if they are the same then this entry in the GFF is probably a landmark identifier
|
|
|
if (strcmp($landmark, $attr_uniquename) !=0 ) {
|
|
|
- tripal_feature_load_gff3_featureloc($feature, $organism,
|
|
|
+ tripal_chado_load_gff3_featureloc($feature, $organism,
|
|
|
$landmark, $fmin, $fmax, $strand, $phase, $attr_fmin_partial,
|
|
|
$attr_fmax_partial, $attr_residue_info, $attr_locgroup);
|
|
|
}
|
|
|
|
|
|
// add any aliases for this feature
|
|
|
if (array_key_exists('Alias', $tags)) {
|
|
|
- tripal_feature_load_gff3_alias($feature, $tags['Alias']);
|
|
|
+ tripal_chado_load_gff3_alias($feature, $tags['Alias']);
|
|
|
}
|
|
|
// add any dbxrefs for this feature
|
|
|
if (array_key_exists('Dbxref', $tags)) {
|
|
|
- tripal_feature_load_gff3_dbxref($feature, $tags['Dbxref']);
|
|
|
+ tripal_chado_load_gff3_dbxref($feature, $tags['Dbxref']);
|
|
|
}
|
|
|
// add any ontology terms for this feature
|
|
|
if (array_key_exists('Ontology_term', $tags)) {
|
|
|
- tripal_feature_load_gff3_ontology($feature, $tags['Ontology_term']);
|
|
|
+ tripal_chado_load_gff3_ontology($feature, $tags['Ontology_term']);
|
|
|
}
|
|
|
// add parent relationships
|
|
|
if (array_key_exists('Parent', $tags)) {
|
|
|
- tripal_feature_load_gff3_parents($feature, $cvterm, $tags['Parent'],
|
|
|
+ tripal_chado_load_gff3_parents($feature, $cvterm, $tags['Parent'],
|
|
|
$feature_organism->organism_id, $strand, $phase, $fmin, $fmax);
|
|
|
}
|
|
|
|
|
|
// add target relationships
|
|
|
if (array_key_exists('Target', $tags)) {
|
|
|
- tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $target_type, $create_target, $attr_locgroup);
|
|
|
+ tripal_chado_load_gff3_target($feature, $tags, $target_organism_id, $target_type, $create_target, $attr_locgroup);
|
|
|
}
|
|
|
// add gap information. This goes in simply as a property
|
|
|
if (array_key_exists('Gap', $tags)) {
|
|
|
foreach ($tags['Gap'] as $value) {
|
|
|
- tripal_feature_load_gff3_property($feature, 'Gap', $value);
|
|
|
+ tripal_chado_load_gff3_property($feature, 'Gap', $value);
|
|
|
}
|
|
|
}
|
|
|
// add notes. This goes in simply as a property
|
|
|
if (array_key_exists('Note', $tags)) {
|
|
|
foreach ($tags['Note'] as $value) {
|
|
|
- tripal_feature_load_gff3_property($feature, 'Note', $value);
|
|
|
+ tripal_chado_load_gff3_property($feature, 'Note', $value);
|
|
|
}
|
|
|
}
|
|
|
// add the Derives_from relationship (e.g. polycistronic genes).
|
|
|
if (array_key_exists('Derives_from', $tags)) {
|
|
|
- tripal_feature_load_gff3_derives_from($feature, $cvterm, $tags['Derives_from'][0],
|
|
|
+ tripal_chado_load_gff3_derives_from($feature, $cvterm, $tags['Derives_from'][0],
|
|
|
$feature_organism, $fmin, $fmax);
|
|
|
}
|
|
|
// add in the GFF3_source dbxref so that GBrowse can find the feature using the source column
|
|
|
$source_ref = array('GFF_source:' . $source);
|
|
|
- tripal_feature_load_gff3_dbxref($feature, $source_ref);
|
|
|
+ tripal_chado_load_gff3_dbxref($feature, $source_ref);
|
|
|
// add any additional attributes
|
|
|
if ($attr_others) {
|
|
|
foreach ($attr_others as $tag_name => $values) {
|
|
|
foreach ($values as $value) {
|
|
|
- tripal_feature_load_gff3_property($feature, $tag_name, $value);
|
|
|
+ tripal_chado_load_gff3_property($feature, $tag_name, $value);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -948,15 +948,15 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
}
|
|
|
|
|
|
// Add the new protein record.
|
|
|
- $feature = tripal_feature_load_gff3_feature($organism, $analysis_id,
|
|
|
+ $feature = tripal_chado_load_gff3_feature($organism, $analysis_id,
|
|
|
$protein_cvterm, $uname, $name, '', 'f', 'f', 1, 0);
|
|
|
// Add the derives_from relationship.
|
|
|
$cvterm = tripal_get_cvterm(array('cvterm_id' => $result->cvterm_id));
|
|
|
- tripal_feature_load_gff3_derives_from($feature, $cvterm,
|
|
|
+ tripal_chado_load_gff3_derives_from($feature, $cvterm,
|
|
|
$result->uniquename, $organism, $pfmin, $pfmax);
|
|
|
// Add the featureloc record. Set the start of the protein to
|
|
|
// be the start of the coding sequence minus the phase.
|
|
|
- tripal_feature_load_gff3_featureloc($feature, $organism, $landmark,
|
|
|
+ tripal_chado_load_gff3_featureloc($feature, $organism, $landmark,
|
|
|
$pfmin, $pfmax, $strand, '', 'f', 'f', '', 0);
|
|
|
}
|
|
|
}
|
|
@@ -1054,7 +1054,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
else {
|
|
|
print "FAILED\n";
|
|
|
}
|
|
|
- watchdog_exception('tripal_feature', $e);
|
|
|
+ watchdog_exception('tripal_chado', $e);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -1071,7 +1071,7 @@ function tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id,
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
+function tripal_chado_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
$organism, $fmin, $fmax) {
|
|
|
|
|
|
$type = $cvterm->name;
|
|
@@ -1100,12 +1100,12 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
if (!$type_id) {
|
|
|
$result = chado_select_record('feature', array('type_id'), $values);
|
|
|
if (count($result) > 1) {
|
|
|
- watchdog("tripal_feature", "Cannot find feature type for, '%subject' , in 'derives_from' relationship. Multiple matching features exist with this uniquename.",
|
|
|
+ watchdog("tripal_chado", "Cannot find feature type for, '%subject' , in 'derives_from' relationship. Multiple matching features exist with this uniquename.",
|
|
|
array('%subject' => $object), WATCHDOG_WARNING);
|
|
|
return '';
|
|
|
}
|
|
|
else if (count($result) == 0) {
|
|
|
- watchdog("tripal_feature", "Cannot find feature type for, '%subject' , in 'derives_from' relationship.",
|
|
|
+ watchdog("tripal_chado", "Cannot find feature type for, '%subject' , in 'derives_from' relationship.",
|
|
|
array('%subject' => $object), WATCHDOG_WARNING);
|
|
|
return '';
|
|
|
}
|
|
@@ -1122,7 +1122,7 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
);
|
|
|
$ofeature = chado_select_record('feature', array('feature_id'), $match);
|
|
|
if (count($ofeature) == 0) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Could not add 'Derives_from' relationship " .
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Could not add 'Derives_from' relationship " .
|
|
|
"for %uniquename and %subject. Subject feature, '%subject', " .
|
|
|
"cannot be found", array('%uniquename' => $feature->uniquename, '%subject' => $subject));
|
|
|
return;
|
|
@@ -1138,7 +1138,7 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
);
|
|
|
$result = chado_insert_record('tripal_gffprotein_temp', $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Cound not save record in temporary protein table, Cannot continue.", array());
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Cound not save record in temporary protein table, Cannot continue.", array());
|
|
|
exit;
|
|
|
}
|
|
|
}
|
|
@@ -1164,7 +1164,7 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
// finally insert the relationship if it doesn't exist
|
|
|
$ret = chado_insert_record('feature_relationship', $values);
|
|
|
if (!$ret) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Could not add 'Derives_from' relationship for $feature->uniquename and $subject",
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Could not add 'Derives_from' relationship for $feature->uniquename and $subject",
|
|
|
array());
|
|
|
}
|
|
|
}
|
|
@@ -1180,7 +1180,7 @@ function tripal_feature_load_gff3_derives_from($feature, $cvterm, $object,
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
+function tripal_chado_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
$organism_id, $strand, $phase, $fmin, $fmax) {
|
|
|
|
|
|
$uname = $feature->uniquename;
|
|
@@ -1205,7 +1205,7 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
);
|
|
|
$result = chado_select_record('tripal_gff_temp', array('type_name'), $values);
|
|
|
if (count($result) == 0) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot find parent: %parent", array('%parent' => $parent));
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot find parent: %parent", array('%parent' => $parent));
|
|
|
return '';
|
|
|
}
|
|
|
$parent_type = $result[0]->type_name;
|
|
@@ -1243,7 +1243,7 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
);
|
|
|
$result = chado_insert_record('feature_relationship', $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to insert feature relationship '$uname' ($type) $rel_type '$parent' ($parent_type)",
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to insert feature relationship '$uname' ($type) $rel_type '$parent' ($parent_type)",
|
|
|
array());
|
|
|
}
|
|
|
}
|
|
@@ -1261,13 +1261,13 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
);
|
|
|
$result = chado_insert_record('tripal_gffcds_temp', $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Cound not save record in temporary CDS table, Cannot continue.", array());
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Cound not save record in temporary CDS table, Cannot continue.", array());
|
|
|
exit;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot establish relationship '$uname' ($type) $rel_type '$parent' ($parent_type): Cannot find the parent",
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot establish relationship '$uname' ($type) $rel_type '$parent' ($parent_type): Cannot find the parent",
|
|
|
array());
|
|
|
}
|
|
|
}
|
|
@@ -1281,7 +1281,7 @@ function tripal_feature_load_gff3_parents($feature, $cvterm, $parents,
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_dbxref($feature, $dbxrefs) {
|
|
|
+function tripal_chado_load_gff3_dbxref($feature, $dbxrefs) {
|
|
|
|
|
|
// iterate through each of the dbxrefs
|
|
|
foreach ($dbxrefs as $dbxref) {
|
|
@@ -1312,7 +1312,7 @@ function tripal_feature_load_gff3_dbxref($feature, $dbxrefs) {
|
|
|
$db = chado_select_record('db', array('db_id'), $values);
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot find or add the database $dbname", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot find or add the database $dbname", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1357,7 +1357,7 @@ function tripal_feature_load_gff3_dbxref($feature, $dbxrefs) {
|
|
|
);
|
|
|
$success = chado_insert_record('feature_dbxref', $values);
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to insert Dbxref: $dbname:$accession", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to insert Dbxref: $dbname:$accession", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1373,7 +1373,7 @@ function tripal_feature_load_gff3_dbxref($feature, $dbxrefs) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
+function tripal_chado_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
|
|
|
// iterate through each of the dbxrefs
|
|
|
foreach ($dbxrefs as $dbxref) {
|
|
@@ -1389,7 +1389,7 @@ function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
// now look for the name without the 'DB:' prefix.
|
|
|
$db = chado_select_record('db', array('db_id'), array('name' => "$dbname"));
|
|
|
if (sizeof($db) == 0) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Database, $dbname, is not present. Cannot associate term: $dbname:$accession", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Database, $dbname, is not present. Cannot associate term: $dbname:$accession", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1399,7 +1399,7 @@ function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
$dbxref = chado_select_record('dbxref', array('dbxref_id'),
|
|
|
array('accession' => $accession, 'db_id' => $db->db_id));
|
|
|
if (sizeof($dbxref) == 0) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Accession, $accession is missing for reference: $dbname:$accession", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Accession, $accession is missing for reference: $dbname:$accession", array());
|
|
|
return 0;
|
|
|
}
|
|
|
$dbxref = $dbxref[0];
|
|
@@ -1412,7 +1412,7 @@ function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
$cvterm = chado_select_record('cvterm_dbxref', array('cvterm_id'), array(
|
|
|
'dbxref_id' => $dbxref->dbxref_id));
|
|
|
if (sizeof($cvterm) == 0) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "CV Term is missing for reference: $dbname:$accession", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "CV Term is missing for reference: $dbname:$accession", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1435,7 +1435,7 @@ function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
$success = chado_insert_record('feature_cvterm', $values);
|
|
|
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to insert ontology term: $dbname:$accession", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to insert ontology term: $dbname:$accession", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1451,7 +1451,7 @@ function tripal_feature_load_gff3_ontology($feature, $dbxrefs) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
+function tripal_chado_load_gff3_alias($feature, $aliases) {
|
|
|
|
|
|
// make sure we have a 'synonym_type' vocabulary
|
|
|
$select = array('name' => 'synonym_type');
|
|
@@ -1465,7 +1465,7 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
);
|
|
|
$success = chado_insert_record('cv', $values);
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to add the synonyms type vocabulary", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to add the synonyms type vocabulary", array());
|
|
|
return 0;
|
|
|
}
|
|
|
// now that we've added the cv we need to get the record
|
|
@@ -1497,7 +1497,7 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
);
|
|
|
$syntype = tripal_insert_cvterm($term, array('update_existing' => TRUE));
|
|
|
if (!$syntype) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot add synonym type: internal:$type", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot add synonym type: internal:$type", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1523,7 +1523,7 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
);
|
|
|
$success = chado_insert_record('synonym', $values);
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot add alias $alias to synonym table", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot add alias $alias to synonym table", array());
|
|
|
return 0;
|
|
|
}
|
|
|
$result = chado_select_record('synonym', array('*'), $select);
|
|
@@ -1549,14 +1549,14 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
";
|
|
|
$status = chado_query($psql);
|
|
|
if (!$status) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot prepare statement 'ins_pub_uniquename_typeid", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot prepare statement 'ins_pub_uniquename_typeid", array());
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
// insert the null pub
|
|
|
$result = chado_query($pub_sql, array(':uname' => 'null', ':type_id' => 'null'))->fetchObject();
|
|
|
if (!$result) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot add null publication needed for setup of alias", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot add null publication needed for setup of alias", array());
|
|
|
return 0;
|
|
|
}
|
|
|
$result = chado_select_record('pub', array('*'), $select);
|
|
@@ -1584,7 +1584,7 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
$success = chado_insert_record('feature_synonym', $values);
|
|
|
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot add alias $alias to feature synonym table", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot add alias $alias to feature synonym table", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1608,7 +1608,7 @@ function tripal_feature_load_gff3_alias($feature, $aliases) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uniquename,
|
|
|
+function tripal_chado_load_gff3_feature($organism, $analysis_id, $cvterm, $uniquename,
|
|
|
$name, $residues, $is_analysis = 'f', $is_obsolete = 'f', $add_only, $score) {
|
|
|
|
|
|
// Check to see if the feature already exists.
|
|
@@ -1650,7 +1650,7 @@ function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uni
|
|
|
);
|
|
|
$feature = (object) chado_insert_record('feature', $values);
|
|
|
if (!$feature) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to insert feature '$uniquename' ($cvterm->name)", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to insert feature '$uniquename' ($cvterm->name)", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1668,7 +1668,7 @@ function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uni
|
|
|
);
|
|
|
$result = chado_update_record('feature', $match, $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to update feature '$uniquename' ($cvterm->name)", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to update feature '$uniquename' ($cvterm->name)", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1691,7 +1691,7 @@ function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uni
|
|
|
$af_values['significance'] = $score;
|
|
|
}
|
|
|
if (!chado_insert_record('analysisfeature', $af_values)) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Could not add analysisfeature record: $analysis_id, $feature->feature_id", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Could not add analysisfeature record: $analysis_id, $feature->feature_id", array());
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
@@ -1706,7 +1706,7 @@ function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uni
|
|
|
if (!$add_only) {
|
|
|
$ret = chado_update_record('analysisfeature', $af_values, $new_vals);
|
|
|
if (!$ret) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Could not update analysisfeature record: $analysis_id, $feature->feature_id", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Could not update analysisfeature record: $analysis_id, $feature->feature_id", array());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1735,7 +1735,7 @@ function tripal_feature_load_gff3_feature($organism, $analysis_id, $cvterm, $uni
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fmin,
|
|
|
+function tripal_chado_load_gff3_featureloc($feature, $organism, $landmark, $fmin,
|
|
|
$fmax, $strand, $phase, $is_fmin_partial, $is_fmax_partial, $residue_info, $locgroup,
|
|
|
$landmark_type_id = '', $landmark_organism_id = '', $create_landmark = 0,
|
|
|
$landmark_is_target = 0) {
|
|
@@ -1784,7 +1784,7 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
|
|
|
);
|
|
|
$results = chado_insert_record('feature', $values);
|
|
|
if (!$results) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot find landmark feature: '%landmark', nor could it be inserted",
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot find landmark feature: '%landmark', nor could it be inserted",
|
|
|
array('%landmark' => $landmark));
|
|
|
return 0;
|
|
|
}
|
|
@@ -1792,14 +1792,14 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
|
|
|
$srcfeature->feature_id = $results['feature_id'];
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot find unique landmark feature: '%landmark'.",
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot find unique landmark feature: '%landmark'.",
|
|
|
array('%landmark' => $landmark));
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
elseif (count($results) > 1) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "multiple landmarks exist with the name: '%landmark'. Cannot
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "multiple landmarks exist with the name: '%landmark'. Cannot
|
|
|
resolve which one to use. Cannot add the feature location record",
|
|
|
array('%landmark' => $landmark));
|
|
|
return 0;
|
|
@@ -1809,7 +1809,7 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
|
|
|
}
|
|
|
}
|
|
|
elseif (count($results) > 1) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "multiple landmarks exist with the name: '%landmark'. Cannot
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "multiple landmarks exist with the name: '%landmark'. Cannot
|
|
|
resolve which one to use. Cannot add the feature location record",
|
|
|
array('%landmark' => $landmark));
|
|
|
return 0;
|
|
@@ -1899,7 +1899,7 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
|
|
|
}
|
|
|
$success = chado_insert_record('featureloc', $values);
|
|
|
if (!$success) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Failed to insert featureloc", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Failed to insert featureloc", array());
|
|
|
exit;
|
|
|
return 0;
|
|
|
}
|
|
@@ -1916,7 +1916,7 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_property($feature, $property, $value) {
|
|
|
+function tripal_chado_load_gff3_property($feature, $property, $value) {
|
|
|
|
|
|
// first make sure the cvterm exists. if not, then add it
|
|
|
$select = array(
|
|
@@ -1939,7 +1939,7 @@ function tripal_feature_load_gff3_property($feature, $property, $value) {
|
|
|
);
|
|
|
$cvterm = (object) tripal_insert_cvterm($term, array('update_existing' => FALSE));
|
|
|
if (!$cvterm) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "Cannot add cvterm, $property", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "Cannot add cvterm, $property", array());
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -1980,7 +1980,7 @@ function tripal_feature_load_gff3_property($feature, $property, $value) {
|
|
|
);
|
|
|
$result = chado_insert_record('featureprop', $values);
|
|
|
if (!$result) {
|
|
|
- tripal_report_error("tripal_feature", TRIPAL_WARNING, "cannot add featureprop, $property", array());
|
|
|
+ tripal_report_error("tripal_chado", TRIPAL_WARNING, "cannot add featureprop, $property", array());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1998,7 +1998,7 @@ function tripal_feature_load_gff3_property($feature, $property, $value) {
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_fasta($fh, $interval, &$num_read, &$intv_read, &$line_num, $filesize, $job) {
|
|
|
+function tripal_chado_load_gff3_fasta($fh, $interval, &$num_read, &$intv_read, &$line_num, $filesize, $job) {
|
|
|
print "\nLoading FASTA sequences\n";
|
|
|
$residues = '';
|
|
|
$id = NULL;
|
|
@@ -2032,7 +2032,7 @@ function tripal_feature_load_gff3_fasta($fh, $interval, &$num_read, &$intv_read,
|
|
|
$values = array('uniquename' => $id);
|
|
|
$result = chado_select_record('tripal_gff_temp', array('*'), $values);
|
|
|
if (count($result) == 0) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_WARNING, 'Cannot find feature to assign FASTA sequence: %uname',
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_WARNING, 'Cannot find feature to assign FASTA sequence: %uname',
|
|
|
array('%uname' => $id));
|
|
|
}
|
|
|
else {
|
|
@@ -2061,7 +2061,7 @@ function tripal_feature_load_gff3_fasta($fh, $interval, &$num_read, &$intv_read,
|
|
|
$values = array('uniquename' => $id);
|
|
|
$result = chado_select_record('tripal_gff_temp', array('*'), $values);
|
|
|
if (count($result) == 0) {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_WARNING, 'Cannot find feature to assign FASTA sequence: %uname',
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_WARNING, 'Cannot find feature to assign FASTA sequence: %uname',
|
|
|
array('%uname' => $id));
|
|
|
}
|
|
|
else {
|
|
@@ -2089,7 +2089,7 @@ function tripal_feature_load_gff3_fasta($fh, $interval, &$num_read, &$intv_read,
|
|
|
*
|
|
|
* @ingroup gff3_loader
|
|
|
*/
|
|
|
-function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $target_type, $create_target, $attr_locgroup) {
|
|
|
+function tripal_chado_load_gff3_target($feature, $tags, $target_organism_id, $target_type, $create_target, $attr_locgroup) {
|
|
|
// format is: "target_id start end [strand]", where strand is optional and may be "+" or "-"
|
|
|
$matched = preg_match('/^(.*?)\s+(\d+)\s+(\d+)(\s+[\+|\-])*$/', trim($tags['Target'][0]), $matches);
|
|
|
|
|
@@ -2142,13 +2142,13 @@ function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $
|
|
|
$t_organism_id = $torganism[0]->organism_id;
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_WARNING, "Cannot find organism for target %target.",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_WARNING, "Cannot find organism for target %target.",
|
|
|
array('%target' => $gff_target_organism));
|
|
|
$t_organism_id = '';
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_WARNING, "The target_organism attribute is improperly formatted: %target.
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_WARNING, "The target_organism attribute is improperly formatted: %target.
|
|
|
It should be target_organism=genus:species.",
|
|
|
array('%target' => $gff_target_organism));
|
|
|
$t_organism_id = '';
|
|
@@ -2170,7 +2170,7 @@ function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $
|
|
|
$t_type_id = $type[0]->cvterm_id;
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "The target type does not exist in the sequence ontology: %type. ",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "The target type does not exist in the sequence ontology: %type. ",
|
|
|
array('%type' => $target_type));
|
|
|
exit;
|
|
|
}
|
|
@@ -2202,7 +2202,7 @@ function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $
|
|
|
$t_type_id = $synonym->cvterm_id;
|
|
|
}
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_WARNING, "The target_type attribute does not exist in the sequence ontology: %type. ",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_WARNING, "The target_type attribute does not exist in the sequence ontology: %type. ",
|
|
|
array('%type' => $gff_target_type));
|
|
|
$t_type_id = '';
|
|
|
}
|
|
@@ -2211,13 +2211,13 @@ function tripal_feature_load_gff3_target($feature, $tags, $target_organism_id, $
|
|
|
|
|
|
// we want to add a featureloc record that uses the target feature as the srcfeature (landmark)
|
|
|
// and the landmark as the feature.
|
|
|
- tripal_feature_load_gff3_featureloc($feature, $organism, $target_feature, $target_fmin,
|
|
|
+ tripal_chado_load_gff3_featureloc($feature, $organism, $target_feature, $target_fmin,
|
|
|
$target_fmax, $target_strand, $phase, $attr_fmin_partial, $attr_fmax_partial, $attr_residue_info,
|
|
|
$attr_locgroup, $t_type_id, $t_organism_id, $create_target, TRUE);
|
|
|
}
|
|
|
// the target attribute is not correctly formatted
|
|
|
else {
|
|
|
- tripal_report_error('tripal_feature', TRIPAL_ERROR, "Could not add 'Target' alignment as it is improperly formatted: '%target'",
|
|
|
+ tripal_report_error('tripal_chado', TRIPAL_ERROR, "Could not add 'Target' alignment as it is improperly formatted: '%target'",
|
|
|
array('%target' => $tags['Target'][0]));
|
|
|
}
|
|
|
}
|