Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
fix removing multiallelic variants with new polars version
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Sep 13, 2022
1 parent 1be4159 commit f1886d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgscatalog_utils/match/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def handle_multiallelic(df: pl.DataFrame, remove_multiallelic: bool, pvar: bool)
logger.warning("--remove_multiallelic requested for bim format, which already contains biallelic "
"variant representations only")
logger.debug('Dropping multiallelic variants')
return df[~df['is_multiallelic']]
return df.filter(~df['is_multiallelic'])
else:
logger.debug("Exploding dataframe to handle multiallelic variants")
df.replace('ALT', df['ALT'].str.split(by=',')) # turn ALT to list of variants
Expand Down

0 comments on commit f1886d0

Please sign in to comment.