From f7a6503894e6c4231440d6cdf4814834fe0f722b Mon Sep 17 00:00:00 2001 From: Lennart Date: Mon, 7 Jan 2019 09:47:54 +0100 Subject: [PATCH] Made gonosome masking equally stringent between male/female --- wisecondorX/predict_control.py | 2 +- wisecondorX/predict_tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wisecondorX/predict_control.py b/wisecondorX/predict_control.py index b2af0e8..8c1d574 100644 --- a/wisecondorX/predict_control.py +++ b/wisecondorX/predict_control.py @@ -25,7 +25,7 @@ def normalize(args, sample, ref_file, ref_gender): sample = coverage_normalize_and_mask(sample, ref_file, ap) sample = project_pc(sample, ref_file, ap) results_w = get_weights(ref_file, ap)[ct:] - optimal_cutoff = get_optimal_cutoff(ref_file, args.maskrepeats, ct, ap) + optimal_cutoff = get_optimal_cutoff(ref_file, args.maskrepeats) results_z, results_r, ref_sizes, m_lr, m_z = normalize_repeat(sample, ref_file, optimal_cutoff, ct, cp, ap) return results_r, results_z, results_w, ref_sizes, m_lr, m_z diff --git a/wisecondorX/predict_tools.py b/wisecondorX/predict_tools.py index e4c5552..bc47901 100644 --- a/wisecondorX/predict_tools.py +++ b/wisecondorX/predict_tools.py @@ -67,8 +67,8 @@ def project_pc(sample_data, ref_file, ap): ''' -def get_optimal_cutoff(ref_file, repeats, ct, ap): - distances = ref_file['distances{}'.format(ap)][ct:] +def get_optimal_cutoff(ref_file, repeats): + distances = ref_file['distances'] cutoff = float('inf') for i in range(0, repeats): mask = distances < cutoff