Skip to content

Commit

Permalink
adding variants_to_keep functionality back in
Browse files Browse the repository at this point in the history
  • Loading branch information
HolEv committed Jan 23, 2024
1 parent 5ef1a36 commit e111ff6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deeprvat/data/dense_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ def setup_variants(

af_vals = af_annotation[af_col].to_numpy()
ids_to_keep = set(af_annotation.loc[(af_vals >= af_threshold) & (af_vals <= 1 - af_threshold), "id"])
if self.variants_to_keep is not None: # Caution: This has not been tested yet but should work
ids_to_keep.intersect(self.variants_to_keep)
mask = variants["id"].isin(ids_to_keep).to_numpy()

logger.debug(f' {mask.sum()} variants "common" by AF filter')
Expand Down

0 comments on commit e111ff6

Please sign in to comment.