diff options
-rw-r--r-- | gn3/computations/wgcna.py | 4 | ||||
-rw-r--r-- | tests/unit/computations/test_gemma.py | 4 | ||||
-rw-r--r-- | tests/unit/computations/test_wgcna.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py index e6fab26..a86c9ab 100644 --- a/gn3/computations/wgcna.py +++ b/gn3/computations/wgcna.py @@ -79,8 +79,8 @@ def call_wgcna_script(rscript_path: str, request_data: dict): return run_cmd_results output_file_data = json.load(outputfile) - output_file_data["gn3"]["image_data"] = process_image( - output_file_data["gn3"]["imageLoc"]).decode("ascii") + output_file_data["output"]["image_data"] = process_image( + output_file_data["output"]["imageLoc"]).decode("ascii") # json format only supports unicode string// to get image data reconvert return { diff --git a/tests/unit/computations/test_gemma.py b/tests/unit/computations/test_gemma.py index 137c95c..6e1d097 100644 --- a/tests/unit/computations/test_gemma.py +++ b/tests/unit/computations/test_gemma.py @@ -19,9 +19,9 @@ class TestGemma(unittest.TestCase): _file = generate_pheno_txt_file(tmpdir="/tmp", trait_filename="phenotype.txt", values=["x", "x", "BXD07 438.700"]) - self.assertEqual(_file, ("/tmp/gn2/phenotype_" + self.assertEqual(_file, ("/tmp/gn3/phenotype_" "P7y6QWnwBPedSZdL0+m/GQ.txt")) - open_mock.assert_called_with(("/tmp/gn2/phenotype_" + open_mock.assert_called_with(("/tmp/gn3/phenotype_" "P7y6QWnwBPedSZdL0+m/GQ.txt"), "w", encoding="utf-8") open_mock.return_value.write.assert_has_calls([ mock.call("NA\n"), diff --git a/tests/unit/computations/test_wgcna.py b/tests/unit/computations/test_wgcna.py index a9108b0..0bf97ec 100644 --- a/tests/unit/computations/test_wgcna.py +++ b/tests/unit/computations/test_wgcna.py @@ -127,7 +127,7 @@ class TestWgcna(TestCase): wgcna_cmd = compose_wgcna_cmd( "wgcna.r", "/tmp/wgcna.json") self.assertEqual( - wgcna_cmd, "Rscript ./scripts/wgcna.r /tmp/wgcna.json") + wgcna_cmd, "Rscript scripts/wgcna.r /tmp/wgcna.json") @pytest.mark.unit_test @mock.patch("gn3.computations.wgcna.TMPDIR", "/tmp") |