Skip to content

Commit

Permalink
Merge pull request #27 from CenterForMedicalGeneticsGhent/gonosome_ma…
Browse files Browse the repository at this point in the history
…sking

Made gonosome masking equally stringent between male/female
  • Loading branch information
matthdsm authored Jan 17, 2019
2 parents 5c941f4 + f7a6503 commit 3ca00e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wisecondorX/predict_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions wisecondorX/predict_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ca00e1

Please sign in to comment.