Skip to content
Snippets Groups Projects
Commit dee6245f authored by Bienchen's avatar Bienchen
Browse files

Adde new command line arguments

parent f71d7609
No related branches found
No related tags found
No related merge requests found
Changes in Release 2.2.0
=================================================================================
* `run_af2` Python package:
* add command line options `--use-precomputed-msas`, `--no-run-relax` and
`--use-gpu-relax`
Changes in Release 2.1.0
=================================================================================
......@@ -10,7 +18,7 @@ Changes in Release 2.0.0
* `run_af2` Python package:
* Prepare to run AF2 pipeline 2.1
* rename command line options `--pdb70_database_path` and
* Rename command line options `--pdb70_database_path` and
`--obsolete_pdbs_path` to `--pdb70-database-path` and `--obsolete-pdbs-path`
......
......@@ -120,6 +120,26 @@ def parse_af2_arguments(parser):
metavar="<true|false>,<true|false>,...",
default=None,
)
af2_group.add_argument(
"--use-precomputed-msas",
action="store_true",
help="Use existing MSAs from current working directory.",
default=False,
)
af2_group.add_argument(
"--no-run-relax",
action="store_true",
help="Don't Run relaxation on models after prediction. That is "
+ "inverted of alphafold's own --run_relax, and meant to replace "
+ "'--run_relax=False'",
default=False,
)
af2_group.add_argument(
"--use-gpu-relax",
action="store_true",
help="Use GPU for relaxation (if GPU is enabled).",
default=True,
)
af2_group.add_argument(
"--version",
action="version",
......
......@@ -117,6 +117,9 @@ def _assemble_singularity_call( # pylint: disable=too-many-arguments
db_preset,
model_preset,
is_prokaryote_list,
use_precomputed_msas,
no_run_relax,
use_gpu_relax,
data_paths,
extra_arg_list,
):
......@@ -156,6 +159,14 @@ def _assemble_singularity_call( # pylint: disable=too-many-arguments
if is_prokaryote_list is not None:
snglrty_cmd.append(f"--is_prokaryote_list={is_prokaryote_list}")
bool_args = {
"use_precomputed_msas": use_precomputed_msas,
"run_relax": not no_run_relax,
"use_gpu_relax": use_gpu_relax,
}
for arg, val in bool_args.items():
snglrty_cmd.append(f"--{arg}={str(val)}")
for flag, path in data_paths.items():
snglrty_cmd.append(f"--{flag}={path}")
......@@ -198,6 +209,9 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
db_preset="full_dbs",
model_preset="monomer",
is_prokaryote_list=None,
use_precomputed_msas=False,
no_run_relax=False,
use_gpu_relax=True,
af2_image_file=None,
# af2_image_dir="/export/soft/singularity-containers/alphafold",
af2_image_dir="/scicore/home/schwede/GROUP/alphafold_data/",
......@@ -264,6 +278,17 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
is_prokaryote_list parameter in AF2.
:type is_prokaryote_list: :class:`str` like needed by AF2, e.g.
"true,false,true"
:param use_precomputed_msas: Use existing MSAs from cwd. Corresponds to the
use_precomputed_msas parameter in AF2.
:type use_precomputed_msas: :class:`bool`
:param no_run_relax: Disable relaxation at the end of modelling.
Corresponds to AF2's no_run_relax parameter but works
oppositely, True means no relaxation, False means
relaxation.
:type no_run_relax: :class:`bool`
:param use_gpu_relax: Run relaxation on GPU. Corresponds to the
use_gpu_relax parameter in AF2.
:type use_gpu_relax: :class:`bool`
:param af2_image_file: Declare a Singularity image to run the AF2 pipeline
from. If None, an image from af2_image_dir will be
used.
......@@ -392,6 +417,9 @@ def run_af2_singularity_image( # pylint: disable=too-many-arguments
db_preset,
model_preset,
is_prokaryote_list,
use_precomputed_msas,
no_run_relax,
use_gpu_relax,
data_paths,
extra_arg_list,
)
......@@ -461,6 +489,9 @@ def main():
opts.db_preset,
opts.model_preset,
opts.is_prokaryote_list,
opts.use_precomputed_msas,
opts.no_run_relax,
opts.use_gpu_relax,
opts.singularity_image,
extra_arg_list=extra_arg_list,
**data_paths,
......@@ -474,4 +505,4 @@ def main():
# LocalWords: str dir snglrty tmpdir tmp argparse os ArgumentParser metavar
# LocalWords: RawDescriptionHelpFormatter nargs getenv startswith ValueError
# LocalWords: RuntimeError bfd BFD dbs mgnify HHblits uniclust Uniclust pdb
# LocalWords: multimer seqres uniprot
# LocalWords: multimer seqres uniprot msas MSAs precomputed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment