openprotein-python 0.16.1__tar.gz → 0.18.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/PKG-INFO +22 -10
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/README.md +11 -1
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/__init__.py +23 -6
- openprotein_python-0.18.0/openprotein/_deprecation.py +38 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/_version.py +0 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/align/__init__.py +2 -0
- openprotein_python-0.18.0/openprotein/align/_files.py +61 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/align/align.py +166 -120
- openprotein_python-0.18.0/openprotein/align/api.py +783 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/align/future.py +17 -1
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/align/msa.py +66 -9
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/align/schemas.py +86 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/auth_store.py +3 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/base.py +192 -40
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/clustering/__init__.py +10 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/clustering/api.py +21 -12
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/clustering/clustering.py +9 -14
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/clustering/models.py +11 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/clustering/schemas.py +10 -3
- openprotein_python-0.18.0/openprotein/codecs/__init__.py +55 -0
- openprotein_python-0.18.0/openprotein/codecs/_text.py +32 -0
- openprotein_python-0.18.0/openprotein/codecs/codec.py +22 -0
- openprotein_python-0.18.0/openprotein/codecs/msa.py +193 -0
- openprotein_python-0.18.0/openprotein/codecs/ndarray.py +34 -0
- openprotein_python-0.18.0/openprotein/codecs/prompt.py +226 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/common/__init__.py +10 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/common/features.py +2 -3
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/common/model_metadata.py +2 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/common/reduction.py +2 -2
- openprotein_python-0.16.1/openprotein/common/residue_contants.py → openprotein_python-0.18.0/openprotein/common/residue_constants.py +3 -0
- openprotein_python-0.18.0/openprotein/config.py +20 -0
- openprotein_python-0.18.0/openprotein/csv.py +48 -0
- openprotein_python-0.18.0/openprotein/data/__init__.py +24 -0
- openprotein_python-0.18.0/openprotein/data/_reads.py +24 -0
- openprotein_python-0.18.0/openprotein/data/_resource.py +307 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/data/api.py +40 -1
- openprotein_python-0.18.0/openprotein/data/assaydataset.py +314 -0
- openprotein_python-0.18.0/openprotein/data/data.py +170 -0
- openprotein_python-0.18.0/openprotein/data/msa/__init__.py +14 -0
- openprotein_python-0.18.0/openprotein/data/msa/_api.py +193 -0
- openprotein_python-0.18.0/openprotein/data/msa/msa.py +352 -0
- openprotein_python-0.18.0/openprotein/data/msa/schemas.py +38 -0
- openprotein_python-0.18.0/openprotein/data/prompts/__init__.py +10 -0
- openprotein_python-0.18.0/openprotein/data/prompts/_api.py +151 -0
- openprotein_python-0.18.0/openprotein/data/prompts/_replicates.py +28 -0
- openprotein_python-0.18.0/openprotein/data/prompts/prompts.py +250 -0
- openprotein_python-0.18.0/openprotein/data/prompts/schemas.py +43 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/data/schemas.py +14 -1
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/design/__init__.py +11 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/design/api.py +30 -15
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/design/design.py +3 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/design/future.py +4 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/design/schemas.py +49 -19
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/__init__.py +23 -0
- openprotein_python-0.18.0/openprotein/embeddings/ablang.py +59 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/api.py +47 -26
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/embeddings.py +49 -20
- openprotein_python-0.18.0/openprotein/embeddings/esm.py +70 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/future.py +23 -13
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/models.py +9 -14
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/openprotein.py +3 -1
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/poet.py +12 -9
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/poet2.py +33 -21
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/embeddings/schemas.py +11 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/errors.py +45 -12
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fasta.py +3 -1
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/__init__.py +15 -6
- openprotein_python-0.18.0/openprotein/fold/_request.py +181 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/alphafold2.py +8 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/api.py +32 -21
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/boltz.py +59 -20
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/common.py +100 -69
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/complex.py +4 -3
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/esmfold.py +8 -11
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/esmfold2.py +11 -10
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/fold.py +9 -6
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/future.py +57 -22
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/minifold.py +6 -6
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/models.py +53 -16
- openprotein_python-0.18.0/openprotein/fold/opendde.py +169 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/protenix.py +13 -5
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/fold/rosettafold3.py +14 -7
- openprotein_python-0.18.0/openprotein/fold/schemas.py +163 -0
- openprotein_python-0.18.0/openprotein/jobs/__init__.py +64 -0
- openprotein_python-0.18.0/openprotein/jobs/_api.py +125 -0
- openprotein_python-0.18.0/openprotein/jobs/_decode.py +29 -0
- openprotein_python-0.18.0/openprotein/jobs/_dispatch.py +126 -0
- openprotein_python-0.18.0/openprotein/jobs/_storage.py +150 -0
- openprotein_python-0.18.0/openprotein/jobs/_submission.py +42 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/jobs/api.py +33 -8
- openprotein_python-0.18.0/openprotein/jobs/futures.py +2016 -0
- openprotein_python-0.18.0/openprotein/jobs/jobs.py +238 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/jobs/schemas.py +99 -18
- openprotein_python-0.18.0/openprotein/models/__init__.py +187 -0
- openprotein_python-0.18.0/openprotein/models/_api.py +131 -0
- openprotein_python-0.18.0/openprotein/models/_folds.py +55 -0
- openprotein_python-0.18.0/openprotein/models/_inputs.py +247 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/__init__.py +16 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/_inputs.py +163 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/alphaflow.py +148 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/base.py +25 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/bioemu.py +109 -0
- openprotein_python-0.18.0/openprotein/models/ensemble/esmflow.py +122 -0
- openprotein_python-0.18.0/openprotein/models/estimators.py +400 -0
- openprotein_python-0.18.0/openprotein/models/folding/__init__.py +27 -0
- openprotein_python-0.18.0/openprotein/models/folding/alphafold2.py +14 -0
- openprotein_python-0.18.0/openprotein/models/folding/base.py +188 -0
- openprotein_python-0.18.0/openprotein/models/folding/boltz1.py +15 -0
- openprotein_python-0.18.0/openprotein/models/folding/boltz2.py +15 -0
- openprotein_python-0.18.0/openprotein/models/folding/esmfold.py +14 -0
- openprotein_python-0.18.0/openprotein/models/folding/esmfold2.py +15 -0
- openprotein_python-0.18.0/openprotein/models/folding/minifold.py +14 -0
- openprotein_python-0.18.0/openprotein/models/folding/opendde.py +15 -0
- openprotein_python-0.18.0/openprotein/models/folding/protenix.py +14 -0
- openprotein_python-0.18.0/openprotein/models/folding/protenix_v2.py +15 -0
- openprotein_python-0.18.0/openprotein/models/folding/rosettafold3.py +15 -0
- openprotein_python-0.18.0/openprotein/models/foundational/__init__.py +29 -0
- openprotein_python-0.18.0/openprotein/models/foundational/_inverse_folding.py +127 -0
- openprotein_python-0.18.0/openprotein/models/foundational/ablang2.py +14 -0
- openprotein_python-0.18.0/openprotein/models/foundational/base.py +122 -0
- openprotein_python-0.18.0/openprotein/models/foundational/esm1.py +16 -0
- openprotein_python-0.18.0/openprotein/models/foundational/esm2.py +16 -0
- openprotein_python-0.18.0/openprotein/models/foundational/esmc.py +15 -0
- openprotein_python-0.18.0/openprotein/models/foundational/esmif1.py +15 -0
- openprotein_python-0.18.0/openprotein/models/foundational/poet.py +196 -0
- openprotein_python-0.18.0/openprotein/models/foundational/poet2.py +212 -0
- openprotein_python-0.18.0/openprotein/models/foundational/proteinmpnn.py +44 -0
- openprotein_python-0.18.0/openprotein/models/foundational/protseq.py +15 -0
- openprotein_python-0.18.0/openprotein/models/foundational/prott5.py +14 -0
- openprotein_python-0.18.0/openprotein/models/foundational/rotaprot.py +15 -0
- openprotein_python-0.18.0/openprotein/models/generative/__init__.py +7 -0
- openprotein_python-0.18.0/openprotein/models/generative/base.py +48 -0
- openprotein_python-0.18.0/openprotein/models/generative/boltzgen.py +15 -0
- openprotein_python-0.18.0/openprotein/models/generative/rfdiffusion.py +15 -0
- openprotein_python-0.18.0/openprotein/models/gp.py +270 -0
- openprotein_python-0.18.0/openprotein/models/kernels.py +159 -0
- openprotein_python-0.18.0/openprotein/models/model.py +261 -0
- openprotein_python-0.18.0/openprotein/models/models.py +460 -0
- openprotein_python-0.18.0/openprotein/models/schemas.py +178 -0
- openprotein_python-0.18.0/openprotein/models/structure_generation.py +113 -0
- openprotein_python-0.18.0/openprotein/models/svd.py +256 -0
- openprotein_python-0.18.0/openprotein/models/umap.py +118 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/__init__.py +11 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/chains.py +23 -23
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/complex.py +165 -75
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/protein.py +72 -74
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/structure.py +9 -7
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/molecules/template.py +8 -6
- openprotein_python-0.18.0/openprotein/predictor/__init__.py +80 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/api.py +70 -30
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/models.py +104 -4
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/prediction.py +10 -6
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/predictor.py +15 -10
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/schemas.py +19 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/predictor/validate.py +14 -16
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/prompt/__init__.py +10 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/prompt/api.py +138 -43
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/prompt/models.py +27 -10
- openprotein_python-0.18.0/openprotein/prompt/prompt.py +275 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/prompt/schemas.py +10 -6
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/svd/__init__.py +9 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/svd/api.py +21 -11
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/svd/models.py +15 -15
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/svd/schemas.py +2 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/svd/svd.py +5 -3
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/umap/__init__.py +9 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/umap/api.py +27 -17
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/umap/models.py +2 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/umap/schemas.py +2 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/umap/umap.py +8 -6
- openprotein_python-0.18.0/openprotein/utils/__init__.py +1 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/utils/chain_id.py +3 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/utils/cif.py +8 -2
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/utils/numpy.py +3 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/openprotein/utils/sequence.py +14 -2
- openprotein_python-0.18.0/openprotein/utils/uuid.py +58 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/pyproject.toml +24 -20
- openprotein_python-0.16.1/openprotein/align/api.py +0 -430
- openprotein_python-0.16.1/openprotein/chains.py +0 -12
- openprotein_python-0.16.1/openprotein/config.py +0 -9
- openprotein_python-0.16.1/openprotein/csv.py +0 -31
- openprotein_python-0.16.1/openprotein/data/__init__.py +0 -9
- openprotein_python-0.16.1/openprotein/data/assaydataset.py +0 -178
- openprotein_python-0.16.1/openprotein/data/data.py +0 -103
- openprotein_python-0.16.1/openprotein/embeddings/ablang.py +0 -21
- openprotein_python-0.16.1/openprotein/embeddings/esm.py +0 -36
- openprotein_python-0.16.1/openprotein/fold/schemas.py +0 -40
- openprotein_python-0.16.1/openprotein/jobs/__init__.py +0 -9
- openprotein_python-0.16.1/openprotein/jobs/futures.py +0 -808
- openprotein_python-0.16.1/openprotein/jobs/jobs.py +0 -88
- openprotein_python-0.16.1/openprotein/models/__init__.py +0 -27
- openprotein_python-0.16.1/openprotein/models/base.py +0 -63
- openprotein_python-0.16.1/openprotein/models/foundation/boltzgen.py +0 -298
- openprotein_python-0.16.1/openprotein/models/foundation/boltzgen_schema.py +0 -389
- openprotein_python-0.16.1/openprotein/models/foundation/esmif1.py +0 -213
- openprotein_python-0.16.1/openprotein/models/foundation/proteinmpnn.py +0 -193
- openprotein_python-0.16.1/openprotein/models/foundation/rfdiffusion.py +0 -288
- openprotein_python-0.16.1/openprotein/models/foundation/solublempnn.py +0 -25
- openprotein_python-0.16.1/openprotein/models/models.py +0 -42
- openprotein_python-0.16.1/openprotein/models/structure_generation.py +0 -52
- openprotein_python-0.16.1/openprotein/predictor/__init__.py +0 -26
- openprotein_python-0.16.1/openprotein/prompt/prompt.py +0 -176
- openprotein_python-0.16.1/openprotein/protein.py +0 -12
- openprotein_python-0.16.1/openprotein/scaffolds.py +0 -8
- openprotein_python-0.16.1/openprotein/utils/__init__.py +0 -0
- openprotein_python-0.16.1/openprotein/utils/uuid.py +0 -29
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/.gitignore +0 -0
- {openprotein_python-0.16.1 → openprotein_python-0.18.0}/LICENSE.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: openprotein-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.0
|
|
4
4
|
Summary: OpenProtein Python interface.
|
|
5
5
|
Author-email: Mark Gee <markgee@ne47.bio>, "Timothy Truong Jr." <ttruong@ne47.bio>, Tristan Bepler <tbepler@ne47.bio>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -8,14 +8,16 @@ License-File: LICENSE.txt
|
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Requires-Python: <3.15,>=3.10
|
|
11
|
-
Requires-Dist: filelock
|
|
11
|
+
Requires-Dist: filelock>=3.13
|
|
12
12
|
Requires-Dist: gemmi<0.8,>=0.6.0
|
|
13
|
-
Requires-Dist: numpy
|
|
14
|
-
Requires-Dist: pandas
|
|
15
|
-
Requires-Dist: pydantic
|
|
16
|
-
Requires-Dist: requests
|
|
17
|
-
Requires-Dist: tomli
|
|
18
|
-
Requires-Dist: tqdm
|
|
13
|
+
Requires-Dist: numpy>=1.9
|
|
14
|
+
Requires-Dist: pandas>=2.2.2
|
|
15
|
+
Requires-Dist: pydantic>=2.5
|
|
16
|
+
Requires-Dist: requests>=2.32.3
|
|
17
|
+
Requires-Dist: tomli>=2.3.0
|
|
18
|
+
Requires-Dist: tqdm>=4.66.4
|
|
19
|
+
Provides-Extra: msa
|
|
20
|
+
Requires-Dist: pyarrow>=14; extra == 'msa'
|
|
19
21
|
Description-Content-Type: text/markdown
|
|
20
22
|
|
|
21
23
|
[](https://pypi.org/project/openprotein-python/)
|
|
@@ -95,9 +97,10 @@ result = future.get(verbose=True) # get the result from a finished job
|
|
|
95
97
|
## Jobs Interface
|
|
96
98
|
|
|
97
99
|
### Listing Jobs
|
|
98
|
-
To view all jobs associated with each session, the following method is available, providing an option to filter results by date, job type, or
|
|
100
|
+
To view all jobs associated with each session, the following method is available, providing an option to filter results by date, job type, status, or name.
|
|
99
101
|
```
|
|
100
102
|
session.jobs.list()
|
|
103
|
+
session.jobs.list(name="my-run") # filter to jobs with an exact name match
|
|
101
104
|
```
|
|
102
105
|
|
|
103
106
|
### Retrieving Specific Job
|
|
@@ -106,6 +109,15 @@ For detailed information about a particular job, use the following command with
|
|
|
106
109
|
session.jobs.get(JOB_ID) # Replace JOB_ID with the ID of the specific job to be retrieved
|
|
107
110
|
```
|
|
108
111
|
|
|
112
|
+
### Naming Jobs
|
|
113
|
+
A job can be given a name and description once it's created, to make it easier to find:
|
|
114
|
+
```
|
|
115
|
+
session.jobs.update(JOB_ID, name="my-run", description="baseline model")
|
|
116
|
+
|
|
117
|
+
# equivalent, from a Future
|
|
118
|
+
future.rename(name="my-run", description="baseline model")
|
|
119
|
+
```
|
|
120
|
+
|
|
109
121
|
### Resuming Jobs
|
|
110
122
|
Jobs from prior workflows can be resumed using the load_job method provided by each API.
|
|
111
123
|
```
|
|
@@ -75,9 +75,10 @@ result = future.get(verbose=True) # get the result from a finished job
|
|
|
75
75
|
## Jobs Interface
|
|
76
76
|
|
|
77
77
|
### Listing Jobs
|
|
78
|
-
To view all jobs associated with each session, the following method is available, providing an option to filter results by date, job type, or
|
|
78
|
+
To view all jobs associated with each session, the following method is available, providing an option to filter results by date, job type, status, or name.
|
|
79
79
|
```
|
|
80
80
|
session.jobs.list()
|
|
81
|
+
session.jobs.list(name="my-run") # filter to jobs with an exact name match
|
|
81
82
|
```
|
|
82
83
|
|
|
83
84
|
### Retrieving Specific Job
|
|
@@ -86,6 +87,15 @@ For detailed information about a particular job, use the following command with
|
|
|
86
87
|
session.jobs.get(JOB_ID) # Replace JOB_ID with the ID of the specific job to be retrieved
|
|
87
88
|
```
|
|
88
89
|
|
|
90
|
+
### Naming Jobs
|
|
91
|
+
A job can be given a name and description once it's created, to make it easier to find:
|
|
92
|
+
```
|
|
93
|
+
session.jobs.update(JOB_ID, name="my-run", description="baseline model")
|
|
94
|
+
|
|
95
|
+
# equivalent, from a Future
|
|
96
|
+
future.rename(name="my-run", description="baseline model")
|
|
97
|
+
```
|
|
98
|
+
|
|
89
99
|
### Resuming Jobs
|
|
90
100
|
Jobs from prior workflows can be resumed using the load_job method provided by each API.
|
|
91
101
|
```
|
|
@@ -26,6 +26,27 @@ from openprotein.design import DesignAPI
|
|
|
26
26
|
from openprotein.jobs import Future
|
|
27
27
|
from openprotein.base import APISession
|
|
28
28
|
|
|
29
|
+
__all__ = [
|
|
30
|
+
"SVDAPI",
|
|
31
|
+
"UMAPAPI",
|
|
32
|
+
"APISession",
|
|
33
|
+
"AlignAPI",
|
|
34
|
+
"ClusteringAPI",
|
|
35
|
+
"DataAPI",
|
|
36
|
+
"DeprecationError",
|
|
37
|
+
"DesignAPI",
|
|
38
|
+
"EmbeddingsAPI",
|
|
39
|
+
"FoldAPI",
|
|
40
|
+
"Future",
|
|
41
|
+
"JobsAPI",
|
|
42
|
+
"ModelsAPI",
|
|
43
|
+
"OpenProtein",
|
|
44
|
+
"PredictorAPI",
|
|
45
|
+
"PromptAPI",
|
|
46
|
+
"__version__",
|
|
47
|
+
"connect",
|
|
48
|
+
]
|
|
49
|
+
|
|
29
50
|
|
|
30
51
|
class OpenProtein(APISession):
|
|
31
52
|
"""
|
|
@@ -102,9 +123,7 @@ class OpenProtein(APISession):
|
|
|
102
123
|
|
|
103
124
|
@property
|
|
104
125
|
def svd(self) -> SVDAPI:
|
|
105
|
-
"""
|
|
106
|
-
The embedding submodule gives access to protein embedding models and their inference endpoints.
|
|
107
|
-
"""
|
|
126
|
+
"""Fit and apply SVD projections through the SVD API."""
|
|
108
127
|
if self._svd is None:
|
|
109
128
|
self._svd = SVDAPI(
|
|
110
129
|
session=self,
|
|
@@ -113,9 +132,7 @@ class OpenProtein(APISession):
|
|
|
113
132
|
|
|
114
133
|
@property
|
|
115
134
|
def umap(self) -> UMAPAPI:
|
|
116
|
-
"""
|
|
117
|
-
The embedding submodule gives access to protein embedding models and their inference endpoints.
|
|
118
|
-
"""
|
|
135
|
+
"""Fit and apply UMAP projections through the UMAP API."""
|
|
119
136
|
if self._umap is None:
|
|
120
137
|
self._umap = UMAPAPI(
|
|
121
138
|
session=self,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Helper for deprecating public interfaces."""
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def warn_deprecated(
|
|
7
|
+
name: str,
|
|
8
|
+
use: str,
|
|
9
|
+
*,
|
|
10
|
+
since: str,
|
|
11
|
+
removed_in: str,
|
|
12
|
+
stacklevel: int = 3,
|
|
13
|
+
) -> None:
|
|
14
|
+
"""
|
|
15
|
+
Warn that a public interface is deprecated.
|
|
16
|
+
|
|
17
|
+
The default ``stacklevel`` points the warning at the caller of the
|
|
18
|
+
deprecated function that calls this helper.
|
|
19
|
+
|
|
20
|
+
Parameters
|
|
21
|
+
----------
|
|
22
|
+
name : str
|
|
23
|
+
Name of the deprecated interface.
|
|
24
|
+
use : str
|
|
25
|
+
The replacement, already formatted for display.
|
|
26
|
+
since : str
|
|
27
|
+
Version the interface was deprecated in.
|
|
28
|
+
removed_in : str
|
|
29
|
+
Version the interface is removed in.
|
|
30
|
+
stacklevel : int, default=3
|
|
31
|
+
Stack level passed to `warnings.warn`.
|
|
32
|
+
"""
|
|
33
|
+
warnings.warn(
|
|
34
|
+
f"`{name}` is deprecated since {since} and will be removed in {removed_in}. "
|
|
35
|
+
f"Use {use}.",
|
|
36
|
+
FutureWarning,
|
|
37
|
+
stacklevel=stacklevel,
|
|
38
|
+
)
|
|
@@ -8,8 +8,6 @@ def _get_hatch_version():
|
|
|
8
8
|
"""Compute the most up-to-date version number in a development environment.
|
|
9
9
|
|
|
10
10
|
Returns `None` if Hatchling is not installed, e.g. in a production environment.
|
|
11
|
-
|
|
12
|
-
For more details, see <https://github.com/maresb/hatch-vcs-footgun-example/>.
|
|
13
11
|
"""
|
|
14
12
|
import os
|
|
15
13
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Sequence files read by the deprecated align methods."""
|
|
2
|
+
|
|
3
|
+
import csv
|
|
4
|
+
|
|
5
|
+
from openprotein import fasta
|
|
6
|
+
from openprotein.errors import InvalidParameterError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def read_file_content(file) -> bytes | bytearray | str:
|
|
10
|
+
"""Read the sequence file a deprecated align method was given.
|
|
11
|
+
|
|
12
|
+
Accepts a file-like object, ``bytes``, ``bytearray``, ``str`` or a
|
|
13
|
+
``(filename, fileobj)`` / ``(filename, fileobj, content_type)`` tuple or list.
|
|
14
|
+
"""
|
|
15
|
+
if isinstance(file, (tuple, list)):
|
|
16
|
+
file = file[1]
|
|
17
|
+
return file.read() if hasattr(file, "read") else file
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def read_sequences(
|
|
21
|
+
content: bytes | bytearray | str,
|
|
22
|
+
) -> tuple[list[str], list[str] | None]:
|
|
23
|
+
"""Parse FASTA or headerless CSV text into sequences and optional names."""
|
|
24
|
+
if isinstance(content, (bytes, bytearray)):
|
|
25
|
+
content = content.decode("utf-8-sig")
|
|
26
|
+
text = content.removeprefix("\ufeff")
|
|
27
|
+
lines = text.splitlines()
|
|
28
|
+
if any(line.lstrip().startswith(">") for line in lines):
|
|
29
|
+
parsed_names, parsed_sequences = fasta.parse(lines)
|
|
30
|
+
names: list[str] | None = []
|
|
31
|
+
sequences: list[str] = []
|
|
32
|
+
for name, sequence in zip(parsed_names, parsed_sequences):
|
|
33
|
+
if sequence.strip():
|
|
34
|
+
names.append(str(name))
|
|
35
|
+
sequences.append(str(sequence))
|
|
36
|
+
else:
|
|
37
|
+
rows = []
|
|
38
|
+
width = 1
|
|
39
|
+
for row in csv.reader(text.splitlines(keepends=True)):
|
|
40
|
+
trimmed = row.copy()
|
|
41
|
+
while trimmed and not trimmed[-1].strip():
|
|
42
|
+
trimmed.pop()
|
|
43
|
+
if trimmed:
|
|
44
|
+
rows.append(row)
|
|
45
|
+
width = max(width, len(trimmed))
|
|
46
|
+
if width > 2:
|
|
47
|
+
raise InvalidParameterError(
|
|
48
|
+
"CSV must have one sequence column or name and sequence columns."
|
|
49
|
+
)
|
|
50
|
+
names = None if width == 1 else []
|
|
51
|
+
sequences = []
|
|
52
|
+
for row in rows:
|
|
53
|
+
sequence = row[1] if names is not None and len(row) > 1 else row[0]
|
|
54
|
+
if not sequence.strip():
|
|
55
|
+
continue
|
|
56
|
+
sequences.append(sequence.strip())
|
|
57
|
+
if names is not None:
|
|
58
|
+
names.append(row[0].strip() if len(row) > 1 else "")
|
|
59
|
+
if not sequences:
|
|
60
|
+
raise InvalidParameterError("The file contains no sequences.")
|
|
61
|
+
return sequences, names
|