filter
Filter subcommands for protein-quest.
chain(chains, input_dir, output_dir, /, *, chain_system='auth', scheduler_address=None, cache=None, force=False, _=None)
Filter on chain.
For each input PDB/mmCIF and chain combination write a PDB/mmCIF file with just the given chain
and rename it to chain A. Filtering is done in parallel using a Dask cluster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chains
|
InputFile
|
CSV file with |
required |
input_dir
|
InputDir
|
Directory with PDB/mmCIF files.
Expected filenames are |
required |
output_dir
|
OutputDir
|
Directory to write the single-chain PDB/mmCIF files. Output files are in same format as input files. |
required |
chain_system
|
ChainIdSystem
|
System of chain ids in the input CSV. Set to 'label' to use chain ids assigned by PDB. See docs for more information on chain id system. |
'auth'
|
force
|
Annotated[bool, Parameter(negative='')]
|
If not set and given chain exists and is only one, then file is copied unchanged. If set always rewrites and overwrites output files. |
False
|
scheduler_address
|
str | None
|
Address of the Dask scheduler to connect to.
If not provided, will create a local cluster.
If set to |
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
combined(input_dir, quality_json, output_dir, /, *, filters=None, write_stats=None, scheduler_address=None, cache=None, _=None)
Filter PDB/mmCIF files using a combination of filters.
This command is a combination of the protein-quest filter confidence, protein-quest filter residue,
protein-quest filter resolution, and protein-quest filter pdbe-quality commands.
As each of those commands accepts a certain source/method of structures.
This command accepts all sources/methods of structures and applies the appropriate filters to each.
For details about filtering see the documentation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with PDB/mmCIF files. |
required |
quality_json
|
InputFile
|
JSON file with PDBe quality scores.
Can be made with |
required |
output_dir
|
OutputDir
|
Directory to write filtered PDB/mmCIF files. Files are copied without modification. |
required |
filters
|
CombinedFilterQuery | None
|
Combined filtering criteria. |
None
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with columns:
|
None
|
scheduler_address
|
str | None
|
Address of the Dask scheduler to connect to.
If not provided, will create a local cluster.
If set to |
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
confidence(input_dir, output_dir, /, *, filters=None, write_stats=None, scheduler_address=None, cache=None, _=None)
Filter AlphaFold mmcif/PDB files by confidence (plDDT).
Filter AlphaFold mmcif/PDB files by confidence (plDDT). Passed files are written with residues below threshold removed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with AlphaFold mmcif/PDB files. |
required |
output_dir
|
OutputDir
|
Directory to write filtered mmcif/PDB files. |
required |
filters
|
ConfidenceFilterQuery | None
|
Confidence filtering criteria. |
None
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with |
None
|
scheduler_address
|
str | None
|
Address of the Dask scheduler to connect to.
If not provided, will create a local cluster.
If set to |
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
pdbe_quality(input_dir, quality_json, output_dir, /, *, minimal_geometry_quality=50.0, top=None, cluster_by_uniprot_accession_and_coverage=0, pass_given_resolution=False, scheduler_address=None, write_stats=None, cache=None, _=None)
Filter PDB/mmCIF files by PDBe quality scores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with PDB/mmCIF files. |
required |
quality_json
|
InputFile
|
JSON file with PDBe quality scores.
Can be made with |
required |
output_dir
|
OutputDir
|
Directory to write filtered PDB/mmCIF files. Files are copied without modification. |
required |
minimal_geometry_quality
|
float
|
Minimal geometry quality score to pass the filter. |
50.0
|
top
|
PositiveInt | None
|
Maximum number of structures to keep, ranked by geometry quality (best first).
When used with |
None
|
cluster_by_uniprot_accession_and_coverage
|
NonNegativeInt
|
Number of top structures to keep per UniProt cluster. Structures are grouped by UniProt accession, then clustered by residue-range overlap. |
0
|
pass_given_resolution
|
Annotated[bool, Parameter(negative='')]
|
If set will passthrough files that have a valid resolution. |
False
|
scheduler_address
|
str | None
|
Address of the Dask scheduler to connect to.
If not provided, will create a local cluster.
If set to |
None
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with columns:
|
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
residue(input_dir, output_dir, /, *, min_residues=0, max_residues=10000000, write_stats=None, cache=None, _=None)
Filter PDB/mmCIF files by number of residues in chain A.
Filter PDB/mmCIF files by number of residues in chain A.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with PDB/mmCIF files (for example from 'filter chain'). |
required |
output_dir
|
OutputDir
|
Directory to write filtered PDB/mmCIF files. Files are copied without modification. |
required |
min_residues
|
MinResidues
|
Min residues in chain A. |
0
|
max_residues
|
MaxResidues
|
Max residues in chain A. |
10000000
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with |
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
resolution(input_dir, output_dir, /, *, no_group_by_uniprot_accession=False, top=1000, no_coverage=False, min_sequence_identity=1.0, lax=False, scheduler_address=None, write_stats=None, cache=None, _=None)
Filter structure files by best resolution.
- Structures with no resolution and no Uniprot accession are discarded.
- Structures with lower resolution are preferred.
- If resolution is the same, structures with more residues are preferred.
- If resolution is missing, those structures are undesirable.
- Structures with low sequence identity (smaller than 1) are undesirable.
- Structures are grouped by Uniprot accession and then clustered by their coverage of the Uniprot sequence
(can be disabled with
--no-group-by-uniprot-accessionand--no-coverage).
To see how clustering was done use protein-quest convert clusters command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory structure files. |
required |
output_dir
|
OutputDir
|
Directory to write the selected structure files. |
required |
no_group_by_uniprot_accession
|
Annotated[bool, Parameter(negative='')]
|
Disable grouping by Uniprot accession and use global top-N ranking across all files. |
False
|
top
|
PositiveInt
|
Maximum number of files to keep. |
1000
|
no_coverage
|
Annotated[bool, Parameter(negative='')]
|
If not set, will take top by first grouping by uniprot accession and then clustering files by their coverage and then take the top. See clustering documentation for details on the clustering and ordering criteria. If set will sort files per Uniprot accession by just their resolution. |
False
|
min_sequence_identity
|
NormFloat
|
Minimum sequence identity ratio to the Uniprot sequence for a structure to be passed. If not set then discards structures that are not fully identical to the Uniprot sequence. For example if set to 0.8 then structures that have sequence identity below 0.8 are discarded. |
1.0
|
lax
|
Annotated[bool, Parameter(negative='')]
|
If set will passthrough files that do not have valid resolution, regardless of other flags like --top. By default filter is applied strictly and those files are discarded. Useful if you have a directory with files from different sources/methods and want to call multiple filters sequentially to discard files gradually. |
False
|
scheduler_address
|
str | None
|
Address of the Dask scheduler to connect to.
If not provided, will create a local cluster.
If set to |
None
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with columns:
|
None
|
cache
|
CacheParameter | None
|
Cache options |
None
|
_
|
Common | None
|
Common CLI options. |
None
|
secondary_structure(input_dir, output_dir, /, *, filters=None, write_stats=None, cache=None, _=None)
Filter PDB/mmCIF files by secondary structure.
Filter PDB/mmCIF files by secondary structure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with PDB/mmCIF files. |
required |
output_dir
|
OutputDir
|
Directory to write filtered PDB/mmCIF files. Files are copied without modification. |
required |
filters
|
SecondaryStructureFilterQuery | None
|
Secondary structure filtering criteria. |
None
|
write_stats
|
OutputFile | None
|
Write filter statistics to file.
In CSV format with columns:
|
None
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_
|
Common | None
|
Common CLI options. |
None
|