Commit 295d0d56 authored by rostro36's avatar rostro36
Browse files

Fixed documentation according to comments.

parent 50f86174
...@@ -174,10 +174,13 @@ where `data` is the same directory as in the previous step. If `jackhmmer`, ...@@ -174,10 +174,13 @@ where `data` is the same directory as in the previous step. If `jackhmmer`,
`/usr/bin`, their `binary_path` command-line arguments can be dropped. `/usr/bin`, their `binary_path` command-line arguments can be dropped.
If you've already computed alignments for the query, you have the option to If you've already computed alignments for the query, you have the option to
skip the expensive alignment computation here with skip the expensive alignment computation here with
`--use_precomputed_alignments`. If you wish to use a specific template as input, `--use_precomputed_alignments`.
If you wish to use **custom templates** as input,
you can use the argument `--use_custom_template`, which then will read all .cif you can use the argument `--use_custom_template`, which then will read all .cif
files in `template_mmcif_dir`. Make sure the chains of interest have the identifier _A_ files in `template_mmcif_dir`. Make sure the chains of interest have the identifier _A_
and have the same length as the input sequence. and have the same length as the input sequence. The same templates will be read for
all sequences that are passed for inference.
`--openfold_checkpoint_path` or `--jax_param_path` accept comma-delineated lists `--openfold_checkpoint_path` or `--jax_param_path` accept comma-delineated lists
of .pt/DeepSpeed OpenFold checkpoints and AlphaFold's .npz JAX parameter files, of .pt/DeepSpeed OpenFold checkpoints and AlphaFold's .npz JAX parameter files,
......
...@@ -962,6 +962,7 @@ def get_custom_template_features( ...@@ -962,6 +962,7 @@ def get_custom_template_features(
else: else:
logging.error("Custom template path %s does not exist", mmcif_path) logging.error("Custom template path %s does not exist", mmcif_path)
raise ValueError(f"Custom template path {mmcif_path} does not exist") raise ValueError(f"Custom template path {mmcif_path} does not exist")
warnings = [] warnings = []
template_features = dict() template_features = dict()
for template_path in template_paths: for template_path in template_paths:
...@@ -973,7 +974,6 @@ def get_custom_template_features( ...@@ -973,7 +974,6 @@ def get_custom_template_features(
mmcif_parse_result = mmcif_parsing.parse( mmcif_parse_result = mmcif_parsing.parse(
file_id=pdb_id, mmcif_string=cif_string file_id=pdb_id, mmcif_string=cif_string
) )
# chain_id defaults to A, should be changed?
template_sequence = mmcif_parse_result.mmcif_object.chain_to_seqres[chain_id] template_sequence = mmcif_parse_result.mmcif_object.chain_to_seqres[chain_id]
mapping = {x: x for x, _ in enumerate(template_sequence)} mapping = {x: x for x, _ in enumerate(template_sequence)}
...@@ -1200,7 +1200,7 @@ class HhsearchHitFeaturizer(TemplateHitFeaturizer): ...@@ -1200,7 +1200,7 @@ class HhsearchHitFeaturizer(TemplateHitFeaturizer):
class CustomHitFeaturizer(TemplateHitFeaturizer): class CustomHitFeaturizer(TemplateHitFeaturizer):
"""Featurizer for templates given in folder. """Featurizer for templates given in folder.
Chain of interest has to be chain A and of same residue size as input sequence.""" Chain of interest has to be chain A and of same sequence length as input sequence."""
def get_templates( def get_templates(
self, self,
query_sequence: str, query_sequence: str,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment