aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/base/data_set.py11
-rw-r--r--wqflask/utility/gen_geno_ob.py91
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py62
-rw-r--r--wqflask/wqflask/marker_regression/rqtl_mapping.py40
-rw-r--r--wqflask/wqflask/marker_regression/run_mapping.py3
-rw-r--r--wqflask/wqflask/templates/collections/view.html5
-rw-r--r--wqflask/wqflask/templates/show_trait_mapping_tools.html39
7 files changed, 167 insertions, 84 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 7fe9a8ac..abfdd277 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -307,9 +307,11 @@ class DatasetGroup(object):
mapping_id = g.db.execute("select MappingMethodId from InbredSet where Name= '%s'" % self.name).fetchone()[0]
if mapping_id == "1":
- mapping_names = ["QTLReaper", "R/qtl"]
+ mapping_names = ["GEMMA", "QTLReaper", "R/qtl"]
elif mapping_id == "2":
- mapping_names = ["GEMMA"]
+ mapping_names = []
+ elif mapping_id == "3":
+ mapping_names = ["R/qtl"]
elif mapping_id == "4":
mapping_names = ["GEMMA", "PLINK"]
else:
@@ -392,7 +394,10 @@ class DatasetGroup(object):
# reaper barfs on unicode filenames, so here we ensure it's a string
if self.genofile:
- full_filename = str(locate(self.genofile, 'genotype'))
+ if "RData" in self.genofile: #ZS: This is a temporary fix; I need to change the way the JSON files that point to multiple genotype files are structured to point to other file types like RData
+ full_filename = str(locate(self.genofile.split(".")[0] + ".geno", 'genotype'))
+ else:
+ full_filename = str(locate(self.genofile, 'genotype'))
else:
full_filename = str(locate(self.name + '.geno', 'genotype'))
diff --git a/wqflask/utility/gen_geno_ob.py b/wqflask/utility/gen_geno_ob.py
index 44e2722f..aa5b27c4 100644
--- a/wqflask/utility/gen_geno_ob.py
+++ b/wqflask/utility/gen_geno_ob.py
@@ -1,5 +1,8 @@
from __future__ import absolute_import, division, print_function
+import utility.logger
+logger = utility.logger.getLogger(__name__ )
+
class genotype(object):
"""
Replacement for reaper.Dataset so we can remove qtlreaper use while still generating mapping output figure
@@ -34,8 +37,34 @@ class genotype(object):
def __len__(self):
return len(self.chromosomes)
- def read_file(self, filename):
+ def read_rdata_output(self, qtl_results):
+ #ZS: This is necessary because R/qtl requires centimorgan marker positions, which it normally gets from the .geno file, but that doesn't exist for HET3-ITP (which only has RData), so it needs to read in the marker cM positions from the results
+ self.chromosomes = [] #ZS: Overwriting since the .geno file's contents are just placeholders
+
+ this_chr = "" #ZS: This is so it can track when the chromosome changes as it iterates through markers
+ chr_ob = None
+ for marker in qtl_results:
+ locus = Locus(self)
+ if str(marker['chr']) != this_chr:
+ if this_chr != "":
+ self.chromosomes.append(chr_ob)
+ this_chr = str(marker['chr'])
+ chr_ob = Chr(this_chr, self)
+ if 'chr' in marker:
+ locus.chr = str(marker['chr'])
+ if 'name' in marker:
+ locus.name = marker['name']
+ if 'Mb' in marker:
+ locus.Mb = marker['Mb']
+ if 'cM' in marker:
+ locus.cM = marker['cM']
+ chr_ob.loci.append(locus)
+
+ self.chromosomes.append(chr_ob)
+
+ return self
+ def read_file(self, filename):
with open(filename, 'r') as geno_file:
lines = geno_file.readlines()
@@ -109,33 +138,39 @@ class Chr(object):
return len(self.loci)
def add_marker(self, marker_row):
- self.loci.append(Locus(marker_row, self.geno_ob))
+ self.loci.append(Locus(self.geno_ob, marker_row))
class Locus(object):
- def __init__(self, marker_row, geno_ob):
- self.chr = marker_row[0]
- self.name = marker_row[1]
- try:
- self.cM = float(marker_row[geno_ob.cm_column])
- except:
- self.cM = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else 0
- self.Mb = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else None
-
- geno_table = {
- geno_ob.mat: -1,
- geno_ob.pat: 1,
- geno_ob.het: 0,
- geno_ob.unk: "U"
- }
-
+ def __init__(self, geno_ob, marker_row = None):
+ self.chr = None
+ self.name = None
+ self.cM = None
+ self.Mb = None
self.genotype = []
- if geno_ob.mb_exists:
- start_pos = 4
- else:
- start_pos = 3
-
- for allele in marker_row[start_pos:]:
- if allele in geno_table.keys():
- self.genotype.append(geno_table[allele])
- else: #ZS: Some genotype appears that isn't specified in the metadata, make it unknown
- self.genotype.append("U") \ No newline at end of file
+ if marker_row:
+ self.chr = marker_row[0]
+ self.name = marker_row[1]
+ try:
+ self.cM = float(marker_row[geno_ob.cm_column])
+ except:
+ self.cM = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else 0
+ self.Mb = float(marker_row[geno_ob.mb_column]) if geno_ob.mb_exists else None
+
+ geno_table = {
+ geno_ob.mat: -1,
+ geno_ob.pat: 1,
+ geno_ob.het: 0,
+ geno_ob.unk: "U"
+ }
+
+ self.genotype = []
+ if geno_ob.mb_exists:
+ start_pos = 4
+ else:
+ start_pos = 3
+
+ for allele in marker_row[start_pos:]:
+ if allele in geno_table.keys():
+ self.genotype.append(geno_table[allele])
+ else: #ZS: Some genotype appears that isn't specified in the metadata, make it unknown
+ self.genotype.append("U") \ No newline at end of file
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index e74f35f5..cf4508dd 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -247,11 +247,29 @@ class DisplayMappingResults(object):
self.strainlist = start_vars['samples']
+ self.traitList = []
+ thisTrait = start_vars['this_trait']
+ self.traitList.append(thisTrait)
+
+ ################################################################
+ # Calculations QTL goes here
+ ################################################################
+ self.multipleInterval = len(self.traitList) > 1
+ self.qtlresults = start_vars['qtl_results']
+
+ if self.multipleInterval:
+ self.colorCollection = Plot.colorSpectrum(len(self.qtlresults))
+ else:
+ self.colorCollection = [self.LRS_COLOR]
+
if self.mapping_method == "reaper" and self.manhattan_plot != True:
self.genotype = self.dataset.group.read_genotype_file(use_reaper=True)
else:
self.genotype = self.dataset.group.read_genotype_file()
+ if self.mapping_method == "rqtl_geno" and self.genotype.filler == True:
+ self.genotype = self.genotype.read_rdata_output(self.qtlresults)
+
#Darwing Options
try:
if self.selectedChr > -1:
@@ -346,10 +364,6 @@ class DisplayMappingResults(object):
else:
self.GraphInterval = self.cMGraphInterval #cM
- self.traitList = []
- thisTrait = start_vars['this_trait']
- self.traitList.append(thisTrait)
-
## BEGIN HaplotypeAnalyst
## count the amount of individuals to be plotted, and increase self.graphHeight
if self.haplotypeAnalystChecked and self.selectedChr > -1:
@@ -371,16 +385,7 @@ class DisplayMappingResults(object):
self.graphHeight = self.graphHeight + 2 * (self.NR_INDIVIDUALS+10) * self.EACH_GENE_HEIGHT
## END HaplotypeAnalyst
- ################################################################
- # Calculations QTL goes here
- ################################################################
- self.multipleInterval = len(self.traitList) > 1
- self.qtlresults = start_vars['qtl_results']
- if self.multipleInterval:
- self.colorCollection = Plot.colorSpectrum(len(self.qtlresults))
- else:
- self.colorCollection = [self.LRS_COLOR]
#########################
@@ -1654,10 +1659,6 @@ class DisplayMappingResults(object):
INTERCROSS = (self.genotype.type=="intercross")
- LRSHeightThresh = drawAreaHeight
- AdditiveHeightThresh = drawAreaHeight/2
- DominanceHeightThresh = drawAreaHeight/2
-
#draw the LRS scale
#We first determine whether or not we are using a sliding scale.
#If so, we need to compute the maximum LRS value to determine where the max y-value should be, and call this LRS_LOD_Max.
@@ -1694,7 +1695,9 @@ class DisplayMappingResults(object):
pass
if self.permChecked and self.nperm > 0 and not self.multipleInterval:
- LRS_LOD_Max = max(self.significant, LRS_LOD_Max)
+ if self.significant > LRS_LOD_Max:
+ LRS_LOD_Max = self.significant * 1.1
+ #LRS_LOD_Max = max(self.significant, LRS_LOD_Max)
else:
LRS_LOD_Max = 1.15*LRS_LOD_Max
@@ -1715,6 +1718,12 @@ class DisplayMappingResults(object):
LRSLODFont=pid.Font(ttf="verdana", size=18*zoom*1.5, bold=0)
yZero = yTopOffset + plotHeight
+ LRSHeightThresh = drawAreaHeight
+ AdditiveHeightThresh = drawAreaHeight/2
+ DominanceHeightThresh = drawAreaHeight/2
+ # LRSHeightThresh = (yZero - yTopOffset + 30*(zoom - 1))
+ # AdditiveHeightThresh = LRSHeightThresh/2
+ # DominanceHeightThresh = LRSHeightThresh/2
if LRS_LOD_Max > 100:
LRSScale = 20.0
@@ -1728,7 +1737,7 @@ class DisplayMappingResults(object):
LRSAxisList = Plot.frange(LRSScale, LRS_LOD_Max, LRSScale)
#make sure the user's value appears on the y-axis
#update by NL 6-21-2011: round the LOD value to 100 when LRS_LOD_Max is equal to 460
- LRSAxisList.append(round(LRS_LOD_Max))
+ LRSAxisList.append(ceil(LRS_LOD_Max))
#ZS: Convert to int if all axis values are whole numbers
all_int = True
@@ -1751,7 +1760,9 @@ class DisplayMappingResults(object):
for item in LRSAxisList:
if LRS_LOD_Max == 0.0:
LRS_LOD_Max = 0.000001
+ yTopOffset + 30*(zoom - 1)
yLRS = yZero - (item/LRS_LOD_Max) * LRSHeightThresh
+ #yLRS = yZero - (item/LRSAxisList[-1]) * LRSHeightThresh
canvas.drawLine(xLeftOffset, yLRS, xLeftOffset - 4, yLRS, color=self.LRS_COLOR, width=1*zoom)
if all_int:
scaleStr = "%d" % item
@@ -1763,6 +1774,8 @@ class DisplayMappingResults(object):
if self.permChecked and self.nperm > 0 and not self.multipleInterval:
significantY = yZero - self.significant*LRSHeightThresh/LRS_LOD_Max
suggestiveY = yZero - self.suggestive*LRSHeightThresh/LRS_LOD_Max
+ # significantY = yZero - self.significant*LRSHeightThresh/LRSAxisList[-1]
+ # suggestiveY = yZero - self.suggestive*LRSHeightThresh/LRSAxisList[-1]
startPosX = xLeftOffset
#"Significant" and "Suggestive" Drawing Routine
@@ -1878,24 +1891,35 @@ class DisplayMappingResults(object):
# updated by NL 06-18-2011:
# fix the over limit LRS graph issue since genotype trait may give infinite LRS;
# for any lrs is over than 460(LRS max in this system), it will be reset to 460
+
+ yLRS = yZero - (item/LRS_LOD_Max) * LRSHeightThresh
+
+
if 'lrs_value' in qtlresult:
if self.LRS_LOD == "LOD" or self.LRS_LOD == "-log(p)":
if qtlresult['lrs_value'] > 460 or qtlresult['lrs_value']=='inf':
+ #Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/(LRSAxisList[-1]*self.LODFACTOR)
Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/(LRS_LOD_Max*self.LODFACTOR)
else:
+ #Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/(LRSAxisList[-1]*self.LODFACTOR)
Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/(LRS_LOD_Max*self.LODFACTOR)
else:
if qtlresult['lrs_value'] > 460 or qtlresult['lrs_value']=='inf':
+ #Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/LRSAxisList[-1]
Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/LRS_LOD_Max
else:
+ #Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/LRSAxisList[-1]
Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/LRS_LOD_Max
else:
if qtlresult['lod_score'] > 100 or qtlresult['lod_score']=='inf':
+ #Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/LRSAxisList[-1]
Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/LRS_LOD_Max
else:
if self.LRS_LOD == "LRS":
+ #Yc = yZero - qtlresult['lod_score']*self.LODFACTOR*LRSHeightThresh/LRSAxisList[-1]
Yc = yZero - qtlresult['lod_score']*self.LODFACTOR*LRSHeightThresh/LRS_LOD_Max
else:
+ #Yc = yZero - qtlresult['lod_score']*LRSHeightThresh/LRSAxisList[-1]
Yc = yZero - qtlresult['lod_score']*LRSHeightThresh/LRS_LOD_Max
if self.manhattan_plot == True:
diff --git a/wqflask/wqflask/marker_regression/rqtl_mapping.py b/wqflask/wqflask/marker_regression/rqtl_mapping.py
index 41d67012..2e3ea406 100644
--- a/wqflask/wqflask/marker_regression/rqtl_mapping.py
+++ b/wqflask/wqflask/marker_regression/rqtl_mapping.py
@@ -9,8 +9,6 @@ import utility.logger
logger = utility.logger.getLogger(__name__ )
def run_rqtl_geno(vals, dataset, method, model, permCheck, num_perm, do_control, control_marker, manhattan_plot, pair_scan):
- geno_to_rqtl_function(dataset)
-
## Get pointers to some common R functions
r_library = ro.r["library"] # Map the library function
r_c = ro.r["c"] # Map the c function
@@ -21,16 +19,24 @@ def run_rqtl_geno(vals, dataset, method, model, permCheck, num_perm, do_control,
print(r_library("qtl")) # Load R/qtl
## Get pointers to some R/qtl functions
- scanone = ro.r["scanone"] # Map the scanone function
- scantwo = ro.r["scantwo"] # Map the scantwo function
- calc_genoprob = ro.r["calc.genoprob"] # Map the calc.genoprob function
- GENOtoCSVR = ro.r["GENOtoCSVR"] # Map the local GENOtoCSVR function
+ scanone = ro.r["scanone"] # Map the scanone function
+ scantwo = ro.r["scantwo"] # Map the scantwo function
+ calc_genoprob = ro.r["calc.genoprob"] # Map the calc.genoprob function
crossname = dataset.group.name
- genofilelocation = locate(crossname + ".geno", "genotype")
- crossfilelocation = TMPDIR + crossname + ".cross"
-
- cross_object = GENOtoCSVR(genofilelocation, crossfilelocation) # TODO: Add the SEX if that is available
+ try:
+ generate_cross_from_rdata(dataset)
+ read_cross_from_rdata = ro.r["generate_cross_from_rdata"] # Map the local read_cross_from_rdata function
+ genofilelocation = locate(crossname + ".RData", "genotype/rdata")
+ cross_object = read_cross_from_rdata(genofilelocation) # Map the local GENOtoCSVR function
+ except:
+ generate_cross_from_geno(dataset)
+ GENOtoCSVR = ro.r["GENOtoCSVR"] # Map the local GENOtoCSVR function
+ crossfilelocation = TMPDIR + crossname + ".cross"
+ genofilelocation = locate(crossname + ".geno", "genotype")
+
+ GENOtoCSVR = ro.r["GENOtoCSVR"] # Map the local GENOtoCSVR function
+ cross_object = GENOtoCSVR(genofilelocation, crossfilelocation) # TODO: Add the SEX if that is available
if manhattan_plot:
cross_object = calc_genoprob(cross_object)
@@ -71,7 +77,18 @@ def run_rqtl_geno(vals, dataset, method, model, permCheck, num_perm, do_control,
else:
return process_rqtl_results(result_data_frame)
-def geno_to_rqtl_function(dataset): # TODO: Need to figure out why some genofiles have the wrong format and don't convert properly
+def generate_cross_from_rdata(dataset):
+ rdata_location = locate(dataset.group.name + ".RData", "genotype/rdata")
+ ro.r("""
+ generate_cross_from_rdata <- function(filename = '%s') {
+ load(file=filename)
+ cross = cunique
+ return(cross)
+ }
+ """ % (rdata_location))
+
+def generate_cross_from_geno(dataset): # TODO: Need to figure out why some genofiles have the wrong format and don't convert properly
+
ro.r("""
trim <- function( x ) { gsub("(^[[:space:]]+|[[:space:]]+$)", "", x) }
@@ -170,6 +187,7 @@ def process_rqtl_results(result): # TODO: how to make this a one liner an
marker = {}
marker['name'] = result.rownames[i]
marker['chr'] = output[i][0]
+ marker['cM'] = output[i][1]
marker['Mb'] = output[i][1]
marker['lod_score'] = output[i][2]
qtl_results.append(marker)
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index ba41ffc3..f03b046e 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -81,7 +81,6 @@ class RunMapping(object):
self.vals.append(value)
else:
self.samples = []
-
for sample in self.dataset.group.samplelist: # sample is actually the name of an individual
if (len(genofile_samplelist) == 0) or (sample in genofile_samplelist):
in_trait_data = False
@@ -186,7 +185,7 @@ class RunMapping(object):
self.showGenes = "ON"
self.viewLegend = "ON"
- self.dataset.group.get_markers()
+ #self.dataset.group.get_markers()
if self.mapping_method == "gemma":
self.first_run = True
self.output_files = None
diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html
index e5188ed8..1be6539d 100644
--- a/wqflask/wqflask/templates/collections/view.html
+++ b/wqflask/wqflask/templates/collections/view.html
@@ -26,7 +26,7 @@
<input type="hidden" name="form_url" value="" />
<input type="hidden" name="trait_list" id="trait_list" value= "
{% for this_trait in trait_obs %}
- {{ this_trait.name }}:{{ this_trait.dataset.name }},
+ {{ this_trait.name }}:{{ this_trait.dataset.name }}:{{ data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name)) }},
{% endfor %}" >
@@ -161,9 +161,10 @@
{% endblock %}
{% block js %}
+ <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/js_external/md5.min.js"></script>
<script type="text/javascript" src="/static/new/javascript/search_results.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.dataTables.min.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/js_external/jszip.min.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/dataTables.naturalSort.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colResize.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/extensions/dataTables.colReorder.js"></script>
diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html
index a806a8b3..ad7412b2 100644
--- a/wqflask/wqflask/templates/show_trait_mapping_tools.html
+++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html
@@ -4,25 +4,18 @@
<div class="tabbable"> <!-- Only required for left/right tabs -->
<ul class="nav nav-pills">
- {% if dataset.group.mapping_id == "1" %}
- <li class="gemma_tab mapping_tab active">
- <a href="#gemma" data-toggle="tab">GEMMA</a>
- </li>
- <li class="reaper_tab mapping_tab">
- <a href="#interval_mapping" data-toggle="tab">Haley-Knott Regression</a>
- </li>
- <li class="rqtl_tab mapping_tab rqtl">
- <a href="#rqtl_geno" data-toggle="tab">R/qtl</a>
- </li>
- {% endif %}
{% for mapping_method in dataset.group.mapping_names %}
{% if mapping_method == "GEMMA" %}
- <li class="gemma_tab mapping_tab active">
+ <li class="gemma_tab mapping_tab {% if dataset.group.mapping_id == '1' %}active{% endif %}">
<a href="#gemma" data-toggle="tab">GEMMA</a>
</li>
- {% elif mapping_method == "PLINK" %}
- <li class="plink_tab mapping_tab">
- <a href="#plink" data-toggle="tab">PLINK</a>
+ {% elif mapping_method == "R/qtl" %}
+ <li class="rqtl_geno_tab mapping_tab {% if dataset.group.mapping_id == '3' %}active{% endif %}">
+ <a href="#rqtl_geno" data-toggle="tab">R/qtl</a>
+ </li>
+ {% elif mapping_method == "QTLReaper" %}
+ <li class="reaper_tab mapping_tab">
+ <a href="#interval_mapping" data-toggle="tab">Haley-Knott Regression</a>
</li>
{% endif %}
{% endfor %}
@@ -32,7 +25,9 @@
</ul>
<div class="tab-content">
- <div class="tab-pane active" id="gemma">
+ {% for mapping_method in dataset.group.mapping_names %}
+ {% if mapping_method == "GEMMA" %}
+ <div class="tab-pane {% if dataset.group.mapping_id == '1' %}active{% endif %}" id="gemma">
<div style="padding-top: 20px;" class="form-horizontal">
<div class="mapping_method_fields form-group">
<label for="chr_select" style="text-align: right;" class="col-xs-3 control-label">Chromosome</label>
@@ -102,7 +97,7 @@
</div>
</div>
</div>
- {% if dataset.group.mapping_id == "1" %}
+ {% elif mapping_method == "QTLReaper" %}
<div class="tab-pane" id="interval_mapping">
<div style="margin-top: 20px" class="form-horizontal">
<div class="mapping_method_fields form-group">
@@ -217,7 +212,8 @@
</div>
</div>
</div>
- <div class="tab-pane" id="rqtl_geno">
+ {% elif mapping_method == "R/qtl" %}
+ <div class="tab-pane {% if dataset.group.mapping_id == '3' %}active{% endif %}" id="rqtl_geno">
<div style="margin-top: 20px" class="form-horizontal">
<div class="mapping_method_fields form-group">
<label for="chr_select" style="text-align: right;" class="col-xs-3 control-label">Chromosome</label>
@@ -341,19 +337,24 @@
</div>
</div>
{% endif %}
+ {% endfor %}
</div>
</div>
</div>
<div class="col-xs-7">
<dl style="width: 500px;">
+ {% for mapping_method in dataset.group.mapping_names %}
+ {% if mapping_method == "GEMMA" %}
<dt style="padding-top: 20px;">GEMMA</dt>
<dd>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 (<a href="https://www.ncbi.nlm.nih.gov/pubmed/24531419">PMID: 2453419</a>, and <a href="https://github.com/genetics-statistics/GEMMA"> GitHub code</a>). 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.</dd>
- {% if dataset.group.mapping_id == "1" %}
+ {% elif mapping_method == "R/qtl" %}
<dt style="margin-top: 20px;">R/qtl</dt>
<dd>Major upgrade of R/qtl that supports most experimental populations including those with complex admixture and two or more parental lines as well as large omic data sets (<a href="https://www.ncbi.nlm.nih.gov/pubmed/30591514">PMID: 30591514</a>). Both R/qtl and R/qtl2 are available as stand-alone R packages (<a href="https://kbroman.org/pages/software.html">R suite</a>).</dd>
+ {% elif mapping_method == "QTLReaper" %}
<dt style="margin-top: 20px;">Haley-Knott Regression</dt>
<dd>Fast linear mapping method (<a href="https://www.ncbi.nlm.nih.gov/pubmed/16718932">PMID 16718932</a>) 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 (<a href="https://github.com/pjotrp/QTLReaper">QTL Reaper code</a>).</dd>
{% endif %}
+ {% endfor %}
</dl>
<div class="rqtl_description" style="padding-top: 40px; display: none;">
More information on R/qtl mapping models and methods can be found <a href="http://www.rqtl.org/tutorials/rqtltour.pdf">here</a>.