diff options
| author | Alexander_Kabui | 2025-02-19 16:10:16 +0300 |
|---|---|---|
| committer | Alexander_Kabui | 2025-02-19 16:10:16 +0300 |
| commit | 99fd5070a84f37f91993f329f9cc8dd82a4b9339 (patch) | |
| tree | 2a1cb15a38fae25df1dadc41f310445cc0412924 /gn3/computations/rqtl2.py | |
| parent | 2852a935d67f1fe319ee925f412d40f7d8e88582 (diff) | |
| download | genenetwork3-99fd5070a84f37f91993f329f9cc8dd82a4b9339.tar.gz | |
fix: Read and parse correct permutation file from R/qtl2.
Diffstat (limited to 'gn3/computations/rqtl2.py')
| -rw-r--r-- | gn3/computations/rqtl2.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gn3/computations/rqtl2.py b/gn3/computations/rqtl2.py index ae1e475..ec0636b 100644 --- a/gn3/computations/rqtl2.py +++ b/gn3/computations/rqtl2.py @@ -133,16 +133,12 @@ def process_permutation(data): """ perm_file = data.get("permutation_file") - perm_results = {} with open(perm_file, "r", encoding="utf-8") as file_handler: reader = csv.reader(file_handler) phenotypes = next(reader)[1:] - for line in reader: - permutation_id, *permutation_values = line - perm_results[permutation_id] = permutation_values - - _, significance = fetch_significance_results(data.get("significance_file")) - return { + perm_results = {_id:float(val) for (_id,val) in reader} + _, significance = fetch_significance_results(data.get("significance_file")) + return { "phenotypes": phenotypes, "perm_results": perm_results, "significance": significance, |
