Browse Source

Fixed for coding standards

spficklin 12 years ago
parent
commit
f0ab1a8a04

File diff suppressed because it is too large
+ 238 - 238
tripal_core/api/tripal_core.schema_v1.11.api.inc


File diff suppressed because it is too large
+ 293 - 293
tripal_core/api/tripal_core.schema_v1.2.api.inc


+ 9 - 8
tripal_feature/api/tripal_feature.api.inc

@@ -715,7 +715,7 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
 
       // if we are to aggregate then we will ignore the feature returned
       // by the query above and rebuild it using the sub features
-      if ($aggregate){
+      if ($aggregate) {
         
         // now get the sub features that are located on the parent.
         $sql = "EXECUTE sub_features (%d, %d)";
@@ -727,9 +727,9 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
         // should already be in order.
         $types = array();
         $i = 0;
-        while($child = db_fetch_object($children)) {
+        while ($child = db_fetch_object($children)) {
           // keep up with the types
-          if (!in_array($child->type_name,$types)) {
+          if (!in_array($child->type_name, $types)) {
             $types[] = $child->type_name;
           }
           
@@ -768,9 +768,9 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
             $q = chado_query($sql, 0, 0, $child->feature_id);
           }
           
-          while($subseq = db_fetch_object($q)){
+          while ($subseq = db_fetch_object($q)) {
             // concatenate the sequences of all the sub features            
-            if($subseq->srcfeature_id == $parent->srcfeature_id){
+            if ($subseq->srcfeature_id == $parent->srcfeature_id) {
               $seq .= $subseq->residues;   
             }
           }                 
@@ -798,7 +798,7 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
       }
       $residues .= ">$feature_name ($parent->typename) $parent->srcname:" . ($parent->adjfmin + 1) . ".." . $parent->adjfmax ." ($dir). ";
       if (count($types) > 0) {
-        $residues .= "Excludes all bases but those of type(s): " . implode(', ',$types) . ". " ;
+        $residues .= "Excludes all bases but those of type(s): " . implode(', ', $types) . ". " ;
       }
       if ($parent->upstream > 0) {
          $residues .= "Includes " . $parent->upstream . " bases upstream.  ";
@@ -810,7 +810,8 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
         
         if ($output_format == 'fasta_html') {
           $residues .= "No sequence available.</br>"; 
-        } else {
+        } 
+        else {
           $residues .= "No sequence available.\n"; 
         }         
       }
@@ -838,7 +839,7 @@ function trpial_feature_get_formatted_sequence($feature_id, $feature_name,
   }
   
   // format the residues for display
-  if($residues and $num_bases_per_line){
+  if ($residues and $num_bases_per_line) {
     if ($output_format == 'fasta_html') {
        $residues = '<span style="font-family: monospace;">' . $residues . '</span>';
     }

+ 5 - 5
tripal_feature/includes/gff_loader.inc

@@ -1132,20 +1132,20 @@ function tripal_feature_load_gff3_featureloc($feature, $organism, $landmark, $fm
     // the source feature name and at least the fmin and fmax must be the same
     // for an update of the featureloc, otherwise we'll insert a new record.
     if (strcmp($locsfeature[0]->name, $landmark)==0 and 
-       ($featureloc->fmin == $fmin or $featureloc->fmax == $fmax)){
+       ($featureloc->fmin == $fmin or $featureloc->fmax == $fmax)) {
       $match = array('featureloc_id' => $featureloc->featureloc_id);
       $values = array();
       $exists = 1;
-      if($featureloc->fmin != $fmin){
+      if ($featureloc->fmin != $fmin) {
          $values['fmin'] = $fmin;
       }
-      if($featureloc->fmax != $fmax) {
+      if ($featureloc->fmax != $fmax) {
          $values['fmax'] = $fmax;
       }
-      if($featureloc->strand != $strand){
+      if ($featureloc->strand != $strand) {
          $values['strand'] = $strand;
       }
-      if(count($values) > 0){
+      if (count($values) > 0) {
         tripal_core_chado_update('featureloc', $match, $values);
         print "   Updated featureloc\n";
       }

+ 5 - 5
tripal_feature/tripal_feature.drush.inc

@@ -51,7 +51,7 @@ function tripal_feature_drush_command() {
  *
  * NOTE: The following code is executed when drush 'trpjob-run' or 'drush tripal-launch-jobs' is called
  */
-function drush_tripal_feature_tripal_get_sequence(){
+function drush_tripal_feature_tripal_get_sequence() {
 
   $org_commonname = drush_get_option('org');  
   $type = drush_get_option('type');
@@ -62,11 +62,11 @@ function drush_tripal_feature_tripal_get_sequence(){
   $derive_from_parent = drush_get_option('parent');
   $aggregate = drush_get_option('agg');
   
-  if(!$output_format){
+  if (!$output_format) {
      $output_format = 'fasta_txt';
   }
   
-  if(!$type and !$feature_name and !$org_commonname){
+  if (!$type and !$feature_name and !$org_commonname) {
      print "Please provide a type, feature name or organism common name\n";
      return;
   }
@@ -91,8 +91,8 @@ function drush_tripal_feature_tripal_get_sequence(){
      $vars[] = $feature_name;
   }
   $num_bases_per_line = 50;
-  $q = chado_query($sql,$vars);
-  while($feature = db_fetch_object($q)){
+  $q = chado_query($sql, $vars);
+  while ($feature = db_fetch_object($q)) {
     $feature_id = $feature->feature_id;
     $feature_name = $feature->name;
       

+ 2 - 2
tripal_views/api/tripal_views.api.inc

@@ -482,7 +482,7 @@ function tripal_views_get_integration_array_for_chado_table($table_name, $base_t
   // Add Joins & Relationship Handlers to fields
   if (!isset($schema['foreign keys'])) {
     $schema['foreign keys'] = array();
-    watchdog('tripal_views','There are no foreign keys defined for %table in the Chado Schema API.', array('%table' => $table_name), WATCHDOG_WARNING);
+    watchdog('tripal_views', 'There are no foreign keys defined for %table in the Chado Schema API.', array('%table' => $table_name), WATCHDOG_WARNING);
   }
   foreach ($schema['foreign keys'] as $foreign_key_schema) {
     foreach ($foreign_key_schema['columns'] as $left_field => $right_field) {
@@ -498,7 +498,7 @@ function tripal_views_get_integration_array_for_chado_table($table_name, $base_t
         'name' => 'chado_views_handler_relationship',
         'base' => $foreign_key_schema['table'],
         'base field' => $right_field,
-        'label' => $table_name . ' ' . $left_field . ' to ' . $foreign_key_schema['table'] . ' ' .$right_field
+        'label' => $table_name . ' ' . $left_field . ' to ' . $foreign_key_schema['table'] . ' ' . $right_field
       );
     }
   }

+ 2 - 2
tripal_views/includes/tripal_views_form_elements.inc

@@ -144,14 +144,14 @@ function sequence_combo_validate($element, &$form) {
   if ($upstream < 0) {
     form_set_error($element['#name'], 'Please provide a positive number for upstream bases');
   }
-  if ($upstream and !preg_match('/^\d+$/',$upstream)) {
+  if ($upstream and !preg_match('/^\d+$/', $upstream)) {
     form_set_error($element['#name'], 'Please provide a decimal number for upstream bases');
   }
 
   if ($downstream < 0) {
     form_set_error($element['#name'], 'Please provide a positive number for downstream bases');
   }
-  if ($downstream and !preg_match('/^\d+$/',$downstream)) {
+  if ($downstream and !preg_match('/^\d+$/', $downstream)) {
     form_set_error($element['#name'], 'Please provide a decimal number for downstream bases');
   }
 }

+ 5 - 5
tripal_views/views/handlers/tripal_views_handler_field_sequence.inc

@@ -26,11 +26,11 @@ class tripal_views_handler_field_sequence extends chado_views_handler_field {
       '#description' => t('Alter the way a sequence is displayed')
     );
     $default_num_bases_per_line = '50';
-    if($this->options['display']['num_bases_per_line']){
+    if ($this->options['display']['num_bases_per_line']) {
        $default_num_bases_per_line = $this->options['display']['num_bases_per_line'];
     }
     $default_output_format = 'raw';
-    if($this->options['display']['output_format']){
+    if ($this->options['display']['output_format']) {
        $default_ouput_format = $this->options['display']['output_format'];
     }
 
@@ -82,10 +82,10 @@ class tripal_views_handler_field_sequence extends chado_views_handler_field {
     // if we are going to get the sequence from the parent then
     // we will need to do more queries in the render function
     // and we must have the feature_id to do those
-    if($this->options['display']['derive_from_parent']){
+    if ($this->options['display']['derive_from_parent']) {
       $this->ensure_my_table();
-      $this->query->add_field($this->table,'feature_id');
-      $this->query->add_field($this->table,'name');
+      $this->query->add_field($this->table, 'feature_id');
+      $this->query->add_field($this->table, 'name');
     }
   }
     

+ 2 - 2
tripal_views/views/handlers/tripal_views_handler_filter_sequence.inc

@@ -62,10 +62,10 @@ class tripal_views_handler_filter_sequence extends views_handler_filter {
     // we need the values provided by the user so that the field
     // handler can generate the results properly.  Saving these as session
     // variables may not be the best way but it works.
-    if($upstream){
+    if ($upstream) {
       $_SESSION['upstream'] = $upstream;
     }
-    if($downstream){
+    if ($downstream) {
       $_SESSION['downstream'] = $downstream;
     }    
   }

Some files were not shown because too many files changed in this diff