aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2018-03-02 17:59:28 +0000
committerzsloan2018-03-02 17:59:28 +0000
commit51383c96dc275f4462716398f9ec665fbd84802a (patch)
tree81e9c79257af4c8901710579151575bb7d5650d4 /wqflask
parentf4083550c3560d0ff4555b701b8fd097b42004ac (diff)
downloadgenenetwork2-51383c96dc275f4462716398f9ec665fbd84802a.tar.gz
Added option to display selected covariates for GEMMA mapping
Changed layout/appearance of mapping options Partially fixed issue with deleting collections Changes to correlation table still in progress; having trouble getting tabulator to load JSON
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/collect.py7
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py4
-rw-r--r--wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js5
-rw-r--r--wqflask/wqflask/static/new/javascript/show_trait.js3
-rw-r--r--wqflask/wqflask/templates/collections/list.html12
-rw-r--r--wqflask/wqflask/templates/correlation_page.html43
-rw-r--r--wqflask/wqflask/templates/show_trait_mapping_tools.html208
7 files changed, 146 insertions, 136 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 2f6c3a96..0f72b29d 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -349,8 +349,11 @@ def delete_collection():
db_session.delete(uc)
db_session.commit()
else:
- collection_name = params['collection_name']
- user_manager.AnonUser().delete_collection(collection_name)
+ if "collection_name" in params:
+ collection_name = params['collection_name']
+ else:
+ for this_collection in params['uc_id'].split(":"):
+ user_manager.AnonUser().delete_collection(this_collection)
flash("We've deleted the collection: {}.".format(collection_name), "alert-info")
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py
index 233a5c76..7563eb2c 100644
--- a/wqflask/wqflask/marker_regression/gemma_mapping.py
+++ b/wqflask/wqflask/marker_regression/gemma_mapping.py
@@ -235,7 +235,7 @@ def parse_loco_output(this_dataset, gwa_output_filename):
else:
marker['chr'] = line.split("\t")[0]
marker['Mb'] = float(line.split("\t")[2]) / 1000000
- marker['p_value'] = float(line.split("\t")[10])
+ marker['p_value'] = float(line.split("\t")[11])
if math.isnan(marker['p_value']) or (marker['p_value'] <= 0):
marker['lod_score'] = 0
#marker['lrs_value'] = 0
@@ -245,6 +245,6 @@ def parse_loco_output(this_dataset, gwa_output_filename):
marker_obs.append(marker)
included_markers.append(line.split("\t")[1])
- p_values.append(float(line.split("\t")[10]))
+ p_values.append(float(line.split("\t")[11]))
return marker_obs \ No newline at end of file
diff --git a/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js b/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
index 92e2b13b..f2e694d8 100644
--- a/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
+++ b/wqflask/wqflask/static/new/javascript/get_covariates_from_collection.js
@@ -24,6 +24,7 @@ collection_click = function() {
submit_click = function() {
var covariates_string = "";
+ var covariates_display_string = "";
$('#collections_holder').find('input[type=checkbox]:checked').each(function() {
var this_dataset, this_trait;
this_trait = $(this).parents('tr').find('.trait').text();
@@ -31,12 +32,15 @@ submit_click = function() {
this_dataset = $(this).parents('tr').find('.dataset').text();
console.log("this_dataset is:", this_dataset);
covariates_string += this_trait + ":" + this_dataset + ","
+ covariates_display_string += this_trait + "\n"
});
// Trim the last comma
covariates_string = covariates_string.substring(0, covariates_string.length - 1)
+ //covariates_display_string = covariates_display_string.substring(0, covariates_display_string.length - 2)
console.log("COVARIATES:", covariates_string)
$("input[name=covariates]").val(covariates_string)
+ $(".selected_covariates").val(covariates_display_string)
return $.colorbox.close();
};
@@ -46,6 +50,7 @@ trait_click = function() {
trait = $(this).parent().find('.trait').text();
dataset = $(this).parent().find('.dataset').text();
$("input[name=covariates]").val(trait + ":" + dataset)
+ $(".selected_covariates").text(trait)
return $.colorbox.close();
};
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 099d8010..df10c060 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -88,7 +88,8 @@
};
})(this));
$("#remove_covariates").click(function () {
- $("input[name=covariates]").val("")
+ $("input[name=covariates]").val("")
+ $(".selected_covariates").val("")
});
d3.select("#clear_compare_trait").on("click", (function(_this) {
return function() {
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html
index ad72052e..e7f3229b 100644
--- a/wqflask/wqflask/templates/collections/list.html
+++ b/wqflask/wqflask/templates/collections/list.html
@@ -26,13 +26,13 @@
{% endif %}
</div>
<div>
- <form id="collections_form" action="/delete" method="post">
- <input type="hidden" name="uc_id" id="uc_id" value="" />
- </form>
+ <form id="collections_form" action="/delete" method="post">
+ <input type="hidden" name="uc_id" id="uc_id" value="" />
+ </form>
<button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button>
<button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button>
<button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button>
- <button class="btn btn-danger" id="remove_collections" data-url="/collections/delete">Remove Collections</button>
+ <button class="btn btn-danger" id="remove_collections" data-url="/collections/delete">Remove Collections</button>
</div>
<br>
<div id="collections_list" style="width:50%;">
@@ -51,7 +51,11 @@
<tbody>
{% for uc in collections %}
<tr class="collection_line">
+ {% if g.user_session.user_ob %}
<td style="padding-left: 8px; padding-right: 0px; padding-top: 4px; align: center;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td>
+ {% else %}
+ <td style="padding-left: 8px; padding-right: 0px; padding-top: 4px; align: center;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.name }}"></td>
+ {% endif %}
<td align="right">{{ loop.index }}
{% if g.user_session.user_ob %}
<td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td>
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index 1254ea6a..0d305559 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -275,29 +275,32 @@
{% if target_dataset.type == "ProbeSet" %}
- var json_array = new Array();
+ var json_array = [];
for (i=0; i < table_json.length; i++){
- json_array.push({
- checkbox: table_json[i]["checkbox"],
- index: table_json[i]["index"],
- trait_id: table_json[i]["trait_id"],
- symbol: table_json[i]["symbol"],
- description: table_json[i]["description"],
- location: table_json[i]["location"],
- mean: table_json[i]["mean"],
- lrs_score: table_json[i]["lrs_score"],
- lrs_location: table_json[i]["lrs_location"],
- additive: table_json[i]["additive"],
- sample_r: table_json[i]["sample_r"],
- num_overlap: table_json[i]["num_overlap"],
- sample_p: table_json[i]["sample_p"],
- lit_corr: table_json[i]["lit_corr"],
- tissue_corr: table_json[i]["tissue_corr"]
- });
- console.log("JSON_DATA:", json_array);
+ this_array = json_array
+
+ var row_dict = {};
+ row_dict.checkbox = table_json[i]["checkbox"]
+ row_dict.index = table_json[i]["index"]
+ row_dict.trait_id = table_json[i]["trait_id"]
+ row_dict.symbol = table_json[i]["symbol"]
+ row_dict.description = table_json[i]["description"]
+ row_dict.location = table_json[i]["location"]
+ row_dict.mean = table_json[i]["mean"]
+ row_dict.lrs_score = table_json[i]["lrs_score"]
+ row_dict.lrs_location = table_json[i]["lrs_location"]
+ row_dict.additive = table_json[i]["additive"]
+ row_dict.sample_r = table_json[i]["sample_r"]
+ row_dict.num_overlap = table_json[i]["num_overlap"]
+ row_dict.sample_p = table_json[i]["sample_p"]
+ row_dict.lit_corr = table_json[i]["lit_corr"]
+ row_dict.tissue_corr = table_json[i]["tissue_corr"]
+ this_array.push(row_dict);
+ json_array.concat(this_array);
+ //console.log("JSON_ARRAY:", json_array);
}
- //console.log("JSON_DATA:", json_array)
+ console.log("JSON_DATA:", json_array)
$("#trait_table").tabulator({
data: json_array,
diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html
index dcec2b9e..ab2e2aae 100644
--- a/wqflask/wqflask/templates/show_trait_mapping_tools.html
+++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html
@@ -1,6 +1,6 @@
<div>
{% if (use_pylmm_rqtl and dataset.group.species != "human") or use_plink_gemma %}
- <div class="col-xs-4">
+ <div class="col-xs-5">
<div class="tabbable"> <!-- Only required for left/right tabs -->
<ul class="nav nav-pills">
@@ -38,11 +38,11 @@
{# if use_pylmm_rqtl and not use_plink_gemma and dataset.group.species != "human" #}
{% if dataset.group.mapping_id == "1" %}
<div class="tab-pane active" id="gemma">
- <div style="padding-top: 10px;" class="form-horizontal">
+ <div style="padding-top: 20px;" class="form-horizontal">
{% if genofiles and genofiles|length>0 %}
<div class="mapping_method_fields form-group">
- <label for="genofiles" class="col-xs-3 control-label">Genotypes</label>
- <div style="margin-left: 20px;" class="col-xs-8 controls">
+ <label for="genofiles" style="text-align: left;" class="col-xs-2 control-label">Genotypes</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<select id="genofile_gemma" class="form-control">
{% for item in genofiles %}
<option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option>
@@ -52,14 +52,14 @@
</div>
{% endif %}
<div class="mapping_method_fields form-group">
- <label for="maf_gemma" class="col-xs-5 control-label">Minor allele threshold</label>
- <div style="margin-left: 20px;" class="col-xs-3 controls">
+ <label for="maf_gemma" style="text-align: left;" class="col-xs-2 control-label">MAF</label>
+ <div style="margin-left:20px;" class="col-xs-3 controls">
<input name="maf_gemma" value="0.01" type="text" class="form-control">
</div>
</div>
<div class="mapping_method_fields form-group">
- <label class="col-xs-4 control-label">Use LOCO</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align: left;" class="col-xs-2 control-label">Use LOCO</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<label class="radio-inline">
<input type="radio" name="use_loco" value="True">
Yes
@@ -70,32 +70,54 @@
</label>
</div>
</div>
+ <!--
</div>
<div style="padding-top: 5px; padding-bottom: 5px; padding-left: 20px;" class="form-horizontal">
+ -->
<div class="mapping_method_fields form-group">
- <button type="button" id="select_covariates" class="btn btn-default">
- Select Covariates
- </button>
- <button type="button" id="remove_covariates" class="btn btn-default">
- Remove Covariates
+ <label style="text-align: left;" class="col-xs-2 control-label">Covariates</label>
+ <div style="margin-left:20px;" class="col-xs-7">
+ {% if g.user_session.user_ob and (g.user_session.user_ob.display_num_collections() == "") %}
+ No collections available. Please add traits to a collection to use them as covariates.
+ {% elif g.cookie_session.display_num_collections() == "" %}
+ No collections available. Please add traits to a collection to use them as covariates.
+ {% else %}
+ <div style="margin-bottom: 10px;" class="btn-group" role="group">
+ <button type="button" id="select_covariates" class="btn btn-default">Select</button>
+ <button type="button" id="remove_covariates" class="btn btn-default">Remove</button>
+ </div>
+ <textarea rows="2" cols="40" readonly placeholder="No covariates selected" class="selected_covariates"></textarea>
+ {% endif %}
+ </div>
+ </div>
+ <div class="mapping_method_fields form-group">
+ <label class="col-xs-2 control-label"></label>
+ <div style="margin-left:20px;" class="col-xs-4">
+ <button id="gemma_bimbam_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression">
+ Compute
</button>
+ </div>
</div>
</div>
-
+<!--
<div class="form-group">
<div class="col-xs-4 controls">
+ <label class="col-xs-2 control-label"></label>
+ <div class="col-xs-4">
<button id="gemma_bimbam_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression">
Compute
</button>
+ </div>
</div>
</div>
+-->
</div>
<div class="tab-pane" id="interval_mapping">
<div style="margin-top: 20px" class="form-horizontal">
{% if genofiles and genofiles|length>0 %}
<div class="mapping_method_fields form-group">
- <label for="genofiles" class="col-xs-3 control-label">Genotypes</label>
- <div style="margin-left: 20px;" class="col-xs-8 controls">
+ <label style="text-align: left;" for="genofiles" class="col-xs-2 control-label">Genotypes</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<select id="genofile_reaper" class="form-control">
{% for item in genofiles %}
<option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option>
@@ -105,20 +127,20 @@
</div>
{% endif %}
<div class="mapping_method_fields form-group">
- <label for="mapping_permutations" class="col-xs-3 control-label">Permutations</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align: left;" for="mapping_permutations" class="col-xs-2 control-label">Permutations</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<input name="num_perm_reaper" value="2000" type="text" class="form-control">
</div>
</div>
<div class="mapping_method_fields form-group">
- <label for="mapping_bootstraps" class="col-xs-3 control-label">Bootstraps</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align: left;" for="mapping_bootstraps" class="col-xs-2 control-label">Bootstraps</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<input name="num_bootstrap" value="2000" type="text" class="form-control">
</div>
</div>
<div class="mapping_method_fields form-group">
- <label for="control_for" class="col-xs-3 control-label">Control&nbsp;for</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align: left;" for="control_for" class="col-xs-2 control-label">Control&nbsp;for</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
{% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %}
<input name="control_reaper" value="{{ nearest_marker }}" type="text" style="width: 160px;" class="form-control" />
{% else %}
@@ -162,8 +184,8 @@
<div class="mapping_method_fields form-group">
- <label style="text-align:left;" class="col-xs-3 control-label">Marker<br>Regression</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align:left;" class="col-xs-2 control-label">Marker<br>Regression</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<label class="radio-inline">
<input type="radio" name="manhattan_plot_reaper" value="True">
Yes
@@ -174,11 +196,12 @@
</label>
</div>
</div>
- <div class="form-group">
- <div style="padding-left:15px;" class="controls">
- <button id="interval_mapping_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping">
- <i class="icon-ok-circle icon-white"></i> Compute
- </button>
+ <div class="mapping_method_fields form-group">
+ <label class="col-xs-2 control-label"></label>
+ <div style="margin-left:20px;" class="col-xs-4">
+ <button id="interval_mapping_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping">
+ Compute
+ </button>
</div>
</div>
<!--<div id="alert_placeholder"></div>-->
@@ -189,8 +212,8 @@
<div style="margin-top: 20px" class="form-horizontal">
{% if genofiles and genofiles|length>0 %}
<div class="mapping_method_fields form-group">
- <label for="genofiles" class="col-xs-3 control-label">Genotypes</label>
- <div style="margin-left: 20px;" class="col-xs-8 controls">
+ <label style="text-align: left;" for="genofiles" class="col-xs-2 control-label">Genotypes</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<select id="genofile_rqtl_geno" class="form-control">
{% for item in genofiles %}
<option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option>
@@ -200,17 +223,14 @@
</div>
{% endif %}
<div class="mapping_method_fields form-group">
- <label for="mapping_permutations" class="col-xs-3 control-label">Permutations</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
- <input name="num_perm_rqtl_geno" value="" type="text" class="form-control">
+ <label style="text-align: left;" for="mapping_permutations" class="col-xs-2 control-label">Permutations</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
+ <input name="num_perm_rqtl_geno" value="2000" type="text" class="form-control">
</div>
</div>
- <div id="permutations_alert" class="alert alert-error alert-warning" style="display:none;">
- Please be aware that permutations can take a very long time (~20 minutes for 500 permutations)
- </div>
<div class="mapping_method_fields form-group">
- <label for="control_for" class="col-xs-3 control-label">Control&nbsp;for</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
+ <label style="text-align: left;" for="control_for" class="col-xs-2 control-label">Control&nbsp;for</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
{% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %}
<input name="control_rqtl_geno" value="{{ nearest_marker }}" type="text" style="width: 160px;" class="form-control" />
{% else %}
@@ -228,8 +248,8 @@
</div>
<div class="mapping_method_fields form-group">
- <label for="mapmethod_rqtl_geno" style="text-align:left;" class="col-xs-3 control-label">Method</label>
- <div class="col-xs-4 controls">
+ <label style="text-align: left;" for="mapmethod_rqtl_geno" class="col-xs-2 control-label">Method</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<select name="mapmethod_rqtl_geno" class="form-control">
<option value="em">em</option>
<option value="imp">imp</option>
@@ -243,8 +263,8 @@
</div>
<div class="mapping_method_fields form-group">
- <label for="mapmodel_rqtl_geno" style="text-align:left;" class="col-xs-3 control-label">Model</label>
- <div class="col-xs-4 controls">
+ <label style="text-align:left;" for="mapmodel_rqtl_geno" class="col-xs-2 control-label">Model</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<select name="mapmodel_rqtl_geno" class="form-control">
<option value="normal">normal</option>
<!--<option value="binary">binary</option>
@@ -269,8 +289,8 @@
</div>
-->
<div class="mapping_method_fields form-group">
- <label style="text-align:left;" class="col-xs-12 control-label">Manhattan Plot</label>
- <div class="col-xs-12 controls">
+ <label style="text-align:left;" class="col-xs-2 control-label">Marker<br>Regression</label>
+ <div style="margin-left:20px;" class="col-xs-4 controls">
<label class="radio-inline">
<input type="radio" name="manhattan_plot_rqtl" value="True">
Yes
@@ -282,11 +302,12 @@
</div>
</div>
- <div class="form-group">
- <div style="padding-left:15px;" class="controls">
- <button id="rqtl_geno_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression">
- <i class="icon-ok-circle icon-white"></i> Compute
- </button>
+ <div class="mapping_method_fields form-group">
+ <label class="col-xs-2 control-label"></label>
+ <div style="margin-left:20px;" class="col-xs-4">
+ <button id="rqtl_geno_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping">
+ Compute
+ </button>
</div>
</div>
</div>
@@ -295,8 +316,8 @@
<div style="margin-top: 20px" class="form-horizontal">
{% if genofiles and genofiles|length>0 %}
<div class="mapping_method_fields form-group">
- <label for="genofiles" class="col-xs-3 control-label">Genotypes</label>
- <div style="margin-left: 20px;" class="col-xs-8 controls">
+ <label style="text-align:left;" class="col-xs-2 control-label">Genotypes</label>
+ <div style="margin-left: 20px;" class="col-xs-4 controls">
<select id="genofile_pylmm" class="form-control">
{% for item in genofiles %}
<option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option>
@@ -305,44 +326,12 @@
</div>
</div>
{% endif %}
-<!--
<div class="mapping_method_fields form-group">
- <label for="control_for" class="col-xs-3 control-label">Control&nbsp;for</label>
- <div style="margin-left: 20px;" class="col-xs-4 controls">
- {% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %}
- <input name="control_pylmm" value="{{ nearest_marker }}" type="text" />
- {% else %}
- <input name="control_pylmm" value="" type="text" />
- {% endif %}
- <label class="radio-inline">
- <input type="radio" name="do_control_pylmm" value="true">
- Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="do_control_pylmm" value="false" checked="">
- No
- </label>
- </div>
- </div>
- <div class="mapping_method_fields form-group">
- <label style="text-align:left;" class="col-xs-12 control-label">Manhattan Plot</label>
- <div class="col-xs-12 controls">
- <label class="radio-inline">
- <input type="radio" name="manhattan_plot_pylmm" value="True">
- Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="manhattan_plot_pylmm" value="False" checked="">
- No
- </label>
- </div>
- </div>
--->
- <div class="form-group">
- <div style="padding-left:15px;" class="controls">
- <button id="pylmm_compute" class="btn submit_special btn-success" title="Compute Marker Regression">
- <i class="icon-ok-circle icon-white"></i> Compute
- </button>
+ <label class="col-xs-2 control-label"></label>
+ <div style="margin-left:20px;" class="col-xs-4">
+ <button id="pylmm_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping">
+ Compute
+ </button>
</div>
</div>
</div>
@@ -354,8 +343,8 @@
<div style="padding-top: 10px;" class="form-horizontal">
{% if genofiles and genofiles|length>0 %}
<div class="mapping_method_fields form-group">
- <label for="genofiles" class="col-xs-3 control-label">Genotypes</label>
- <div style="margin-left: 20px;" class="col-xs-8 controls">
+ <label style="text-align:left;" class="col-xs-4 control-label">Genotypes</label>
+ <div style="margin-left: 20px;" class="col-xs-2 controls">
<select id="genofile_gemma" class="form-control">
{% for item in genofiles %}
<option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option>
@@ -365,29 +354,34 @@
</div>
{% endif %}
<div class="mapping_method_fields form-group">
- <label for="maf_gemma" class="col-xs-5 control-label">Minor allele threshold</label>
- <div style="margin-left: 20px;" class="col-xs-3 controls">
+ <label style="text-align:left;" class="col-xs-2 control-label">MAF</label>
+ <div style="margin-left: 20px;" class="col-xs-4 controls">
<input name="maf_gemma" value="0.01" type="text" class="form-control">
</div>
</div>
- </div>
-
- <div style="padding-top: 5px; padding-bottom: 5px; padding-left: 20px;" class="form-horizontal">
<div class="mapping_method_fields form-group">
- <button type="button" id="select_covariates" class="btn btn-default">
- Select Covariates
- </button>
- <button type="button" id="remove_covariates" class="btn btn-default">
- Remove Covariates
- </button>
+ <label style="text-align: left;" class="col-xs-2 control-label">Covariates</label>
+ <div style="margin-left:20px;" class="col-xs-7">
+ {% if g.user_session.user_ob and (g.user_session.user_ob.display_num_collections() == "") %}
+ No collections available. Please add traits to a collection to use them as covariates.
+ {% elif g.cookie_session.display_num_collections() == "" %}
+ No collections available. Please add traits to a collection to use them as covariates.
+ {% else %}
+ <div style="margin-bottom: 10px;" class="btn-group" role="group">
+ <button type="button" id="select_covariates" class="btn btn-default">Select</button>
+ <button type="button" id="remove_covariates" class="btn btn-default">Remove</button>
+ </div>
+ <textarea rows="3" cols="20" readonly placeholder="No covariates selected" style="overflow-y: scroll; resize: none;" class="selected_covariates"></textarea>
+ {% endif %}
+ </div>
</div>
- </div>
-
- <div class="form-group">
- <div class="col-xs-4 controls">
+ <div class="mapping_method_fields form-group">
+ <label class="col-xs-2 control-label"></label>
+ <div style="margin-left:20px;" class="col-xs-4">
<button id="gemma_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression">
Compute
</button>
+ </div>
</div>
</div>
</div>
@@ -416,7 +410,7 @@
</div>
</div>
</div>
- <div class="col-xs-6">
+ <div class="col-xs-5">
{% if dataset.group.mapping_id == "1" %}
<dl>
<dt>Interval Mapping</dt>