about summary refs log tree commit diff
path: root/gn3/computations
diff options
context:
space:
mode:
authorAlexander_Kabui2025-01-28 14:58:23 +0300
committerBonfaceKilz2025-02-06 12:43:15 +0300
commit096db61835f7d25f731735fc8256f703f40b4634 (patch)
tree2496c529311dc1a738e72f22680b4e80527454e8 /gn3/computations
parent49b530798a441c9ab551a38dc859fccbe27c2f77 (diff)
downloadgenenetwork3-096db61835f7d25f731735fc8256f703f40b4634.tar.gz
feat: Add function to process qtl2 output results.
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/rqtl2.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/gn3/computations/rqtl2.py b/gn3/computations/rqtl2.py
index f6b4086..703d5fd 100644
--- a/gn3/computations/rqtl2.py
+++ b/gn3/computations/rqtl2.py
@@ -207,3 +207,25 @@ def process_scan_results(qtl_file_path: str,
             })
     return results
 
+
+def process_qtl2_results(results: Dict[str, str]) -> Dict[str, any]:
+    """Function provides abstraction for processing all QTL2 mapping results.
+
+    Args:
+        results (Dict[str, str]): A dictionary containing file paths and
+          other related parameters.
+
+    Returns:
+        Dict[str, any]: A dictionary containing both QTL
+            and permutation results along with input data.
+    """
+    qtl_results = process_scan_results(results["scan_file"], results["gmap_file"])
+    permutation_results = process_permutation(results)
+
+    return {
+        **results,  # Include original input data
+        "qtl_results": qtl_results,
+        "permutation_results": permutation_results
+    }
+
+