Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ncfrey committed Feb 27, 2024
1 parent 63ddd22 commit e6e7e84
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 322 deletions.
53 changes: 29 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LOBSTER
# LOBSTER 🦞
**L**anguage m**O**dels for **B**iological **S**equence **T**ransformation and **E**volutionary **R**epresentation

## A language model library for rapid pre-training from scratch.
Expand Down Expand Up @@ -43,10 +43,9 @@ causal_language_model = PrescientPCLM.load_from_checkpoint(<path to ckpt>)
TODO: update

**Datasets**
- all models are trained on heavy and light chains separately, no pairing
- public antibodies: antiberty dataset (paired and unpaired OAS)
- private antibodies: all tenx (paired) and bulk (unpaired) ngs data
- aho: these models expect aho aligned inputs from anarci
- all antibody models are trained on heavy and light chains separately, no pairing
- antibodies: antiberty dataset (paired and unpaired OAS)
- aho: these models expect aho aligned antibody inputs from anarci
- uniref50: general protein universe
- pdb complexes: pdb sequences with `.` tokens indicating complexes

Expand Down Expand Up @@ -92,22 +91,28 @@ To train an MLM on a fasta file of sequences on an interactive GPU node, cd into
lobster_train data.path_to_fasta="test_data/query.fasta" logger=csv paths.root_dir="."
```

## License
Copyright © 2024 Genentech, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Contributing
Contributions are welcome! We ask that all users and contributors remember that the LOBSTER team are all full-time drug hunters, and our open-source efforts are a labor of love because we care deeply about open science and scientific progress.

### Install dev requirements and pre-commit hooks

```bash
python -m pip install -r requirements-dev.in
pre-commit install
```

### Testing

```bash
python -m pytest -v --cov-report term-missing --cov=./lobster ./tests
```

### Build and browse docs locally

```bash
make -C docs html
cd docs/build/html
python -m http.server
```

Then open `http://localhost:8000` in your browser.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
28 changes: 28 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "lobster"
copyright = "2024, Nathan C. Frey"
author = "Nathan C. Frey"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["autoapi.extension", "sphinx.ext.napoleon"]

templates_path = ["_templates"]
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]

autoapi_dirs = ["../../src/lobster"]
3 changes: 3 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ mypy
pytest
pytest-cov
pre-commit
sphinx
sphinx-rtd-theme
sphinx-autoapi
Empty file removed src/lobster/deployment/__init__.py
Empty file.
111 changes: 0 additions & 111 deletions src/lobster/deployment/classification_esm2.py

This file was deleted.

118 changes: 0 additions & 118 deletions src/lobster/deployment/embedding.py

This file was deleted.

Loading

0 comments on commit e6e7e84

Please sign in to comment.