Skip to content

Commit

Permalink
more updates based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
silastittes committed Jul 30, 2024
1 parent da15afa commit b816065
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflows/ts2fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def f(x):
# apply masks
if mask_file is not None:
mask_intervals = masks.get_mask_from_file_dfe(mask_file, chrm)
assert mask_intervals.shape[1] == 2
mask_length = sum([interval[1] - interval[0] for interval in mask_intervals])
ts = ts.delete_intervals(mask_intervals)

# grab coding regions
Expand All @@ -105,7 +107,7 @@ def f(x):
non_neutral_anc_count += exon_len * nonneu_prop
neutral_anc_count += exon_len * neutral_prop
else:
seq_len += chrom_length
seq_len += chrom_length - mask_length
non_neutral_anc_count += chrom_length * nonneu_prop
neutral_anc_count += chrom_length * neutral_prop

Expand Down

0 comments on commit b816065

Please sign in to comment.