diff options
author | zsloan | 2022-12-21 18:56:43 +0000 |
---|---|---|
committer | zsloan | 2022-12-21 13:04:07 -0600 |
commit | 6bdbab327ac9a26517ef81a105c0ba5a8b0c360d (patch) | |
tree | 2d772a9a848ef19f441554b649d4cc99de298b4b /wqflask | |
parent | e98e9aee54034bc2c3ab349fdda38ff6138ab09e (diff) | |
download | genenetwork2-6bdbab327ac9a26517ef81a105c0ba5a8b0c360d.tar.gz |
Replace hard-coded homology source file
Remove limitation on when to show homology track
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/interval_analyst/GeneUtil.py | 6 | ||||
-rw-r--r-- | wqflask/wqflask/marker_regression/display_mapping_results.py | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/wqflask/wqflask/interval_analyst/GeneUtil.py b/wqflask/wqflask/interval_analyst/GeneUtil.py index 633cc9bf..5b28f458 100644 --- a/wqflask/wqflask/interval_analyst/GeneUtil.py +++ b/wqflask/wqflask/interval_analyst/GeneUtil.py @@ -2,11 +2,9 @@ import string from wqflask.database import database_connection -mm10_to_hg38_file = "/home/zas1024/gn2-zach/mm10_hg38_homology/mm10ToHg38_chain_only_sorted.csv" - -def load_homology(chr_name, start_mb, end_mb): +def load_homology(chr_name, start_mb, end_mb, source_file): homology_list = [] - with open(mm10_to_hg38_file) as h_file: + with open(source_file) as h_file: current_chr = 0 for line in h_file: line_items = line.split() diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index 44067a5d..16eaee24 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -544,7 +544,8 @@ class DisplayMappingResults: chrName = self.selectedChr self.geneCol = GeneUtil.loadGenes( str(chrName), self.diffCol, self.startMb, self.endMb, "mouse") - self.homology = GeneUtil.load_homology(str(chrName), self.startMb, self.endMb) + self.homology = GeneUtil.load_homology(str(chrName), self.startMb, self.endMb, "mouse_to_human.csv") + elif self.dataset.group.species == "rat": if self.selectedChr == 21: chrName = "X" @@ -586,7 +587,7 @@ class DisplayMappingResults: (self.NR_INDIVIDUALS + 10) * self.EACH_GENE_HEIGHT # END HaplotypeAnalyst - if self.homologyChecked and self.homology and (self.endMb - self.startMb < 2) and self.geneChecked and self.geneCol: + if self.homologyChecked and self.homology and self.geneChecked and self.geneCol: self.graphHeight = self.graphHeight + (self.NUM_GENE_ROWS) * self.EACH_GENE_HEIGHT if self.geneChecked and self.geneCol: self.graphHeight = self.graphHeight + (self.NUM_GENE_ROWS) * self.EACH_GENE_HEIGHT @@ -739,7 +740,7 @@ class DisplayMappingResults: if self.geneChecked and self.geneCol: self.drawGeneBand(canvas, gifmap, plotXScale, offset=newoffset, zoom=zoom, startMb=startMb, endMb=endMb) - if self.homologyChecked and self.homology and (endMb - startMb < 2): + if self.homologyChecked and self.homology: if self.geneChecked and self.geneCol: yTopOffset = newoffset[3] + self.NUM_GENE_ROWS * \ self.EACH_GENE_HEIGHT + 3 * self.BAND_SPACING + 10 |