convert
Convert subcommands for protein-quest.
clusters(input_dir, output_file, /, *, stats=None, condensed_distances=None, linkage_matrix=None, dendrogram=None, scheduler_address=None, _common=None)
Group structures per UniProt accession and cluster based on coverage.
Always writes one CSV file:
output_file: one row per structure with cluster assignment.
Can be used to investigate why protein-quest filter resolution ... or
protein-quest search pdbe --top_clustered_resolution_per_uniprot_accession ... or
protein-quest search structure --top_clustered_resolution_per_uniprot_accession ...
keeps or discards certain structures
by checking their intermediate cluster assignments and statistics.
See clustering documentation for details on the clustering and ordering criteria.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with structure files. |
required |
output_file
|
OutputFile
|
Output CSV file with cluster assignments. |
required |
stats
|
OutputFile | None
|
Optional output CSV file with per-accession cluster summary. Only written when provided. |
None
|
condensed_distances
|
OutputFile | None
|
Optional output CSV file with condensed distances from all accessions.
Writes a single file with |
None
|
linkage_matrix
|
OutputFile | None
|
Optional output CSV file with linkage rows from all accessions.
Writes a single file with |
None
|
dendrogram
|
OutputDir | None
|
Optional output directory for per-accession Newick files.
Writes |
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
|
_common
|
Common | None
|
Common CLI options. |
None
|
structures(input_dir, /, *, output_dir=None, output_format='.cif.gz', uniprots=None, chain_system='auth', cache=None, _common=None)
Convert structure files between formats.
Convert structure files between formats.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with structure files. Supported extensions are .pdb, .pdb.gz, .ent, .ent.gz, .cif, .cif.gz, .bcif, .bcif.gz. |
required |
output_dir
|
OutputDir | None
|
Directory to write converted structure files. If not given, files are written to input_dir. |
None
|
uniprots
|
InputFile | None
|
Supply Uniprot to PDB id and chain mappings.
Adds UniProt accessions to structures that are missing them based on the provided mapping.
The supplied file must be in CSV format with 3 columns: |
None
|
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'
|
output_format
|
CifOutputFormat
|
Output format for converted files. Supported values are .cif and .cif.gz. |
'.cif.gz'
|
cache
|
CacheParameter | None
|
Cache options including no_cache, cache_dir, and copy_method. |
None
|
_common
|
Common | None
|
Common CLI options. |
None
|
uniprot(input_dir, output, /, *, grouped=False, _common=None)
Convert structure files to list of UniProt accessions.
UniProt accessions are read from database reference of each structure.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dir
|
InputDir
|
Directory with structure files. Supported extensions are .cif, .cif.gz, .pdb, .pdb.gz. |
required |
output
|
OutputFile
|
Output text file with UniProt accessions (one per line). Use '-' for stdout. |
required |
grouped
|
Annotated[bool, Parameter(negative='')]
|
Whether to group accessions by structure file.
If set output changes to |
False
|
_common
|
Common | None
|
Common CLI options. |
None
|