diff options
author | zsloan | 2021-08-04 20:10:05 +0000 |
---|---|---|
committer | zsloan | 2021-08-26 19:06:26 +0000 |
commit | 7f769f7ba20e3946020c1658fe7bc10978377957 (patch) | |
tree | a53a1c3cb6c3ff1c3a7ae7143390efa0ead325af | |
parent | 18de18e71b08eeb5480ea505eb9136a3c65f8593 (diff) | |
download | genenetwork2-7f769f7ba20e3946020c1658fe7bc10978377957.tar.gz |
Store figure and table data for pair_scan in run_mapping.py
-rw-r--r-- | wqflask/wqflask/marker_regression/run_mapping.py | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index 6c1c92cb..7a2b9aaa 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -326,33 +326,8 @@ class RunMapping: self.no_results = True else: if self.pair_scan == True: - self.qtl_results = [] - highest_chr = 1 # This is needed in order to convert the highest chr to X/Y - for marker in results: - if marker['chr1'] > 0 or marker['chr1'] == "X" or marker['chr1'] == "X/Y": - if marker['chr1'] > highest_chr or marker['chr1'] == "X" or marker['chr1'] == "X/Y": - highest_chr = marker['chr1'] - if 'lod_score' in list(marker.keys()): - self.qtl_results.append(marker) - - self.trimmed_markers = results - - for qtl in enumerate(self.qtl_results): - self.json_data['chr1'].append(str(qtl['chr1'])) - self.json_data['chr2'].append(str(qtl['chr2'])) - self.json_data['Mb'].append(qtl['Mb']) - self.json_data['markernames'].append(qtl['name']) - - self.js_data = dict( - json_data=self.json_data, - this_trait=self.this_trait.name, - data_set=self.dataset.name, - maf=self.maf, - manhattan_plot=self.manhattan_plot, - mapping_scale=self.mapping_scale, - qtl_results=self.qtl_results - ) - + self.figure_data = results[0] + self.table_data = results[1] else: self.qtl_results = [] self.results_for_browser = [] |