aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/computations/qtlreaper.py5
-rw-r--r--gn3/heatmaps.py4
2 files changed, 6 insertions, 3 deletions
diff --git a/gn3/computations/qtlreaper.py b/gn3/computations/qtlreaper.py
index 981a9c8..8c970f2 100644
--- a/gn3/computations/qtlreaper.py
+++ b/gn3/computations/qtlreaper.py
@@ -7,7 +7,7 @@ import subprocess
from typing import Union
from gn3.chancy import random_string
-from gn3.settings import TMPDIR, REAPER_COMMAND
+from gn3.settings import TMPDIR
def generate_traits_file(samples, trait_values, traits_filename):
"""
@@ -39,6 +39,7 @@ def create_output_directory(path: str):
pass
def run_reaper(
+ reaper_cmd: str,
genotype_filename: str, traits_filename: str,
other_options: tuple = ("--n_permutations", "1000"),
separate_nperm_output: bool = False,
@@ -81,7 +82,7 @@ def run_reaper(
permu_output_filename = None
command_list = [
- REAPER_COMMAND, "--geno", genotype_filename,
+ reaper_cmd, "--geno", genotype_filename,
*other_options, # this splices the `other_options` list here
"--traits", traits_filename,
*output_list # this splices the `output_list` list here
diff --git a/gn3/heatmaps.py b/gn3/heatmaps.py
index 79c4082..1a528ba 100644
--- a/gn3/heatmaps.py
+++ b/gn3/heatmaps.py
@@ -6,6 +6,8 @@ from pathlib import Path
from functools import reduce
from typing import Any, Dict, Union, Sequence
+from flask import current_app as app
+
import numpy as np
import plotly.graph_objects as go # type: ignore
import plotly.figure_factory as ff # type: ignore
@@ -140,7 +142,7 @@ def build_heatmap(
traits_filename)
main_output, _permutations_output = run_reaper(
- genotype_filename, traits_filename, separate_nperm_output=True)
+ app.config['REAPER_COMMAND'], genotype_filename, traits_filename, separate_nperm_output=True)
qtlresults = parse_reaper_main_results(main_output)
organised = organise_reaper_main_results(qtlresults)