Skip to content

Commit

Permalink
Update interval_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Jul 1, 2024
1 parent 5d71c80 commit ffe31f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/lib/interval_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,12 @@ def interval_counts_from_callsets(analyses):
# MongoDB specific
if type(analyses).__name__ == "Cursor":
analyses.rewind()
cov_l = pars[t].get("cov_l")
hl_l = pars[t].get("hl_l", cov_l)
for i, cs in enumerate(analyses):
covs[i] = cs["cnv_statusmaps"][pars[t]["cov_l"]]
covs[i] = cs["cnv_statusmaps"].get(cov_l, [])
# vals[i] = cs["cnv_statusmaps"][pars[t]["val_l"]]
hls[i] = cs["cnv_statusmaps"][pars[t]["hl_l"]]
hls[i] = cs["cnv_statusmaps"].get(hl_l, [])
# counting all occurrences of an interval for the current type > interval_min_fraction
counts = np.count_nonzero(covs >= min_f, axis=0)
frequencies = np.around(counts * f_factor, 3)
Expand Down

0 comments on commit ffe31f9

Please sign in to comment.