diff options
author | zsloan | 2018-03-15 17:59:35 +0000 |
---|---|---|
committer | zsloan | 2018-04-04 17:07:25 +0000 |
commit | e5992ce3e047fcfe79d66ed42c00c1af63438482 (patch) | |
tree | 230c71c7ceb87bb023ff3cefb6fa15c5e3816145 /wqflask | |
parent | 67004cd8990ae97c0da234399721b5eb11b1675f (diff) | |
download | genenetwork2-e5992ce3e047fcfe79d66ed42c00c1af63438482.tar.gz |
Resolved conflicts
Diffstat (limited to 'wqflask')
8 files changed, 250 insertions, 75 deletions
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index b34beb7b..077386a3 100644 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -173,9 +173,12 @@ class CorrelationMatrix(object): for sample in self.all_sample_list: groups.append(1) - pca = self.calculate_pca(range(len(self.traits)), corr_eigen_value, corr_eigen_vectors) - - self.loadings_array = self.process_loadings() + try: + self.pca_works = "True" + pca = self.calculate_pca(range(len(self.traits)), corr_eigen_value, corr_eigen_vectors) + self.loadings_array = self.process_loadings() + except: + self.pca_works = "False" self.js_data = dict(traits = [trait.name for trait in self.traits], groups = groups, diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py index 087b95b4..db4f8f46 100644 --- a/wqflask/wqflask/marker_regression/marker_regression.py +++ b/wqflask/wqflask/marker_regression/marker_regression.py @@ -228,6 +228,7 @@ class MarkerRegression(object): results, self.json_data, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = qtlreaper_mapping.gen_reaper_results(self.this_trait, self.dataset, self.samples, + self.vals, self.json_data, self.num_perm, self.bootCheck, diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py index 211cf187..66884b0c 100644 --- a/wqflask/wqflask/marker_regression/marker_regression_gn1.py +++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py @@ -1204,6 +1204,8 @@ class MarkerRegression(object): else: if self.mapping_method == "gemma" or self.mapping_method == "gemma_bimbam": string2 = 'Using GEMMA mapping method with no control for other QTLs.' + if self.covariates != "": + string3 = 'Using following traits as covariates: ' + self.covariates elif self.mapping_method == "rqtl_plink" or self.mapping_method == "rqtl_geno": string2 = 'Using R/qtl mapping method with no control for other QTLs.' elif self.mapping_method == "plink": diff --git a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py index 50228b5e..6b58190f 100644 --- a/wqflask/wqflask/marker_regression/qtlreaper_mapping.py +++ b/wqflask/wqflask/marker_regression/qtlreaper_mapping.py @@ -1,17 +1,20 @@ -def gen_reaper_results(this_trait, dataset, samples_before, json_data, num_perm, bootCheck, num_bootstrap, do_control, control_marker, manhattan_plot): +import utility.logger +logger = utility.logger.getLogger(__name__ ) + +def gen_reaper_results(this_trait, dataset, samples_before, trait_vals, json_data, num_perm, bootCheck, num_bootstrap, do_control, control_marker, manhattan_plot): genotype = dataset.group.read_genotype_file() if manhattan_plot != True: genotype = genotype.addinterval() - samples, values, variances, sample_aliases = this_trait.export_informative() - trimmed_samples = [] trimmed_values = [] - for i in range(0, len(samples)): - if this_trait.data[samples[i]].name in samples_before: - trimmed_samples.append(samples[i]) - trimmed_values.append(values[i]) + for i in range(0, len(samples_before)): + try: + trimmed_values.append(float(trait_vals[i])) + trimmed_samples.append(samples_before[i]) + except: + pass perm_output = [] bootstrap_results = [] diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html index ab793d58..d27788a8 100644 --- a/wqflask/wqflask/templates/correlation_matrix.html +++ b/wqflask/wqflask/templates/correlation_matrix.html @@ -61,6 +61,7 @@ <br> <button class="btn btn-default" id="short_labels">Short Labels</button> <button class="btn btn-default" id="long_labels">Long Labels</button> +{% if pca_works == "True" %} <br> <br> <h2>Factor Loadings Plot</h2> @@ -93,7 +94,7 @@ </tbody> </table> </div> - +{% endif %} {% endblock %} {% block js %} diff --git a/wqflask/wqflask/templates/show_trait_calculate_correlations.html b/wqflask/wqflask/templates/show_trait_calculate_correlations.html index c5f815ce..ef233333 100644 --- a/wqflask/wqflask/templates/show_trait_calculate_correlations.html +++ b/wqflask/wqflask/templates/show_trait_calculate_correlations.html @@ -1,9 +1,10 @@ <div> + <div class="col-xs-7"> <div style="padding: 20px" class="form-horizontal"> <div class="form-group"> - <label for="corr_type" class="col-xs-1 control-label">Method</label> - <div class="col-xs-2 controls"> + <label for="corr_type" class="col-xs-2 control-label">Method</label> + <div class="col-xs-3 controls"> <select name="corr_type" class="form-control"> <option value="sample">Sample r</option> <option value="lit">Literature r</option> @@ -13,8 +14,8 @@ </div> <div class="form-group"> - <label for="corr_dataset" class="col-xs-1 control-label">Database</label> - <div class="col-xs-6 controls"> + <label for="corr_dataset" class="col-xs-2 control-label">Database</label> + <div class="col-xs-10 controls"> <select name="corr_dataset" class="form-control"> {% for tissue in corr_tools.dataset_menu %} {% if tissue.tissue %} @@ -37,8 +38,8 @@ </div> <div class="form-group"> - <label for="corr_return_results" class="col-xs-1 control-label">Return</label> - <div class="col-xs-2 controls"> + <label for="corr_return_results" class="col-xs-2 control-label">Return</label> + <div class="col-xs-3 controls"> <select name="corr_return_results" class="form-control"> {% for return_result in corr_tools.return_results_menu %} <option value="{{ return_result }}" @@ -53,8 +54,8 @@ </div> <div class="form-group"> - <label for="corr_samples_group" class="col-xs-1 control-label">Samples</label> - <div class="col-xs-2 controls"> + <label for="corr_samples_group" class="col-xs-2 control-label">Samples</label> + <div class="col-xs-3 controls"> <select name="corr_samples_group" class="form-control"> {% for group, pretty_group in sample_group_types.items() %} <option value="{{ group }}">{{ pretty_group }}</option> @@ -64,8 +65,8 @@ </div> <div id="corr_sample_method" class="form-group"> - <label for="corr_sample_method" class="col-xs-1 control-label">Type</label> - <div class="col-xs-2 controls"> + <label for="corr_sample_method" class="col-xs-2 control-label">Type</label> + <div class="col-xs-3 controls"> <select name="corr_sample_method" class="form-control"> <option value="pearson">Pearson</option> <option value="spearman">Spearman Rank</option> @@ -73,14 +74,14 @@ </div> </div> <div class="form-group"> - <label class="col-xs-1 control-label">Min Expr</label> - <div class="col-xs-2 controls"> + <label class="col-xs-2 control-label">Min Expr</label> + <div class="col-xs-3 controls"> <input name="min_expr" value="" type="text" class="form-control" style="width: 50px;"> </div> </div> <div class="form-group"> - <label class="col-xs-1 control-label">Location</label> - <div class="col-xs-4 controls"> + <label class="col-xs-2 control-label">Location</label> + <div class="col-xs-5 controls"> <span> Chr: <input name="loc_chr" value="" type="text" class="form-control" style="width: 50px; display: inline;"> Mb: <input name="min_loc_mb" value="" type="text" class="form-control" style="width: 50px; display: inline;"> to <input name="max_loc_mb" value="" type="text" class="form-control" style="width: 50px; display: inline;"> @@ -89,8 +90,8 @@ </div> </div> <div class="form-group"> - <label class="col-xs-1 control-label">Range</label> - <div class="col-xs-4 controls"> + <label class="col-xs-2 control-label">Range</label> + <div class="col-xs-5 controls"> <input name="p_range_lower" value="" type="hidden"> <input name="p_range_upper" value="" type="hidden"> <span style="display: inline;"> @@ -103,48 +104,45 @@ </div> <div class="form-group"> - <label for="corr_sample_method" class="col-xs-1 control-label"></label> - <div class="col-xs-4 controls"> + <label for="corr_sample_method" class="col-xs-2 control-label"></label> + <div class="col-xs-3 controls"> <button class="btn corr_compute submit_special btn-success" data-url="/corr_compute" title="Compute Correlation"> <i class="icon-ok-circle icon-white"></i> Compute </button> </div> </div> - - <div class="form-group"> - <label for="descriptions" class="col-xs-1 control-label"></label> - <div class="col-xs-6 controls"> - <span id="sample_r_desc" class="correlation_desc fs12"> - 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="http://www.genenetwork.org/glossary.html#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 fs12"> - 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 <a href="https://grits.eecs.utk.edu/sgo/sgo.html"> - Semantic Gene Organizer</a> - 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 fs12"> - 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> </div> + </div> + <div class="col-xs-5"> + <span id="sample_r_desc" class="correlation_desc fs12"> + 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="http://www.genenetwork.org/glossary.html#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 fs12"> + 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 <a href="https://grits.eecs.utk.edu/sgo/sgo.html"> + Semantic Gene Organizer</a> + 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 fs12"> + 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>
\ No newline at end of file diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index dcec2b9e..60219cf5 100644 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html @@ -1,6 +1,11 @@ <div> +<<<<<<< HEAD {% if (use_pylmm_rqtl and dataset.group.species != "human") or use_plink_gemma %} <div class="col-xs-4"> +======= + {% if dataset.group.mapping_names|length > 0 %} + <div class="col-xs-5"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <div class="tabbable"> <!-- Only required for left/right tabs --> <ul class="nav nav-pills"> @@ -41,8 +46,13 @@ <div style="padding-top: 10px;" class="form-horizontal"> {% if genofiles and genofiles|length>0 %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="genofiles" class="col-xs-3 control-label">Genotypes</label> <div style="margin-left: 20px;" class="col-xs-8 controls"> +======= + <label for="genofiles" style="text-align: right;" class="col-xs-3 control-label">Genotypes</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select id="genofile_gemma" class="form-control"> {% for item in genofiles %} <option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option> @@ -52,32 +62,67 @@ </div> {% endif %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="maf_gemma" class="col-xs-5 control-label">Minor allele threshold</label> <div style="margin-left: 20px;" class="col-xs-3 controls"> +======= + <label for="maf_gemma" style="text-align: right;" class="col-xs-3 control-label">MAF</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <input name="maf_gemma" value="0.01" type="text" class="form-control"> </div> </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label class="col-xs-4 control-label">Use LOCO</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align: right;" class="col-xs-3 control-label">Use LOCO</label> + <div style="margin-left:20px;" class="col-xs-6 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <label class="radio-inline"> - <input type="radio" name="use_loco" value="True"> + <input type="radio" name="use_loco" value="True" checked=""> Yes </label> <label class="radio-inline"> - <input type="radio" name="use_loco" value="False" checked=""> + <input type="radio" name="use_loco" value="False"> No </label> </div> </div> </div> <div style="padding-top: 5px; padding-bottom: 5px; padding-left: 20px;" class="form-horizontal"> +<<<<<<< HEAD <div class="mapping_method_fields form-group"> <button type="button" id="select_covariates" class="btn btn-default"> Select Covariates </button> <button type="button" id="remove_covariates" class="btn btn-default"> Remove Covariates +======= + --> + <div class="mapping_method_fields form-group"> + <label style="text-align: right;" class="col-xs-3 control-label">Covariates</label> + <div style="margin-left:20px;" class="col-xs-7"> + {% if g.user_session.user_ob and (g.user_session.user_ob.display_num_collections() == "") %} + No collections available. Please add traits to a collection to use them as covariates. + {% elif g.cookie_session.display_num_collections() == "" %} + No collections available. Please add traits to a collection to use them as covariates. + {% else %} + <div style="margin-bottom: 10px;" class="btn-group" role="group"> + <button type="button" id="select_covariates" class="btn btn-default">Select</button> + <button type="button" id="remove_covariates" class="btn btn-default">Remove</button> + </div> + <textarea rows="3" cols="20" readonly placeholder="No covariates selected" style="overflow-y: scroll; resize: none;" class="selected_covariates"></textarea> + {% endif %} + </div> + </div> + <div class="mapping_method_fields form-group"> + <label class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6"> + <button id="gemma_bimbam_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression"> + Compute +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page </button> </div> </div> @@ -94,8 +139,13 @@ <div style="margin-top: 20px" class="form-horizontal"> {% if genofiles and genofiles|length>0 %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="genofiles" class="col-xs-3 control-label">Genotypes</label> <div style="margin-left: 20px;" class="col-xs-8 controls"> +======= + <label style="text-align: right;" for="genofiles" class="col-xs-3 control-label">Genotypes</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select id="genofile_reaper" class="form-control"> {% for item in genofiles %} <option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option> @@ -105,20 +155,35 @@ </div> {% endif %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="mapping_permutations" class="col-xs-3 control-label">Permutations</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align: right;" for="mapping_permutations" class="col-xs-3 control-label">Permutations</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <input name="num_perm_reaper" value="2000" type="text" class="form-control"> </div> </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="mapping_bootstraps" class="col-xs-3 control-label">Bootstraps</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align: right;" for="mapping_bootstraps" class="col-xs-3 control-label">Bootstraps</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <input name="num_bootstrap" value="2000" type="text" class="form-control"> </div> </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="control_for" class="col-xs-3 control-label">Control for</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align: right;" for="control_for" class="col-xs-3 control-label">Control for</label> + <div style="margin-left:20px;" class="col-xs-6 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page {% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %} <input name="control_reaper" value="{{ nearest_marker }}" type="text" style="width: 160px;" class="form-control" /> {% else %} @@ -162,8 +227,13 @@ <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label style="text-align:left;" class="col-xs-3 control-label">Marker<br>Regression</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align: right;" class="col-xs-3 control-label">Marker<br>Regression</label> + <div style="margin-left:20px;" class="col-xs-6 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <label class="radio-inline"> <input type="radio" name="manhattan_plot_reaper" value="True"> Yes @@ -174,11 +244,20 @@ </label> </div> </div> +<<<<<<< HEAD <div class="form-group"> <div style="padding-left:15px;" class="controls"> <button id="interval_mapping_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping"> <i class="icon-ok-circle icon-white"></i> Compute </button> +======= + <div class="mapping_method_fields form-group"> + <label class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6"> + <button id="interval_mapping_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping"> + Compute + </button> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page </div> </div> <!--<div id="alert_placeholder"></div>--> @@ -189,8 +268,13 @@ <div style="margin-top: 20px" class="form-horizontal"> {% if genofiles and genofiles|length>0 %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="genofiles" class="col-xs-3 control-label">Genotypes</label> <div style="margin-left: 20px;" class="col-xs-8 controls"> +======= + <label style="text-align:right;" for="genofiles" class="col-xs-3 control-label">Genotypes</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select id="genofile_rqtl_geno" class="form-control"> {% for item in genofiles %} <option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option> @@ -200,17 +284,28 @@ </div> {% endif %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="mapping_permutations" class="col-xs-3 control-label">Permutations</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> <input name="num_perm_rqtl_geno" value="" type="text" class="form-control"> +======= + <label style="text-align:right;" for="mapping_permutations" class="col-xs-3 control-label">Permutations</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> + <input name="num_perm_rqtl_geno" value="2000" type="text" class="form-control"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page </div> </div> <div id="permutations_alert" class="alert alert-error alert-warning" style="display:none;"> Please be aware that permutations can take a very long time (~20 minutes for 500 permutations) </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="control_for" class="col-xs-3 control-label">Control for</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> +======= + <label style="text-align:right;" for="control_for" class="col-xs-3 control-label">Control for</label> + <div style="margin-left:20px;" class="col-xs-6 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page {% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %} <input name="control_rqtl_geno" value="{{ nearest_marker }}" type="text" style="width: 160px;" class="form-control" /> {% else %} @@ -228,8 +323,13 @@ </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="mapmethod_rqtl_geno" style="text-align:left;" class="col-xs-3 control-label">Method</label> <div class="col-xs-4 controls"> +======= + <label style="text-align:right;" for="mapmethod_rqtl_geno" class="col-xs-3 control-label">Method</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select name="mapmethod_rqtl_geno" class="form-control"> <option value="em">em</option> <option value="imp">imp</option> @@ -243,8 +343,13 @@ </div> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="mapmodel_rqtl_geno" style="text-align:left;" class="col-xs-3 control-label">Model</label> <div class="col-xs-4 controls"> +======= + <label style="text-align:right;" for="mapmodel_rqtl_geno" class="col-xs-3 control-label">Model</label> + <div style="margin-left:20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select name="mapmodel_rqtl_geno" class="form-control"> <option value="normal">normal</option> <!--<option value="binary">binary</option> @@ -269,8 +374,13 @@ </div> --> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label style="text-align:left;" class="col-xs-12 control-label">Manhattan Plot</label> <div class="col-xs-12 controls"> +======= + <label style="text-align:right;" class="col-xs-3 control-label">Marker<br>Regression</label> + <div style="margin-left:20px;" class="col-xs-6 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <label class="radio-inline"> <input type="radio" name="manhattan_plot_rqtl" value="True"> Yes @@ -282,11 +392,20 @@ </div> </div> +<<<<<<< HEAD <div class="form-group"> <div style="padding-left:15px;" class="controls"> <button id="rqtl_geno_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression"> <i class="icon-ok-circle icon-white"></i> Compute </button> +======= + <div class="mapping_method_fields form-group"> + <label class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6"> + <button id="rqtl_geno_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping"> + Compute + </button> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page </div> </div> </div> @@ -295,8 +414,13 @@ <div style="margin-top: 20px" class="form-horizontal"> {% if genofiles and genofiles|length>0 %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="genofiles" class="col-xs-3 control-label">Genotypes</label> <div style="margin-left: 20px;" class="col-xs-8 controls"> +======= + <label style="text-align:right;" class="col-xs-3 control-label">Genotypes</label> + <div style="margin-left: 20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select id="genofile_pylmm" class="form-control"> {% for item in genofiles %} <option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option> @@ -307,6 +431,7 @@ {% endif %} <!-- <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="control_for" class="col-xs-3 control-label">Control for</label> <div style="margin-left: 20px;" class="col-xs-4 controls"> {% if dataset.type == 'ProbeSet' and this_trait.locus_chr != "" %} @@ -343,6 +468,13 @@ <button id="pylmm_compute" class="btn submit_special btn-success" title="Compute Marker Regression"> <i class="icon-ok-circle icon-white"></i> Compute </button> +======= + <label class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6"> + <button id="pylmm_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Interval Mapping"> + Compute + </button> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page </div> </div> </div> @@ -354,8 +486,13 @@ <div style="padding-top: 10px;" class="form-horizontal"> {% if genofiles and genofiles|length>0 %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="genofiles" class="col-xs-3 control-label">Genotypes</label> <div style="margin-left: 20px;" class="col-xs-8 controls"> +======= + <label style="text-align:right;" class="col-xs-3 control-label">Genotypes</label> + <div style="margin-left: 20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <select id="genofile_gemma" class="form-control"> {% for item in genofiles %} <option value="{{item['location']}}:{{item['title']}}">{{item['title']}}</option> @@ -365,8 +502,13 @@ </div> {% endif %} <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <label for="maf_gemma" class="col-xs-5 control-label">Minor allele threshold</label> <div style="margin-left: 20px;" class="col-xs-3 controls"> +======= + <label style="text-align:right;" class="col-xs-3 control-label">MAF</label> + <div style="margin-left: 20px;" class="col-xs-4 controls"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <input name="maf_gemma" value="0.01" type="text" class="form-control"> </div> </div> @@ -374,6 +516,7 @@ <div style="padding-top: 5px; padding-bottom: 5px; padding-left: 20px;" class="form-horizontal"> <div class="mapping_method_fields form-group"> +<<<<<<< HEAD <button type="button" id="select_covariates" class="btn btn-default"> Select Covariates </button> @@ -385,6 +528,26 @@ <div class="form-group"> <div class="col-xs-4 controls"> +======= + <label style="text-align: right;" class="col-xs-3 control-label">Covariates</label> + <div style="margin-left:20px;" class="col-xs-7"> + {% if g.user_session.user_ob and (g.user_session.user_ob.display_num_collections() == "") %} + No collections available. Please add traits to a collection to use them as covariates. + {% elif g.cookie_session.display_num_collections() == "" %} + No collections available. Please add traits to a collection to use them as covariates. + {% else %} + <div style="margin-bottom: 10px;" class="btn-group" role="group"> + <button type="button" id="select_covariates" class="btn btn-default">Select</button> + <button type="button" id="remove_covariates" class="btn btn-default">Remove</button> + </div> + <textarea rows="3" cols="20" readonly placeholder="No covariates selected" style="overflow-y: scroll; resize: none;" class="selected_covariates"></textarea> + {% endif %} + </div> + </div> + <div class="mapping_method_fields form-group"> + <label class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6"> +>>>>>>> cbc4e86... Changed appearance of mapping and correlation options on trait page <button id="gemma_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression"> Compute </button> @@ -395,16 +558,16 @@ <div class="tab-pane" id="plink"> <div style="padding: 20px" class="form-horizontal"> <div class="mapping_method_fields form-group"> - <label for="maf_plink" class="col-xs-3 control-label">Minor allele threshold</label> - <div style="margin-left: 20px;" class="col-xs-3 controls"> + <label style="text-align: right;" class="col-xs-3 control-label">MAF</label> + <div style="margin-left: 20px;" class="col-xs-4 controls"> <input name="maf_plink" value="0.01" type="text" class="form-control"> </div> </div> </div> <div class="form-group"> - <label for="plink_compute" class="col-xs-1 control-label"></label> - <div style="margin-left:20px;" class="col-xs-4 controls"> + <label style="text-align: right;" class="col-xs-3 control-label"></label> + <div style="margin-left:20px;" class="col-xs-6 controls"> <button id="plink_compute" class="btn submit_special btn-success" data-url="/marker_regression" title="Compute Marker Regression"> Compute </button> @@ -419,22 +582,26 @@ <div class="col-xs-6"> {% if dataset.group.mapping_id == "1" %} <dl> + <dt>GEMMA</dt> + <dd>GEMMA is software implementing the Genome-wide Efficient Mixed Model Association algorithm for a standard linear mixed model for genome-wide association studies (GWAS).</dd> <dt>Interval Mapping</dt> <dd>Interval mapping is a process in which the statistical significance of a hypothetical QTL is evaluated at regular points across a chromosome, even in the absence of explicit genotype data at those points.</dd> - <dt>pyLMM</dt> - <dd>pyLMM is a fast and lightweight linear mixed-model (LMM) solver for use in genome-wide association studies (GWAS).</dd> <dt>R/qtl</dt> <dd>R/qtl is an extensible, interactive environment for mapping quantitative trait loci (QTL) in experimental crosses.</dd> + <dt>pyLMM</dt> + <dd>pyLMM is a fast and lightweight linear mixed-model (LMM) solver for use in genome-wide association studies (GWAS).</dd> </dl> {% else %} <dl> + {% if mapping_method == "GEMMA" %} <dt>GEMMA</dt> <dd> GEMMA is software implementing the Genome-wide Efficient Mixed Model Association algorithm for a standard linear mixed model for genome-wide association studies (GWAS).<br> - Note: There currently exists an issue where GEMMA can't be run on traits from the same group simultaneously. If you receive an error, please wait a few minutes and try again. </dd> + {% elif mapping_method == "PLINK" %} <dt>PLINK</dt> <dd>PLINK is a free, open-source whole genome association analysis toolset.</dd> + {% endif %} </dl> {% endif %} </div> diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 4e81c29c..1c17840c 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -582,7 +582,7 @@ def marker_regression_page(): 'control_marker', 'control_marker_db', 'do_control', - 'genofile', + 'genofile_string', 'pair_scan', 'startMb', 'endMb', |