6 <& /util/import_javascript.mas, classes => ['jquery', 'CXGN.BreedersToolbox.HTMLSelect'], entries => ['mixedmodels' ] &>
8 <script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
9 <script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>
10 <script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script>
13 <& /page/page_title.mas, title=>"Mixed Model Analysis" &>
15 <& /analyses/store_new_analysis_values_and_model.mas &>
17 <div id="mixedmodel_tool">
29 background-color:#337ab7;
40 background-color:lightyellow;
42 .factor_interaction_panel {
52 background-color:#DDEEEE;
61 <div class="container">
64 <!-- div style="margin:20px;margin-left:auto;margin-right:auto;padding:10px;border:1px;border-style:dotted;width:60%;text-align:center">
65 Note: The Mixed Model Tool is in testing. Please provide feedback but do not use in production setting.
68 <div class="col-md-12">
71 <div class="container-fluid">
73 <&| /util/workflow.mas, id=> "mixed_model_analysis_workflow" &>
74 <&| /util/workflow.mas:step, title=> "Choose Dataset" &>
75 <& /page/page_title.mas, title=>"Choose the dataset for your analysis" &>
80 <span style="width:240px" id="mixed_model_dataset_select">
83 <div style="float:right">
84 <button class="btn btn-main" id="mixed_model_analysis_prepare_button" onclick="Workflow.complete(this);">Choose Dataset and continue</button>
92 <&| /util/workflow.mas:step, title=> "Choose Dependent Variable" &>
93 <& /page/page_title.mas, title=>"Choose the dependent variable for your analysis" &>
96 <div id="dependent_variable" style="margin-bottom:50px">
99 <div id="trait_histogram">
104 <div style="float:right">
105 <button class="btn btn-main" id="mixed_model_analysis_fishished_choose_variable" onclick="Workflow.complete(this);">Next step</button>
111 <&| /util/workflow.mas:step, title=> "Build Model" &>
112 <& /page/page_title.mas, title=>"Build mixed model" &>
114 <div class="model_bg" >
115 <div id="model_string" style="margin-top:10px;margin-bottom:10px;text-align:center;font-weight:bold">[model will appear here in lme4 format]</div>
116 <!-- button id="store_model_formula" class="btn btn-default btn-sm">Save model</button -->
122 <div class="container">
124 <div id="left-margin" class="col-md-2"></div>
125 <div class="col-md-4">
126 <div class="panel panel-default" style="border-width:0px">
127 <div class="panel panel-header" style="border-width:0px">Available Factors</div>
129 <div id="factors" class="panel panel-body" style="border-style:dotted;border-width:0px;">
130 [ Choose dataset and dependent variable first ]
134 <div class="col-md-4">
135 <div id="fixed_factors_panel" style="border-width:0;" class="panel panel-default">
136 <div class="panel-header">Fixed factors</div>
137 <div id="fixed_factors" class="panel-body factor_panel">
139 <!-- style="background-color:lightyellow;min-height:100px;height:auto;border-style:dotted;border-width:5px;color:grey" --></div>
142 <div id="interaction_factor_collection_panel" class="panel panel-default factor_interaction_panel">
143 <!-- style="border-style:dotted;border-width:0px;margin-top:20px;height:auto;z-index:1" -->
144 <div class="panel-header">
145 Fixed factors with interaction<br />
146 <button id="add_interaction_factor_button">add new interaction</button>
148 <div id="interaction_factors_collection" name="interaction_factors_collection" class="panel-body">
151 <div id="variable_slope_intersect_collection_panel" class="panel panel-default factor_interaction_panel">
153 <!-- style="border-style:dotted;border-width:0px;margin-top:20px;height:auto;z-index:1" -->
155 <div class="panel-header">
156 Fixed factors with variable slope/intersects<br />
157 <button id="add_variable_slope_intersect_button">add new variable slope/intersect</button>
159 <div id="variable_slope_intersect_collection" class="panel-body">
164 <div style="height:30"> </div>
165 <div id="random_factors_panel" class="panel panel-default" style="border-width:0px">
166 <div class="panel-header">Random factors</div>
167 <div id="random_factors" class="panel-body factor_panel">
169 <!-- style="background-color:lightyellow;min-height:100px;height:auto;border-style:dotted;border-width:5px;color:grey" -->
177 <div id="tempfile" style="display:none" >
181 <div style="float:right">
182 <button style="position:relative;" id="run_mixed_model_button" class="btn btn-main" onclick="Workflow.complete(this)" >Run analysis and go to next step</button>
189 <&| /util/workflow.mas:step, title=> "Results" &>
191 <& /page/page_title.mas, title=>"Analysis Results" &>
194 <ul class="nav nav-tabs">
195 <li class="active"><a data-toggle="tab" id="adjusted_blups_tab_link" href="#adjusted_blups_tab">Adjusted means (BLUPs)</a></li>
196 <li><a data-toggle="tab" id="blups_tab_link" href="#blups_tab">BLUPs</a></li>
197 <li><a data-toggle="tab" id="adjusted_blues_tab_link" href="#adjusted_blues_tab">Adjusted means (BLUEs)</a></li>
198 <li><a data-toggle="tab" id="blues_tab_link" href="#blues_tab">BLUEs</a></li>
200 <div class="tab-content">
201 <div id="adjusted_blups_tab" class="tab-pane fade in active">
203 <button id="open_store_adjusted_blups_dialog_button" class="btn btn-primary" data-toggle="modal" data-analysis_type="adjusted_means">Save adjusted means</button>
205 <!-- button class="btn btn-primary">Download</button -->
207 <div id="mixed_models_adjusted_blups_results_div">[loading...]</div>
210 <div id="blups_tab" class="tab-pane fade">
212 <button id="open_store_blups_dialog_button" class="btn btn-primary" data-toggle="modal" data-analysis_type="blup" data-target="#generic_save_analysis_dialog">Save BLUPs</button>
213 <div id="mixed_models_blups_results_div">[not available]</div>
216 <div id="adjusted_blues_tab" class="tab-pane fade">
218 <button id="open_store_adjusted_blues_dialog_button" class="btn btn-primary" data-toggle="modal" data-analysis_type="blues">Save adjusted BLUEs</button>
220 <div id="mixed_models_adjusted_blues_results_div">[loading...]</div>
223 <div id="blues_tab" class="tab-pane fade">
225 <button id="open_store_blues_dialog_button" class="btn btn-primary" data-toggle="modal" data-analysis_type="blues">Save BLUEs</button>
227 <div id="mixed_models_blues_results_div">[loading...]</div>
229 </div> <!-- results_tab div -->
238 $(document).ready( function() {
239 var mixedmodels = window.jsMod['mixedmodels'].init("mixedmodels");