From cb5c508a9cf29db4376eaae3080238d6a4f25792 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 26 Jul 2021 20:50:31 +0000 Subject: Added check for pair_scan in start_vars --- wqflask/wqflask/marker_regression/run_mapping.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index f601201b..fcb98db9 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -126,8 +126,6 @@ class RunMapping: self.use_loco = None self.suggestive = "" self.significant = "" - # Initializing this since it is checked in views to determine which template to use - self.pair_scan = False if 'transform' in start_vars: self.transform = start_vars['transform'] else: @@ -239,8 +237,9 @@ class RunMapping: else: self.method = "em" self.model = start_vars['mapmodel_rqtl_geno'] - # if start_vars['pair_scan'] == "true": - # self.pair_scan = True + self.pair_scan = False + if 'pair_scan' in start_vars: + self.pair_scan = True if self.permCheck and self.num_perm > 0: self.perm_output, self.suggestive, self.significant, results = rqtl_mapping.run_rqtl( self.this_trait.name, self.vals, self.samples, self.dataset, self.mapping_scale, self.model, self.method, self.num_perm, perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.covariates) -- cgit v1.2.3 From d699c4865eb6433c7ea9c3a819b88e3ab75892df Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 29 Jul 2021 20:23:50 +0000 Subject: Added Pair Scan options to the Mapping Tools tab in the trait page --- .../templates/show_trait_mapping_tools.html | 111 ++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index 3dd44c85..a32c45fb 100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -13,6 +13,9 @@
  • R/qtl
  • +
  • + Pair Scan +
  • {% elif mapping_method == "QTLReaper" %}
  • Haley-Knott Regression @@ -332,6 +335,110 @@ +
    +
    + {% if genofiles and genofiles|length > 0 %} +
    + +
    + +
    +
    + {% endif %} +
    + +
    + +
    +
    + {% if sample_groups[0].attributes|length > 0 %} +
    + +
    + + +
    +
    + {% endif %} +
    + +
    + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + {% if g.user_session.num_collections < 1 %} + No collections available. Please add traits to a collection to use them as covariates. + {% else %} +
    + + +
    + + {% endif %} +
    +
    +
    + +
    + +
    +
    +
    +
    {% endif %} {% endfor %} @@ -345,8 +452,10 @@
    GEMMA
    Maps traits with correction for kinship among samples using a linear mixed model method, and also allows users to fit multiple covariates such as sex, age, treatment, and genetic markers (PMID: 2453419, and GitHub code). GEMMA incorporates the Leave One Chromosome Out (LOCO) method to ensure that the correction for kinship does not remove useful genetic variance near each marker. Markers can be filtered to include only those with minor allele frequencies (MAF) above a threshold. The default MAF is 0.05.
    {% elif mapping_method == "R/qtl" %} -
    R/qtl (version 1.44.9
    +
    R/qtl (version 1.44.9)
    The original R/qtl mapping package that supports classic experimental crosses including 4-parent F2 intercrosses (e.g., NIA ITP UM-HET3). R/qtl is ideal for populations that do not have complex kinship or admixture (PMID: 12724300). Both R/qtl as implemented here, and R/qtl2 (PMID: 30591514) are available as R suites.
    +
    Pair Scan
    +
    Pair Scan using the R/qtl scantwo function.
    {% elif mapping_method == "QTLReaper" %}
    Haley-Knott Regression
    Fast linear mapping method (PMID 16718932) works well with F2 intercrosses and backcrosses, but that is not recommended for complex or admixed populations (e.g., GWAS or heterogeneous stock studies) or for advanced intercrosses, recombinant inbred families, or diallel crosses. Interactive plots in GeneNetwork have relied on the fast HK mapping for two decades and we still use this method for mapping omics data sets and computing genome-wide permutation threshold (QTL Reaper code).
    -- cgit v1.2.3 From 8a622432b3b53b917a9409093f0210ce7f1c2b87 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 29 Jul 2021 20:26:35 +0000 Subject: Added JS for submitting pair scan from trait page --- .../new/javascript/show_trait_mapping_tools.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js index 09e9d024..e457fa4a 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js +++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js @@ -171,6 +171,28 @@ $(".rqtl-geno-tab, #rqtl_geno_compute").on("click", (function(_this) { }; })(this)); +$(".rqtl-pair-tab, #rqtl_pair_compute").on("click", (function(_this) { + return function() { + if ($(this).hasClass('active') || $(this).attr('id') == "rqtl_pair_compute"){ + var form_data, url; + url = "/loading"; + $('input[name=method]').val("rqtl_geno"); + $('input[name=pair_scan]').val(""); + $('input[name=genofile]').val($('#genofile_rqtl_geno').val()); + $('input[name=num_perm]').val($('input[name=num_perm_rqtl_geno]').val()); + $('input[name=categorical_vars]').val(js_data.categorical_vars) + $('input[name=control_marker]').val($('input[name=control_rqtl_geno]').val()); + $('input[name=do_control]').val($('input[name=do_control_rqtl]:checked').val()); + $('input[name=tool_used]').val("Mapping"); + $('input[name=form_url]').val("/run_mapping"); + $('input[name=wanted_inputs]').val(mapping_input_list.join(",")); + return submit_special(url); + } else { + return true + } + }; +})(this)); + $(".gemma-tab, #gemma_compute").on("click", (function(_this) { return function() { if ($(this).hasClass('active') || $(this).attr('id') == "gemma_compute"){ -- cgit v1.2.3