aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/show_trait_edit_data.html
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/templates/show_trait_edit_data.html')
-rw-r--r--gn2/wqflask/templates/show_trait_edit_data.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/show_trait_edit_data.html b/gn2/wqflask/templates/show_trait_edit_data.html
new file mode 100644
index 00000000..91cbdb6e
--- /dev/null
+++ b/gn2/wqflask/templates/show_trait_edit_data.html
@@ -0,0 +1,75 @@
+<div>
+ {% for sample_type in sample_groups %}
+ <div class="sample-table-container">
+ {% if loop.index == 1 and (sample_groups[0].se_exists or has_num_cases or sample_groups[0].attributes|length > 0) %}
+ <b>Show/Hide Columns:</b>
+ <br>
+ {% if sample_groups[0].se_exists %}
+ <button class="toggle-vis" data-column="4,5">SE</button>
+ {% if has_num_cases %}
+ <button class="toggle-vis" data-column="6">N</button>
+ {% set attr_start_pos = 7 %}
+ {% else %}
+ {% set attr_start_pos = 6 %}
+ {% endif %}
+ {% else %}
+ {% if has_num_cases %}
+ <button class="toggle-vis" data-column="4">N</button>
+ {% set attr_start_pos = 5 %}
+ {% else %}
+ {% set attr_start_pos = 4 %}
+ {% endif %}
+ {% endif %}
+ {% if sample_groups[0].attributes %}
+ {% for attribute in sample_groups[0].attributes %}
+ <button class="toggle-vis" data-column="{{ loop.index + attr_start_pos - 1 }}">{{ sample_groups[0].attributes[attribute].name }}</button>
+ {% endfor %}
+ {% endif %}
+ <br>
+ <br>
+ {% endif %}
+ <div class="sample-table-search-container">
+ <input type="text" id="{{ sample_type.sample_group_type }}_searchbox" class="form-control sample-table-search" placeholder="Search This Table For ...">
+ </div>
+ <div class="sample-table-export-container">
+ <button class="btn btn-default export"><span class="glyphicon glyphicon-download-alt"></span> Export</button>
+ <select class="select optional span2 export_format">
+ <option value="excel">Excel</option>
+ <option value="csv">CSV</option>
+ </select>
+ <button type="button" class="btn btn-success reset"><span class="glyphicon glyphicon-repeat"></span> Reset</button>
+ </div>
+ <div id="export_code" class="export-code-container">
+ <pre class="export-code_field">
+ <code>
+ # read into R
+ trait <- read.csv("{{ this_trait.display_name}}.csv", header = TRUE, comment.char = "#")
+
+ # read into python
+ import pandas as pd
+ trait = pd.read_csv("{{ this_trait.display_name}}.csv", header = 0, comment = "#")
+ </code>
+ </pre>
+ </div>
+ </div>
+ <a href="{{url_for('edit_case_attributes', inbredset_id=dataset.group.id)}}"
+ title="Edit case attributes for group."
+ target="_blank"
+ class="btn btn-info">Edit CaseAttributes</a>
+ {% set outer_loop = loop %}
+ <div class="sample_group">
+ <div style="position: relative;">
+ <div class="inline-div"><h3 style="float: left;">{{ sample_type.header }}<span name="transform_text"></span></h3></div>
+ </div>
+ <div id="{{ sample_type.sample_group_type }}_container" style="width: {{ trait_table_width }}px;">
+ <table class="table-hover table-striped cell-border" id="samples_{{ sample_type.sample_group_type }}">
+ <tbody>
+ <td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <br>
+ {% endfor %}
+ <input type="hidden" name="Default_Name">
+</div>