diff options
-rw-r--r-- | .guix/modules/genenetwork2.scm | 32 | ||||
-rw-r--r-- | wqflask/wqflask/oauth2/collections.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/css/show_trait.css | 18 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js | 6 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/show_trait.js | 11 | ||||
-rw-r--r-- | wqflask/wqflask/templates/base.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/collections/list.html | 20 | ||||
-rw-r--r-- | wqflask/wqflask/templates/corr_scatterplot.html | 5 | ||||
-rw-r--r-- | wqflask/wqflask/templates/credits.html | 7 | ||||
-rw-r--r-- | wqflask/wqflask/templates/show_trait.html | 9 | ||||
-rw-r--r-- | wqflask/wqflask/templates/show_trait_calculate_correlations.html | 73 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/show_trait_mapping_tools.html | 6 |
12 files changed, 99 insertions, 92 deletions
diff --git a/.guix/modules/genenetwork2.scm b/.guix/modules/genenetwork2.scm index 46814c37..220ebd38 100644 --- a/.guix/modules/genenetwork2.scm +++ b/.guix/modules/genenetwork2.scm @@ -10,36 +10,24 @@ ;; ;; guix shell -C -Df guix.scm -(define-module (genenetwork2)) -(use-modules (gn packages genenetwork) - (guix gexp) - (guix utils) - (guix git-download) - (guix packages) - (ice-9 popen) - (ice-9 rdelim)) +(define-module (genenetwork2) + #:use-module ((gn packages genenetwork) + #:select (genenetwork2) #:prefix gn:) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (guix git-download) + #:use-module (guix packages)) (define %source-dir (string-append (current-source-directory) "/../..")) -;; This isn't kept up-to-date. -(define %version - (call-with-input-file (string-append %source-dir "/VERSION") - (lambda (port) - (read-line port)))) - -(define (%version package) - (or (version-major+minor+point (package-version package)) - (version-major+minor (package-version package)))) - -(define-public genenetwork2-head +(define-public genenetwork2 (package - (inherit genenetwork2) - (version (string-append (%version genenetwork2) "-HEAD")) + (inherit gn:genenetwork2) (source (local-file %source-dir "genenetwork2-checkout" #:recursive? #t #:select? (or (git-predicate %source-dir) (const #t)))))) -genenetwork2-head +genenetwork2 diff --git a/wqflask/wqflask/oauth2/collections.py b/wqflask/wqflask/oauth2/collections.py index d4bfe7f0..63bf206e 100644 --- a/wqflask/wqflask/oauth2/collections.py +++ b/wqflask/wqflask/oauth2/collections.py @@ -4,7 +4,7 @@ from .checks import user_logged_in from .client import oauth2_get, no_token_get def num_collections() -> int: - """Compute the number of collections available for tte current sussion.""" + """Compute the number of collections available for the current session.""" anon_id = session_info()["anon_id"] all_collections = no_token_get( f"auth/user/collections/{anon_id}/list").either( diff --git a/wqflask/wqflask/static/new/css/show_trait.css b/wqflask/wqflask/static/new/css/show_trait.css index c4b8f178..577bb5dd 100644 --- a/wqflask/wqflask/static/new/css/show_trait.css +++ b/wqflask/wqflask/static/new/css/show_trait.css @@ -122,14 +122,6 @@ div.scatterplot-btn-div { margin-bottom:40px; } -div.correlation-main { - min-width: 1200px; -} - -div.correlation-options { - min-width: 700px; -} - .min-expr-field { width: 70px; } @@ -171,17 +163,17 @@ div.normalize-div { margin-top:10px; } -div.mapping-main { +div.main { display: block; } -div.mapping-options { +div.options { float: left; width: 600px; padding-top: 0px; } -div.mapping-descriptions { +div.descriptions { float: left; width: 500px; min-width: 20%; @@ -313,3 +305,7 @@ div#cboxContent { margin-right: 5px; margin-bottom: 2px; } + +div.container { + min-width:750px; +} diff --git a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js index 4a8b724d..f883c0d9 100644 --- a/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js +++ b/wqflask/wqflask/static/new/javascript/draw_corr_scatterplot.js @@ -904,4 +904,10 @@ $(document).ready(function(){ remove_cofactors(); }); + $('#invert_axes').click(function () { + var [dataset_1, trait_1] = js_data.trait_2.split(": ") + var [dataset_2, trait_2] = js_data.trait_1.split(": ") + window.location.replace("/corr_scatter_plot?method=pearson&dataset_1=" + dataset_1 + "&dataset_2=" + dataset_2 + "&trait_1=" + trait_1 + "&trait_2=" + trait_2) + }); + }); diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index d09fbee9..c5214947 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -83,7 +83,16 @@ statTableRows.push( } ); -var add, blockByAttributeValue, blockByIndex, blockOutliers, changeStatsValue, createValueDropdown, editDataChange, exportSampleTableData, getSampleTableData, hideNoValue, hideTabs, makeTable, onCorrMethodChange, openTraitSelection, populateSampleAttributesValuesDropdown, processId, updateBarChart, updateHistogram, updateProbPlot, resetSamplesTable, sampleGroupTypes, sampleLists, showHideOutliers, statsMdpChange, updateStatValues; +toggleDescription = function() { + if ($('.truncDesc').is(':visible')) { + $('.truncDesc').hide(); + $('.fullDesc').show(); + } else { + $('.truncDesc').show(); + $('.fullDesc').hide(); + } +} + add = function() { var trait; trait = $("input[name=trait_hmac]").val(); diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 1ed47db8..e0fc9e63 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -227,7 +227,7 @@ required placeholder="Ask More Questions or Topics (E.g Genes) " value='' name=" </span> <span style="padding: 5px;margin-left: 65px;" > - <a style="text-decoration: none" target="_blank" href="https://issues.genenetwork.org/topics/xapian/xapian-search"> + <a style="text-decoration: none" target="_blank" href="https://issues.genenetwork.org/topics/xapian/xapian-search-queries"> <i style="text-align: center;color:#336699;;" class="fa fa-question-circle fa-2x" title="see more search hints" aria-hidden="true"></i> </a> diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html index 3719bee5..c553717f 100644 --- a/wqflask/wqflask/templates/collections/list.html +++ b/wqflask/wqflask/templates/collections/list.html @@ -52,7 +52,6 @@ <tbody> {% for uc in anon_collections %} - {% if uc.num_members > 0 %} <tr class="collection_line"> <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td> <td align="right">{{ loop.index }} @@ -61,7 +60,6 @@ <td>{{ uc.changed_timestamp }}</td> <td align="right">{{ uc.num_members }}</td> </tr> - {% endif %} {% endfor %} </tbody> </table> @@ -85,16 +83,14 @@ <tbody> {% for uc in collections %} - {% if uc.num_members > 0 %} - <tr class="collection_line"> - <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td> - <td align="right">{{ loop.index }} - <td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td> - <td>{{ uc.created_timestamp }}</td> - <td>{{ uc.changed_timestamp }}</td> - <td align="right">{{ uc.num_members }}</td> - </tr> - {% endif %} + <tr class="collection_line"> + <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td> + <td align="right">{{ loop.index }} + <td><a class="collection_name" href="{{ url_for('view_collection', uc_id=uc.id) }}">{{ uc.name }}</a></td> + <td>{{ uc.created_timestamp }}</td> + <td>{{ uc.changed_timestamp }}</td> + <td align="right">{{ uc.num_members }}</td> + </tr> {% endfor %} </tbody> </table> diff --git a/wqflask/wqflask/templates/corr_scatterplot.html b/wqflask/wqflask/templates/corr_scatterplot.html index f6a0ff1f..554471be 100644 --- a/wqflask/wqflask/templates/corr_scatterplot.html +++ b/wqflask/wqflask/templates/corr_scatterplot.html @@ -28,7 +28,10 @@ <table> <tr> <td style="vertical-align: middle;">Width <input class="chartupdatewh" id="width" type="text" value="800" style="width: 44px; height: 22px;"> px </td> - <td style="vertical-align: middle;">Height <input class="chartupdatewh" id="height" type="text" value="700" style="width: 44px; height: 22px;"> px</td> + <td style="vertical-align: middle; padding-left: 5px;">Height <input class="chartupdatewh" id="height" type="text" value="700" style="width: 44px; height: 22px;"> px</td> + <td style="vertical-align: middle; padding-left: 5px;"><button type="button" class="btn btn-default" id="invert_axes"> + Invert Axes + </button></td> </tr> </table> <hr style="height: 1px; background-color: #A9A9A9;"> diff --git a/wqflask/wqflask/templates/credits.html b/wqflask/wqflask/templates/credits.html index bcb37c48..aab1dfb1 100644 --- a/wqflask/wqflask/templates/credits.html +++ b/wqflask/wqflask/templates/credits.html @@ -1,8 +1,7 @@ {% extends "base.html" %} {% block title %}Credit{% endblock %} {% block content %} - -<Table width= "100%" cellSpacing=0 cellPadding=5><TR> +<Table width= "100%" cellSpacing=0 cellPadding=5 style="margin: 10px;"><TR> <!-- Body Start from Here --> <TD valign="top" height="200" width="100%"> <P class="title"><H2>Web site design and coding</H2></P> @@ -12,6 +11,10 @@ <LI>Jintao Wang (lead programmer, 2001–2006) <LI><a href="http://www.nervenet.org/main/people.html">Arthur G. Centeno (IT Analyst III, 2001–present)</a> <LI><a href="http://www.nervenet.org/main/people.html">Zachary Sloan (IT Analyst III, 2009–present)</a> +<LI>Frederick Muriithi (programmer, 2017-present)</LI> +<LI>Bonface Munyoki (programmer, 2020-present)</LI> +<LI>Alexander Kabua (programmer, 2020-present)</LI> +<LI>Arun Isaac (programmer, 2021-present)</LI> <LI><a href="http://www.nervenet.org/main/people.html">Lei Yan (systems and web services interface 2008-2018)</a> <LI><a href="http://www.nervenet.org/main/people.html">Xusheng Wang (data analysis, 2008-2012)</a> <LI><a href="http://www.nervenet.org/main/people.html">Xiaodong Zhou (lead programmer 2009–2011)</a> diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html index aff12571..dd054ffc 100644 --- a/wqflask/wqflask/templates/show_trait.html +++ b/wqflask/wqflask/templates/show_trait.html @@ -24,7 +24,14 @@ <div class="container"> <h2>Trait Data and Analysis for <b>{{ this_trait.display_name }}</b></h2> {% if this_trait.dataset.type != 'Publish' %} - <h3>{{ this_trait.description_fmt[0]|upper }}{{ this_trait.description_fmt[1:]|safe }}</h3> + <h3> + {% set trait_description = this_trait.description_fmt[0]|upper + this_trait.description_fmt[1:]|safe %} + {% if trait_description|length < 100 %} + {{ trait_description }} + {% else %} + <span class="truncDesc" style="display: block;">{{ trait_description[:99] }}... (<a onclick="toggleDescription()" href="#">Show More</a>)</span><span class="fullDesc" style="display: none;">{{ trait_description }} (<a onclick="toggleDescription()" href="#">Show Less</a>)</span> + {% endif %} + </h3> {% endif %} <form method="post" action="" target="_blank" name="trait_page" id="trait_data_form" class="form-horizontal"> diff --git a/wqflask/wqflask/templates/show_trait_calculate_correlations.html b/wqflask/wqflask/templates/show_trait_calculate_correlations.html index 33100484..22fe6142 100644 --- a/wqflask/wqflask/templates/show_trait_calculate_correlations.html +++ b/wqflask/wqflask/templates/show_trait_calculate_correlations.html @@ -1,5 +1,5 @@ -<div class="row correlation-main"> - <div class="col-xs-3 correlation-options"> +<div class="main"> + <div class="col-xs-3 options"> <div class="form-horizontal section-form-div"> <div class="form-group"> @@ -92,7 +92,7 @@ </div> <div id="location_filter" class="form-group"> <label class="col-xs-2 control-label">Location</label> - <div class="col-xs-6 controls"> + <div class="col-xs-10 controls"> <span> Chr: <input name="loc_chr" value="" type="text" class="form-control corr-location"> Mb: <input name="min_loc_mb" value="" type="text" class="form-control corr-location"> to <input name="max_loc_mb" value="" type="text" class="form-control corr-location"> @@ -115,7 +115,7 @@ <div class="form-group"> - <label class="col-xs-2 control-label" >use cache</label> + <label class="col-xs-2 control-label" >Use Cache</label> <div class="col-xs-5 controls"> <input id="use_cache" name="use_cache" type="checkbox" checked> </div> @@ -129,38 +129,37 @@ </div> </div> </div> - <div class="col-xs-4"> - <div class="section-form-div"> - <span id="sample_r_desc" class="correlation_desc"> - The <a href="http://genenetwork.org/correlationAnnotation.html#genetic_r">Sample Correlation</a> - is computed - between trait data and any - other traits in the sample database selected above. Use - <a href="{{ url_for('glossary_blueprint.glossary') }}#Correlations">Spearman - Rank</a> - when the sample size is small (<20) or when there are influential outliers. - </span> - <span id="lit_r_desc" style="display: none;" class="correlation_desc"> - The <a href="http://genenetwork.org/correlationAnnotation.html#literatureCorr">Literature Correlation</a> - (Lit r) between - this gene and all other genes is computed<br> - using the <span class="broken_link" href="https://grits.eecs.utk.edu/sgo/sgo.html"> - Semantic Gene Organizer</span> - and human, rat, and mouse data from PubMed. - Values are ranked by Lit r, but Sample r and Tissue r are also displayed.<br> - <a href="http://genenetwork.org/glossary.html#Literature">More on using Lit r</a> - </span> - <span id="tissue_r_desc" style="display: none;" class="correlation_desc"> - The <a href="http://genenetwork.org/webqtl/main.py?FormID=tissueCorrelation">Tissue Correlation</a> - (Tissue r) - estimates the similarity of expression of two genes - or transcripts across different cells, tissues, or organs - (<a href="http://genenetwork.org/correlationAnnotation.html#tissueCorr">glossary</a>). - Tissue correlations - are generated by analyzing expression in multiple samples usually taken from single cases.<br> - <strong>Pearson</strong> and <strong>Spearman Rank</strong> correlations have been - computed for all pairs of genes using data from mouse samples.<br> - </span> - </div> + <div class="descriptions"> + <div class="section-form-div"> + <dl> + <dt class="map-method-text">Sample Correlation</dt> + <dd>The <a href="http://genenetwork.org/correlationAnnotation.html#genetic_r">Sample Correlation</a> + is computed + between trait data and any + other traits in the sample database selected above. Use + <a href="{{ url_for('glossary_blueprint.glossary') }}#Correlations">Spearman + Rank</a> + when the sample size is small (<20) or when there are influential outliers.</dd> + <dt class="map-method-text">Literature Correlation</dt> + <dd>The <a href="http://genenetwork.org/correlationAnnotation.html#literatureCorr">Literature Correlation</a> + (Lit r) between + this gene and all other genes is computed<br> + using the <span class="broken_link" href="https://grits.eecs.utk.edu/sgo/sgo.html"> + Semantic Gene Organizer</span> + and human, rat, and mouse data from PubMed. + Values are ranked by Lit r, but Sample r and Tissue r are also displayed.<br> + <a href="http://genenetwork.org/glossary.html#Literature">More on using Lit r</a></dd> + <dt class="map-method-text">Tissue Correlation</dt> + <dd>The <a href="http://genenetwork.org/webqtl/main.py?FormID=tissueCorrelation">Tissue Correlation</a> + (Tissue r) + estimates the similarity of expression of two genes + or transcripts across different cells, tissues, or organs + (<a href="http://genenetwork.org/correlationAnnotation.html#tissueCorr">glossary</a>). + Tissue correlations + are generated by analyzing expression in multiple samples usually taken from single cases.<br> + <strong>Pearson</strong> and <strong>Spearman Rank</strong> correlations have been + computed for all pairs of genes using data from mouse samples.<br></dd> + </dl> + </div> </div> </div> diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index b8220297..f1ed8922 100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -1,6 +1,6 @@ -<div class="mapping-main"> +<div class="main"> {% if dataset.group.mapping_names|length > 0 %} - <div class="mapping-options"> + <div class="options"> <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-pills"> @@ -404,7 +404,7 @@ </div> </div> </div> - <div class="mapping-descriptions"> + <div class="descriptions"> <div class="section-form-div"> <dl> {% for mapping_method in dataset.group.mapping_names %} |