aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uploader/templates/phenotypes/view-dataset.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/uploader/templates/phenotypes/view-dataset.html b/uploader/templates/phenotypes/view-dataset.html
index 6a261fc..c634a48 100644
--- a/uploader/templates/phenotypes/view-dataset.html
+++ b/uploader/templates/phenotypes/view-dataset.html
@@ -72,6 +72,24 @@
id="submit-frm-recompute-phenotype-means" />
</form>
</div>
+
+ <div class="col">
+ <form id="frm-run-qtlreaper"
+ method="POST"
+ action="{{url_for(
+ 'species.populations.phenotypes.rerun_qtlreaper',
+ species_id=species['SpeciesId'],
+ population_id=population['Id'],
+ dataset_id=dataset['Id'])}}"
+ class="d-flex flex-row align-items-center flex-wrap"
+ style="display: inline;">
+ <input type="submit"
+ title="Run/Rerun QTLReaper."
+ class="btn btn-info"
+ value="(re)run QTLReaper"
+ id="submit-frm-rerun-qtlreaper" />
+ </form>
+ </div>
</div>
<div class="row">
@@ -165,6 +183,27 @@
return `${pheno.InbredSetCode}_${pheno.xref_id}`;
}
});
+
+
+ $("#submit-frm-rerun-qtlreaper").on(
+ "click",
+ function(event) {
+ // (Re)run the QTLReaper script for selected phenotypes.
+ event.preventDefault();
+ var form = $("#frm-run-qtlreaper");
+ form.find(".dynamically-added-element").remove();
+ dtPhenotypesList.rows({selected: true}).nodes().each((node, index) => {
+ _cloned = $(node).find(".chk-row-select").clone();
+ _cloned.removeAttr("id");
+ _cloned.removeAttr("class");
+ _cloned.attr("style", "display: none;");
+ _cloned.attr("data-type", "dynamically-added-element");
+ _cloned.attr("class", "dynamically-added-element checkbox");
+ _cloned.prop("checked", true);
+ form.append(_cloned);
+ });
+ form.submit();
+ });
});
</script>
{%endblock%}