Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added GFP CBas documentation #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/protein-optimization/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ Solvent accessibility of mutations of a wildtype using `foldx`
Rapid Stability Predictions of single mutations from a wildtype. [WIP]
:::

:::{grid-item-card} RFP Fluorescence Protein Stability (using `lambo`)
:link: ./using_poli/objective_repository/foldx_rfp_lambo.html
:columns: 6
LaMBO Fluorescence (RFP) by stability and solvent-accessible surface area.
:::

:::{grid-item-card} Protein Fluorescence (using `CBas`) [WIP]
:link: ./using_poli/objective_repository/gfp_cbas.html
:columns: 6
Surrogate fluorescence prediction of mutations from a GFP sequence. [WIP]
:::

::::


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ Pdb total energy Backbone Hbond Sidechain Hbond Van der Waals Electrostatics Sol
WT_101m_Repair_1.pdb -34.3436 -141.831 -47.9784 -179.662 -8.13848 243.99 -239.232 3.40664 105.266 231.722 0 0 0 5.28162 157.882 -8.73035 0 0 0 0 1.56224 0
101m_Repair_1.pdb -31.7457 -141.841 -48.2413 -177.827 -8.5183 243.998 -235.896 3.3294 104.051 231.196 0 0 0 5.25497 157.841 -8.81857 0 0 0 0 1.5666 0
WT_101m_Repair_1.pdb -34.3436 -141.831 -47.9784 -179.662 -8.13848 243.99 -239.232 3.40664 105.266 231.722 0 0 0 5.28162 157.882 -8.73035 0 0 0 0 1.56224 0
101m_Repair_1.pdb -31.7457 -141.841 -48.2413 -177.827 -8.5183 243.998 -235.896 3.3294 104.051 231.196 0 0 0 5.25497 157.841 -8.81857 0 0 0 0 1.5666 0
WT_101m_Repair_1.pdb -34.3436 -141.831 -47.9784 -179.662 -8.13848 243.99 -239.232 3.40664 105.266 231.722 0 0 0 5.28162 157.882 -8.73035 0 0 0 0 1.56224 0
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Rapid Stability Predictions of single mutations from a wildtype. [WIP]
LaMBO Fluorescence (RFP) by stability and solvent-accessible surface area.
:::

:::{grid-item-card} GFP Fluorescence Protein Surrogate (using `CBas`)
:link: ./using_poli/objective_repository/gfp_cbas.html
:columns: 6
CBas Fluorescence (GFP) median brightness by latent encoding surrogate under the assumption that the encoder mean correlates sufficiently with target brightness.
:::

::::

### Other
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Protein Fluorescence (using `CBas`)
![Type of objective function: discrete](https://img.shields.io/badge/Type-discrete_inputs-blue)
![Environment to run this objective function: poli protein_cbas](https://img.shields.io/badge/Environment-poli____protein-teal
)

[TODO: revise]

## About

This objective function returns the mean encoding (i.e. median brightness surrogate) using `CBas`.

## Prerequisites

- Assets: GFP dataframe, and model checkpoints as provided in the `poli` module

## How to run

You can either run this objective function in your current environment (assuming that you have the correct dependencies installed), or you can run it in an isolated environment.

::::{tab-set}

:::{tab-item} In current environment

You will have to install the following dependencies:

```bash
pip install biopython python-levenshtein numpy pandas scipy torch torchvision torchaudio keras-core tensorflow
```

Then run

```python
from pathlib import Path

import numpy as np

from poli import objective_factory

# How to create
f, x0, y0 = objective_factory.create(
name="gfp_cbas",
)

# Example input:
print(x0)

# Querying:
print(y0) # The encoding of the first batch of GFP sequences
```

:::

:::{tab-item} In isolation

If you want us to handle dependencies, run

```python
from pathlib import Path

import numpy as np

from poli import objective_factory

# How to create
f, x0, y0 = objective_factory.create(
name="gfp_cbas",
wildtype_pdb_file=wildtype_pdb_file,
force_register=True,
)

# Example input:
print(x0)

# Querying:
print(y0) # The stability of your wildtype
```

```{warning}
Registering the objective function in this way will create a `conda` environment called `poli__protein_cbas` with the relevant dependencies.
```

:::

::::