Skip to content

Commit

Permalink
delayed function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalin Nonchev committed Jun 30, 2021
1 parent 9595152 commit f92a858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnomad_db/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def get_maf_from_df(self, var_df: pd.DataFrame, query: str="AF") -> pd.Series:
assert len(out) == self.cpu_count

delayed_get_maf_from_df = delayed(self._get_maf_from_df)

out = Parallel(self.cpu_count, prefer="threads")(delayed_get_maf_from_df(df, query) for df in out)

out = pd.concat(out)
out.set_index(var_df.index, inplace=True)
assert len(var_df) == len(out)
Expand Down

0 comments on commit f92a858

Please sign in to comment.