diff --git a/README.md b/README.md index 6f2b1481..a9f3b01b 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ PyHDX is python project which can be used to derive Gibbs free energy from HDX-MS data. +[PyHDX web](http://pyhdx.jhsmit.org) - -[PyHDX stable documentation](https://pyhdx.readthedocs.io/en/stable/) +[PyHDX latest documentation](https://pyhdx.readthedocs.io/en/latest/) [PyHDX on YouTube](https://www.youtube.com/channel/UCTro6Iv1BhvjUPYZNu5TJWg) @@ -60,8 +60,6 @@ A test file can be downloaded from [here](https://raw.githubusercontent.com/Jhsm A beta version might be available at: http://pyhdx-beta.jhsmit.org -The latest beta docs are found [here](https://pyhdx.readthedocs.io/en/latest/) - ## Publication @@ -73,7 +71,7 @@ Python code for analysis and generation the figures in the paper are here: https ## Other -HDX MS datasets repository and format (alpha): +HDX MS datasets repository and format: https://github.com/Jhsmit/HDX-MS-datasets HDXMS datasets python bindings: diff --git a/pyhdx/models.py b/pyhdx/models.py index bcc6e8b3..ce938257 100644 --- a/pyhdx/models.py +++ b/pyhdx/models.py @@ -286,7 +286,7 @@ def __init__(self, data: pd.DataFrame, **metadata: Any): ) @classmethod - def from_dataset(cls, dataset: HDXDataSet, state: str | int, **metadata) -> HDXMeasurement: + def from_dataset(cls, dataset: HDXDataSet, state: str | int, drop_first=cfg.analysis.drop_first, **metadata) -> HDXMeasurement: """Create an HDXMeasurement object from a HDXDataSet object. Args: @@ -318,7 +318,7 @@ def from_dataset(cls, dataset: HDXDataSet, state: str | int, **metadata) -> HDXM peptides = apply_control(peptides, fd_peptides, nd_peptides) peptides = correct_d_uptake( peptides, - drop_first=cfg.analysis.drop_first, + drop_first=drop_first, d_percentage=metadata.get("d_percentage", 100.0), ) diff --git a/pyhdx/web/controllers.py b/pyhdx/web/controllers.py index 2ee0e93a..7d290606 100644 --- a/pyhdx/web/controllers.py +++ b/pyhdx/web/controllers.py @@ -229,17 +229,17 @@ class GlobalSettingsControl(ControlPanel): doc="Select the number of N-terminal residues to ignore.", ) - weight_exponent = param.Number( - default=cfg.analysis.weight_exponent, - bounds=(0, None), - doc="Value of the exponent use for weighted averaging of RFU values", - ) + # weight_exponent = param.Number( + # default=cfg.analysis.weight_exponent, + # bounds=(0, None), + # doc="Value of the exponent use for weighted averaging of RFU values", + # ) def make_dict(self): widgets = self.generate_widgets() - widgets["config_download"] = pn.widgets.FileDownload( - label="Download config file", callback=self.config_download_callback - ) + # widgets["config_download"] = pn.widgets.FileDownload( + # label="Download config file", callback=self.config_download_callback + # ) return widgets @@ -258,13 +258,13 @@ def config_download_callback(self) -> StringIO: return sio - @param.depends("drop_first", watch=True) - def _update_drop_first(self): - cfg.analysis.drop_first = self.drop_first + # @param.depends("drop_first", watch=True) + # def _update_drop_first(self): + # cfg.analysis.drop_first = self.drop_first - @param.depends("weight_exponent", watch=True) - def _update_weight_exponent(self): - cfg.analysis.weight_exponent = self.weight_exponent + # @param.depends("weight_exponent", watch=True) + # def _update_weight_exponent(self): + # cfg.analysis.weight_exponent = self.weight_exponent class PeptideFileInputControl(PyHDXControlPanel): @@ -857,13 +857,14 @@ def _action_load_datasets(self) -> None: self.widgets["load_dataset_button"].disabled = True try: config_ctrl = self.parent.control_panels["GlobalSettingsControl"] + drop_first = config_ctrl.drop_first config_ctrl.widgets["drop_first"].disabled = True - config_ctrl.widgets["weight_exponent"].disabled = True + # config_ctrl.widgets["weight_exponent"].disabled = True except KeyError: - pass + drop_first = 2 for state in dataset.states: - hdxm = HDXMeasurement.from_dataset(dataset, state) + hdxm = HDXMeasurement.from_dataset(dataset, state, drop_first=drop_first) self.src.add(hdxm, state) self.parent.logger.info( f"Loaded experiment peptides state {hdxm.state} " diff --git a/requirements/requirements-macOS-latest-3.9.txt b/requirements/requirements-macOS-latest-3.9.txt index 5c7731aa..530a0c25 100644 --- a/requirements/requirements-macOS-latest-3.9.txt +++ b/requirements/requirements-macOS-latest-3.9.txt @@ -61,7 +61,7 @@ importlib-metadata==6.8.0 # via # dask # markdown -jinja2==3.1.2 +jinja2==3.1.3 # via # bokeh # distributed diff --git a/requirements/requirements-ubuntu-latest-3.9.txt b/requirements/requirements-ubuntu-latest-3.9.txt index 6300466c..9cfcb620 100644 --- a/requirements/requirements-ubuntu-latest-3.9.txt +++ b/requirements/requirements-ubuntu-latest-3.9.txt @@ -65,7 +65,7 @@ importlib-metadata==6.8.0 # via # dask # markdown -jinja2==3.1.2 +jinja2==3.1.3 # via # bokeh # distributed diff --git a/requirements/requirements-windows-latest-3.9.txt b/requirements/requirements-windows-latest-3.9.txt index a67c4887..6d3c9e3a 100644 --- a/requirements/requirements-windows-latest-3.9.txt +++ b/requirements/requirements-windows-latest-3.9.txt @@ -65,7 +65,7 @@ importlib-metadata==6.8.0 # via # dask # markdown -jinja2==3.1.2 +jinja2==3.1.3 # via # bokeh # distributed