Skip to content

Commit

Permalink
Merge pull request #127 from hisakatha/fix-expected-value-col
Browse files Browse the repository at this point in the history
Fix #126 where an argument (expected_value_col) for normalization in pileup is ignored
  • Loading branch information
Phlya authored Mar 24, 2023
2 parents 57426dd + a9d0524 commit 06a4706
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion coolpuppy/coolpup.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,8 @@ def __init__(
expected : DataFrame, optional
If using expected, pandas DataFrame with by-distance expected.
The default is False.
expected_value_col : str, optional
Which column in the expected_df contains values to use for normalization
view_df : DataFrame
A dataframe with region coordinates used in expected (see bioframe
documentation for details). Can be ommited if no expected is provided, or
Expand Down Expand Up @@ -925,7 +927,8 @@ def __init__(
except Exception as e:
raise ValueError("provided expected is not valid") from e
self.ExpSnipper = snipping.ExpectedSnipper(
self.clr, self.expected, view_df=self.view_df
self.clr, self.expected, view_df=self.view_df,
expected_value_col=self.expected_value_col
)
self.expected_selections = {
region_name: self.ExpSnipper.select(region_name, region_name)
Expand Down Expand Up @@ -2131,6 +2134,7 @@ def pileup(
view_df=view_df,
clr_weight_name=clr_weight_name,
expected=expected_df,
expected_value_col=expected_value_col,
ooe=ooe,
control=control,
coverage_norm=coverage_norm,
Expand Down

0 comments on commit 06a4706

Please sign in to comment.