From 63ca33f75fcb67ba8c3851c60088b62becb5f735 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 27 Apr 2021 22:25:44 +0000 Subject: Convert to array and transpose R/qtl scanone results when not using cofactors. For some reason the rows/columns are inverted when converted to a python object when doing scanone with cofactors vs without cofactors --- wqflask/wqflask/marker_regression/rqtl_mapping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wqflask/wqflask/marker_regression/rqtl_mapping.py b/wqflask/wqflask/marker_regression/rqtl_mapping.py index c70fbbec..cd43577e 100644 --- a/wqflask/wqflask/marker_regression/rqtl_mapping.py +++ b/wqflask/wqflask/marker_regression/rqtl_mapping.py @@ -116,7 +116,7 @@ def run_rqtl_geno(vals, samples, dataset, mapping_scale, method, model, permChec result_data_frame = ro.r("qtl_results") else: ro.r(f"qtl_results = scanone(the_cross, pheno='the_pheno', model='{model}', method='{method}')") - result_data_frame = ro.r("qtl_results") + result_data_frame = np.asarray(ro.r("qtl_results")).T marker_names = np.asarray(ro.r("row.names(qtl_results)")) if num_perm > 0 and permCheck == "ON": # Do permutation (if requested by user) -- cgit v1.2.3