From a9d0524f199ea1041472880b9016afee7a3eca80 Mon Sep 17 00:00:00 2001 From: hisakatha Date: Tue, 21 Mar 2023 13:02:58 +0900 Subject: [PATCH] Fix an issue where an argument is ignored Fix an issue where an argument (expected_value_col) for normalization in pileup is ignored --- coolpuppy/coolpup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coolpuppy/coolpup.py b/coolpuppy/coolpup.py index d0922d9..234e49d 100644 --- a/coolpuppy/coolpup.py +++ b/coolpuppy/coolpup.py @@ -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 @@ -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) @@ -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,