1. brainstorm
  2. galaxy-central

Commits

Brad Chapman  committed c9ff021

Generalize top level sample information allowing customization in YAML without breaking existing control samples. Thanks to Anne Pajon for report

  • Participants
  • Parent commits 8d81b68
  • Branches default

Comments (0)

Files changed (3)

File lib/galaxy/web/controllers/nglims.py

View file
             try:
                 value = form_values.content[field['name']]
             except KeyError:
-                value = form_values.content[field['label']]
+                value = form_values.content.get(field['label'], "")
             details[field_label] = value
         return details
 
                             rids=util.json.to_json_string(
                                 [trans.security.encode_id(i) for i in sids])))
         sqn_runs = self._service_org.get_sample_sqn_runs(sample)
+        ignore = ["name"]
+        ready_sample_info = []
+        for key, value in sorted(sample_info.iteritems()):
+            if key not in ignore and value:
+                new_key = key[0].upper() + " ".join(key[1:].split("_"))
+                ready_sample_info.append([new_key, value])
         return trans.fill_template('/nglims/sample_details.mako',
                 name=sample_info["name"],
-                description=sample_info["description"],
-                genome_build=sample_info["genome_build"],
+                sample_info=ready_sample_info,
                 services=services,
                 sqn_runs=sqn_runs,
                 service_details=service_details,

File templates/nglims/sample_details.mako

View file
     % if base_edit:
        <tr class="odd_row"><th><a href="${base_edit}">Edit</a></th></tr>
     % endif
-    <tr><td><b>Description</b></td><td>${description}</td></tr>
-    <tr><td><b>Genome build</b></td><td>${genome_build}</td></tr>
+    % for key, val in sample_info:
+      <tr><td><b>${key}</b></td><td>${val}</td></tr>
+    % endfor
 </table>
 %if sqn_runs:
     <h3>Sequencing Runs</h3>

File universe_wsgi.ini.sample

View file
 #pbs_stage_path = 
 #pbs_dataset_server = 
 
-<<<<<<< local
 # The URL to the myExperiment instance being used (omit scheme but include port)
 myexperiment_url = www.myexperiment.org:80
 
 # ---- Tool Job Runners -----------------------------------------------------
-=======
 # This option allows users to see the full path of datasets via the "View
 # Details" option in the history.  Administrators can always see this.
 #expose_dataset_path = False
->>>>>>> other
 
 # ---- Per-Tool Job Management ----------------------------------------------