Metadata-Version: 2.1
Name: rf2t-micro
Version: 0.0.1
Summary: Stripped-down RosettaFold-2track.
Author-email: Eachan Johnson <eachan.johnson@crick.ac.uk>
License: MIT License
        
        Copyright (c) 2021 RosettaCommons
        
        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.
        
Project-URL: Homepage, https://github.com/scbirlab/sppid
Project-URL: Bug Tracker, https://github.com/scbirlab/sppid/issues
Keywords: science,biology,systems biology,biochemistry,machine learning,analysis,deep learning,rosettafold
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: carabiner-tools[mpl]
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: requests
Requires-Dist: tqdm

# 🌹 RoseTTAFold-2track micro 

![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/scbirlab/rf2t-micro/python-publish.yml)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/rf2t-micro)
![PyPI](https://img.shields.io/pypi/v/rf2t-micro)

Predict protein-protein interaction interfaces using deep learning.

**`rf2t-micro`** uses an implementation of [RoseTTAFold](https://github.com/RosettaCommons/RoseTTAFold)-2track with streamlined installation, a command-line interface, a Python API, and resilience to out-of-memory error. It takes (paired) multiple-sequence alignments in A3M format (as generated by tools like [`hhblits`](https://github.com/soedinglab/hh-suite)) as input, and outputs a matrix of inter-residue contacts.

## Installation

Obtaining and setting up `rf2t-micro` is easy.

```bash
$ pip install git+https://github.com/scbirlab/rf2t-micro
```

Using the embedded model requires using the [RoseTTAFold](https://github.com/RosettaCommons/RoseTTAFold)-2track weights. These are automatically downloaded, but by using `rf2t-micro` you agree that the trained weights for RoseTTAFold are made available for non-commercial use only under the terms of the [Rosetta-DL Software license](https://files.ipd.uw.edu/pub/RoseTTAFold/Rosetta-DL_LICENSE.txt).


## Usage

You can always get more help by running

```bash
$ rf2t-micro run --help
```

Once you have your (paired) MSA file in A3M format, you can run

```bash
$ rf2t-micro run msa-file.a3m --chain-a-length 224
```

It is required to specify the length of the first protein of the protein pair using the `--chain-a-length` option. If you haven't run the model before, the weights will be downloaded automatically which may take a few minutes.

By default, `rf2t-micro` tries to use GPU acceleration where available. To force only CPU use, use the `--cpu` option.

You can ask for visualisations of the residue interaction matrix by specifying `--plot output-directory`. You can use your own RF-2track parameters with the `--params param-file.npz` option.

## ... if you want larger scale and unpaired MSAs

The `rf2t-micro` package was made primarily to be a lightweight dependency of a portable `pip`-installable protein-protein interaction screening tool called [`yunta`](https://github.com/scbirlab/yunta), which in turn could be used in our [`nf-ggi` Nextflow pipeline](https://github.com/scbirlab/nf-ggi) so that HPC clusters could be conveniently used to screen for protein-protein interactions at scale. 

[`yunta`](https://github.com/scbirlab/yunta) provides a command-line interface and Python API for predicting protein-protein interactions using GPU-accelerated direct coupling analysis (DCA), RoseTTAFold-2track, and structures usign AlphaFold2 from unpaired MSAs. 

## Credit to performer-pytorch and SE(3)-Transformer codes

The code in the network/performer_pytorch.py is strongly based on [this repo](https://github.com/lucidrains/performer-pytorch) which is pytorch implementation of [Performer architecture](https://arxiv.org/abs/2009.14794).
The codes in network/equivariant_attention is from the original SE(3)-Transformer [repo](https://github.com/FabianFuchsML/se3-transformer-public) which accompanies [the paper](https://arxiv.org/abs/2006.10503) 'SE(3)-Transformers: 3D Roto-Translation Equivariant Attention Networks' by Fabian et al.


## References

M. Baek, et al., Accurate prediction of protein structures and interactions using a three-track neural network, _Science_ (2021). [link](https://www.science.org/doi/10.1126/science.abj8754)

I.R. Humphreys, J. Pei, M. Baek, A. Krishnakumar, et al, Computed structures of core eukaryotic protein complexes, _Science_ (2021). [link](https://www.science.org/doi/10.1126/science.abm4805)
