Configuration
Basic configuration of PyHDX is done through a .yaml
configuration file. By default, the configuration
file in the user home directory is used (~/.pyhdx/config.yaml
).
Individual or all config entries can be overwritten by loading (partial) config files.
In 'myconfigfile.yaml
:
cluster:
n_workers: 4
fitting:
dtype: float32
device: cuda
Then to load the config:
from pyhdx.config import cfg
cfg.load_config('myconfigfile.yaml')
cfg.TORCH_DTYPE
>>> torch.float32
Default configuration
The default configuration file is shown below, and can be found in PyHDX source at pyhdx/config.yaml
.
cluster:
scheduler_address: "127.0.0.1:52123"
n_workers: 10
server:
assets_dir: ~/.pyhdx/assets
log_dir: ~/.pyhdx/logs
database_dir : ~/.hdxms_datasets/datasets
fitting:
dtype: float64
device: cpu
analysis:
drop_first: 2
weight_exponent: 1.0
plotting:
# Sizes are in mm
ncols: 2
page_width: 160
cbar_width: 2.5
peptide_coverage_aspect: 3
peptide_mse_aspect: 3
residue_scatter_aspect: 3
dG_aspect: 2.5
linear_bars_aspect: 30
loss_aspect: 2.5
rainbowclouds_aspect: 4
Cluster
Settings related to the dask
cluster for computation of \(\Delta G\) values.
- scheduler_address: The address for the
dask
scheduler. If scheduler is found at this address, a new cluster is created. - n_workers: Number of workers for the cluster.
Server
Settings related to the panel
web application.
- assets_dir: Directory for static assets. Uploaded
.pdb
files for visualization are stored here. - log_dir: Directory for log files.
Fitting
Settings related to \(\Delta G\) fitting.
- dtype: Data type for fitting. Can be
float32
orfloat64
. - device: Device for fitting. Can be
cpu
orcuda
(GPU), ifcuda
is available.
Analysis
Settings related to analysis of HDX-MS data.
- drop_first: Number of N-terminal residues to consider as completely back-exchanging.
- weight_exponent: Exponent for calculating residue-level RFU values by weighted averaging.
Plotting
Settings related to output format of plots generated by the web interface. These include widths and aspect ratios of figures and plots, as well as the number of columns of plots to place into one figure.