aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/data_set.py2
-rw-r--r--wqflask/wqflask/marker_regression/display_mapping_results.py10
-rw-r--r--wqflask/wqflask/marker_regression/gemma_mapping.py73
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py2
-rw-r--r--wqflask/wqflask/templates/base.html42
-rw-r--r--wqflask/wqflask/templates/mapping_results.html8
6 files changed, 74 insertions, 63 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 4fee5c7a..d766e284 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -433,7 +433,7 @@ def datasets(group_name, this_group = None):
and InbredSet.Name like %s
and ProbeSetFreeze.public > %s
and ProbeSetFreeze.confidentiality < 1
- ORDER BY Tissue.Name)
+ ORDER BY Tissue.Name, ProbeSetFreeze.OrderList DESC)
''' % (group_name, webqtlConfig.PUBLICTHRESH,
group_name, webqtlConfig.PUBLICTHRESH,
"'" + group_name + "'", webqtlConfig.PUBLICTHRESH))
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index cafbf38c..41cdf819 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -2127,7 +2127,7 @@ class DisplayMappingResults(object):
tableIterationsCnt = tableIterationsCnt + 1
this_row = [] #container for the cells of each row
- selectCheck = HT.Input(type="checkbox", name="searchResult", value=theGO["GeneSymbol"], Class="checkbox trait_checkbox") #checkbox for each row
+ selectCheck = HT.Input(type="checkbox", name="selectCheck", value=theGO["GeneSymbol"], Class="checkbox trait_checkbox") #checkbox for each row
geneLength = (theGO["TxEnd"] - theGO["TxStart"])*1000.0
tenPercentLength = geneLength*0.0001
@@ -2213,7 +2213,7 @@ class DisplayMappingResults(object):
elif self.dataset.group.species == 'rat':
for gIndex, theGO in enumerate(geneCol):
this_row = [] #container for the cells of each row
- selectCheck = HT.Input(type="checkbox", name="searchResult", Class="checkbox", onClick="highlight(this)").__str__() #checkbox for each row
+ selectCheck = HT.Input(type="checkbox", name="selectCheck", Class="checkbox trait_checkbox").__str__() #checkbox for each row
#ZS: May want to get this working again later
#webqtlSearch = HT.Href(os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE)+"?cmd=sch&gene=%s&alias=1&species=rat" % theGO["GeneSymbol"], ">>", target="_blank").__str__()
@@ -2240,14 +2240,14 @@ class DisplayMappingResults(object):
#Mouse Gene
if theGO['mouseGene']:
mouseChr = theGO['mouseGene']["Chromosome"]
- mouseTxStart = theGO['mouseGene']["TxStart"]
+ mouseTxStart = "%0.6f" % theGO['mouseGene']["TxStart"]
else:
mouseChr = mouseTxStart = ""
#the chromosomes for human 1 are 1qXX.XX
if theGO['humanGene']:
humanChr = theGO['humanGene']["Chromosome"]
- humanTxStart = theGO['humanGene']["TxStart"]
+ humanTxStart = "%0.6f" % theGO['humanGene']["TxStart"]
else:
humanChr = humanTxStart = ""
@@ -2258,7 +2258,7 @@ class DisplayMappingResults(object):
this_row = [selectCheck.__str__(),
str(gIndex+1),
geneSymbolNCBI,
- theGO["TxStart"],
+ "%0.6f" % theGO["TxStart"],
HT.Href(geneLengthURL, "%0.3f" % (geneLength*1000.0)).__str__(),
avgExprVal,
mouseChr,
diff --git a/wqflask/wqflask/marker_regression/gemma_mapping.py b/wqflask/wqflask/marker_regression/gemma_mapping.py
index 0f37e711..4e3c203d 100644
--- a/wqflask/wqflask/marker_regression/gemma_mapping.py
+++ b/wqflask/wqflask/marker_regression/gemma_mapping.py
@@ -73,50 +73,51 @@ def run_gemma(this_trait, this_dataset, samples, vals, covariates, use_loco, maf
gwa_output_filename)
else:
- generate_k_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -gk -outdir %s/gn2/ -o %s' % (flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- trait_filename,
- flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- k_output_filename)
- #generate_k_command = GEMMA_WRAPPER_COMMAND + ' --json -- ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/%s.txt -a %s/%s_snps.txt -gk > %s/gn2/%s.json' % (flat_files('genotype/bimbam'),
- # genofile_name,
- # flat_files('genotype/bimbam'),
- # trait_filename,
- # flat_files('genotype/bimbam'),
- # genofile_name,
- # TEMPDIR,
- # k_output_filename)
+ # generate_k_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -gk -outdir %s/gn2/ -o %s' % (flat_files('genotype/bimbam'),
+ # genofile_name,
+ # TEMPDIR,
+ # trait_filename,
+ # flat_files('genotype/bimbam'),
+ # genofile_name,
+ # TEMPDIR,
+ # k_output_filename)
+ generate_k_command = GEMMA_WRAPPER_COMMAND + ' --json -- ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -gk > %s/gn2/%s.json' % (flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ trait_filename,
+ flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ k_output_filename)
logger.debug("k_command:" + generate_k_command)
os.system(generate_k_command)
- gemma_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -k %s/gn2/%s.cXX.txt -lmm 2 -maf %s' % (flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- trait_filename,
- flat_files('genotype/bimbam'),
- genofile_name,
- TEMPDIR,
- k_output_filename,
- maf)
+ # gemma_command = GEMMA_COMMAND + ' ' + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/gn2/%s.txt -a %s/%s_snps.txt -k %s/gn2/%s.cXX.txt -lmm 2 -maf %s' % (flat_files('genotype/bimbam'),
+ # genofile_name,
+ # TEMPDIR,
+ # trait_filename,
+ # flat_files('genotype/bimbam'),
+ # genofile_name,
+ # TEMPDIR,
+ # k_output_filename,
+ # maf)
- #gemma_command = GEMMA_WRAPPER_COMMAND + ' --json --input %s/gn2/%s.json -- ' % (TEMPDIR, k_output_filename) + GEMMAOPTS + ' -g %s/%s_geno.txt -p %s/%s_pheno.txt' % (flat_files('genotype/bimbam'),
- # genofile_name,
- # flat_files('genotype/bimbam'),
- # genofile_name)
+ gemma_command = GEMMA_WRAPPER_COMMAND + ' --json --input %s/gn2/%s.json -- ' % (TEMPDIR, k_output_filename) + GEMMAOPTS + ' -lmm 2 -g %s/%s_geno.txt -p %s/gn2/%s.txt' % (flat_files('genotype/bimbam'),
+ genofile_name,
+ TEMPDIR,
+ trait_filename)
if covariates != "":
- gemma_command += ' -c %s/%s_covariates.txt -outdir %s -o %s_output' % (flat_files('mapping'),
- this_dataset.group.name,
- webqtlConfig.GENERATED_IMAGE_DIR,
- genofile_name)
- else:
- gemma_command += ' -outdir %s -o %s_output' % (webqtlConfig.GENERATED_IMAGE_DIR,
- genofile_name)
+ gemma_command += ' -c %s/%s_covariates.txt' % (flat_files('mapping'), this_dataset.group.name)
+ # gemma_command += ' -c %s/%s_covariates.txt -outdir %s -o %s_output' % (flat_files('mapping'),
+ # this_dataset.group.name,
+ # webqtlConfig.GENERATED_IMAGE_DIR,
+ # genofile_name)
+ # else:
+ # gemma_command += ' -outdir %s -o %s_output' % (webqtlConfig.GENERATED_IMAGE_DIR,
+ # genofile_name)
logger.debug("gemma_command:" + gemma_command)
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index e10b31c0..5178ece8 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -168,7 +168,7 @@ class ShowTrait(object):
hddn['control_marker'] = self.nearest_marker
#hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2
hddn['do_control'] = False
- hddn['maf'] = 0.01
+ hddn['maf'] = 0.05
hddn['compare_traits'] = []
hddn['export_data'] = ""
hddn['export_format'] = "excel"
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index 21fc99d3..3fd9faf5 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -127,27 +127,35 @@
<a href="http://joss.theoj.org/papers/10.21105/joss.00025"><img src="https://camo.githubusercontent.com/846b750f582ae8f1d0b4f7e8fee78bed705c88ba/687474703a2f2f6a6f73732e7468656f6a2e6f72672f7061706572732f31302e32313130352f6a6f73732e30303032352f7374617475732e737667" alt="JOSS" data-canonical-src="http://joss.theoj.org/papers/10.21105/joss.00025/status.svg" style="max-width:100%;"></a>
</p>
<br />
- <p>GeneNetwork is supported by:</p>
- <UL>
- <LI>
- <a href="http://citg.uthsc.edu">
+ <p>GeneNetwork support from:</p>
+ <ul>
+ <li>
+ <a href="http://citg.uthsc.edu">
The UT Center for Integrative and Translational Genomics
- </A>
+ </a>
</li>
- <LI><a href="http://www.iniastress.org">NIAAA</A>
- Integrative Neuroscience Initiative on Alcoholism
- (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425)
+ <li>
+ <a href="https://www.nigms.nih.gov/">NIGMS</a>
+ Systems Genetics and Precision Medicine Project (R01 GM123489, 2017-2021)
</li>
- <LI>
- <a
- href="https://www.drugabuse.gov/">NIDA</A>, <a class="smallsize" href="http://www.nimh.nih.gov/">NIMH</A>
- , and <a class="smallsize" href="http://www.niaaa.nih.gov/">
- NIAAA</A> (P20-DA 21131)
+ <li>
+ <a href="https://www.drugabuse.gov/">NIDA</a>
+ NIDA Core Center of Excellence in Transcriptomics, Systems Genetics, and the Addictome (P30 DA044223, 2017-2022)
</li>
- <LI>NCI <a href="http://emice.nci.nih.gov/">MMHCC</A> (U01CA105417) and
- <a href="https://en.wikipedia.org/wiki/National_Center_for_Research_Resources">NCRR</a>
- <a href="https://en.wikipedia.org/wiki/Biomedical_Informatics_Research_Network">BIRN</a>
- (U24 RR021760)
+ <li>
+ <a href="http://www.nia.nih.gov/">NIA</a>
+ Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018)
+ </li>
+ <li>
+ <a href="http://www.iniastress.org/">NIAAA</a>
+ Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017)
+ </li>
+ <li>
+ <a href="http://www.drugabuse.gov/">NIDA</a>, <a href="http://www.nimh.nih.gov/">NIMH</a>, and <a href="http://www.niaaa.nih.gov/">NIAAA</a>
+ (P20-DA 21131, 2001-2012)
+ </li>
+ <li>
+ NCI <a href="http://emice.nci.nih.gov/">MMHCC</a> (U01CA105417), NCRR, <a href="http://www.birncommunity.org/">BIRN</a>, (U24 RR021760)
</li>
</UL>
<!--</p>-->
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index ba4d4d7c..00a7b811 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -262,7 +262,7 @@
<div style="width: 100%;">
<h2>Interval Analyst</h2>
<div id="table_container">
- <table id="interval_analyst" class="table-hover table-striped cell-border dataTable" style="float: left; width:100%;">
+ <table id="trait_table" class="table-hover table-striped cell-border dataTable" style="float: left; width:100%;">
<thead>
<tr>
{% for header in gene_table_header %}
@@ -322,6 +322,7 @@
<script type="text/javascript" charset="utf-8">
$(document).ready( function () {
console.time("Creating table");
+ {% if selectedChr == -1 %}
$('#trait_table').DataTable( {
"columns": [
{ "type": "natural", "width": "5%" },
@@ -346,8 +347,8 @@
"scrollCollapse": false,
"paging": false
} );
-
- $('#interval_analyst').dataTable( {
+ {% elif selectedChr != -1 and plotScale =="physic" and (dataset.group.species == 'mouse' or dataset.group.species == 'rat') %}
+ $('#trait_table').dataTable( {
"createdRow": function ( row, data, index ) {
$('td', row).eq(1).attr("align", "right");
$('td', row).eq(3).attr("align", "right");
@@ -384,6 +385,7 @@
"scrollCollapse": false,
"paging": false
} );
+ {% endif %}
$('#vector_map_tab').click(function(){
$('div#gn1_map_options').hide();