|
@@ -640,7 +640,8 @@ function tripal_feature_get_formatted_sequence($feature_id, $feature_name,
|
|
|
|
|
|
$sql = "EXECUTE sequence_by_parent (%d, %d, %d)";
|
|
|
|
|
|
- // if the first sub feature we need to include the upstream bases
|
|
|
+ // if the first sub feature we need to include the upstream bases. first check if
|
|
|
+ // the feature is in the foward direction or the reverse.
|
|
|
if ($i == 0 and $parent->strand >= 0) { // forward direction
|
|
|
// -------------------------- ref
|
|
|
// ....----> ---->
|
|
@@ -652,9 +653,11 @@ function tripal_feature_get_formatted_sequence($feature_id, $feature_name,
|
|
|
// ....<---- <----
|
|
|
// down 1 2
|
|
|
$q = chado_query($sql, 0, $downstream, $child->feature_id);
|
|
|
- }
|
|
|
- // if the last sub feature we need to include the downstream bases
|
|
|
- elseif ($i == $num_children->num_children - 1 and $parent->strand >= 0) { // forward direction
|
|
|
+ }
|
|
|
+
|
|
|
+ // Next, if the last sub feature we need to include the downstream bases. first check if
|
|
|
+ // the feature is in teh forward direction or the reverse
|
|
|
+ if ($i == $num_children->num_children - 1 and $parent->strand >= 0) { // forward direction
|
|
|
// -------------------------- ref
|
|
|
// ----> ---->....
|
|
|
// 1 2 down
|