haddock.clis.restraints.random_removal module
haddock3-restraints random_removal subcommand.
Given an input ambiguous file (.tbl), this subcommand will generate an archive containing multiple tbl files, each containing a subset of the initial ones.
The subset is tuned by the optional argument –ratio (-r) The number of generated files in the archive is tuned by the argument –nb-tbl (-n) The random seed can be tuned using –seed (-s), for reproducibility issues
- Usage:
haddock3-restraints random_removal <tbl_file> [-r <ratio>] [-n <nb-tbl>] [-s <seed>]
- positional arguments:
tblfile input tbl restraint file.
- options:
- -h, --help
show this help message and exit
- -r RATIO, --ratio RATIO
Ratio of restraints to be randomly removed.
- -s SEED, --seed SEED
Pseudo-random seed.
- -n NB_TBL, --nb-tbl NB_TBL
Number of ambiguous files to generate in the archive.
- haddock.clis.restraints.random_removal.add_rand_removal_arguments(rand_removal_subcommand)[source]
Add arguments to the random removal subcommand.
- haddock.clis.restraints.random_removal.main(tblfile: str | Path, ratio: float, nb_tbl: int = 10, seed: int = 917) None [source]
Simple wrapper of the random_removal function.
- Parameters:
tblfile (Union[str, Path]) – Path the the input ambiguous file
ratio (float) – Ration of restraints to be removed
nb_tbl (int, optional) – Number of ambig files to generate in the archive, by default 10
seed (int, optional) – Initial random seed, by default 917
- Returns:
Union[str, Path] – Path to the generated archive containing nb_tbl restraints in it.
- haddock.clis.restraints.random_removal.random_removal(tblfile: str | Path, ratio: float, nb_tbl: int = 10, seed: int = 917) Path [source]
Generate an archive containing the randomly removed restraints.
- Parameters:
tblfile (Union[str, Path]) – Path the the input ambiguous file
ratio (float) – Ration of restraints to be removed
nb_tbl (int, optional) – Number of ambig files to generate in the archive, by default 10
seed (int, optional) – Initial random seed, by default 917
- Returns:
Union[str, Path] – Path to the generated archive containing nb_tbl restraints in it.