semvec/pypi-packages huggingface dataset:
retro-transformer 1.0.3
Easy-to-use Retrieval-Enhanced Transformer (Retro) implementation
Requires Python: >=3.6

![RETRO](data/RETRO.png)
# Retrieval-Enhanced Transformer (WIP)

Easy-to-use [Retro](https://arxiv.org/abs/2112.04426) implementation in PyTorch.

This code based on [labml.ai](https://nn.labml.ai/transformers/retro/index.html) and [accelerate](https://github.com/huggingface/accelerate) for light inference and training on CPUs, GPUs, TPUs.

```python
from retro_transformer.bert import BERTForChunkEmbeddings
from retro_transformer.tools.database import build_database, RetroIndex
from retro_transformer.tools.dataset import build_dataset
from retro_transformer.model import RetroModel, NearestNeighborEncoder
from retro_transformer.tools.train import train

chunk_len = 16
d_model = 128
d_ff = 512
n_heads = 16
d_k = 16
n_layers = 16
workspace = './workspace'
text_file = 'text.txt'

bert = BERTForChunkEmbeddings('bert-base-uncased', 'cuda')
index = RetroIndex(workspace, chunk_len, bert=bert)

build_database(workspace, text_file, bert=bert, chunk_len=chunk_len)
num_tokens = build_dataset(workspace, text_file, chunk_len=chunk_len, index=index)

nearest_neighbor_encoder = NearestNeighborEncoder(chunk_len=chunk_len, n_layers=n_layers,
                                                  d_model=d_model, d_ff=d_ff, n_heads=n_heads,
                                                  d_k=d_k, ca_layers={3})

model = RetroModel(n_vocab=num_tokens, d_model=d_model, n_layers=n_layers, chunk_len=chunk_len,
                   n_heads=n_heads, d_k=d_k, d_ff=d_ff, encoder=nearest_neighbor_encoder, ca_layers={3, 5})

train(model, workspace, text_file, chunk_len=chunk_len, d_model=d_model)
```
acrcas-ppi1 0.0.1
A package for predicting protein-protein interaction between CRISPR-associated protein (Cas) and Anti-CRISPR protein (acr).
Requires Python: >=3.9


acr_cas_ppi predicts protein-protein interaction between Anti-CRISPR protein (Acr) and CRISPR-associated protein (Cas), 
based on the machine learning algorithm.

***Input file:***
The user need to provide pairs of acr and cas protein as input. The first and second column should contain acr and cas 
protein, respecticely.
An example input file can be obtained from the given link https://github.com/snehaiasri/acrcasppi/blob/main/example.csv.

***Usage:***
After installation, perform the following steps to use the package

import the package
import acr_cas_ppi as acp

*save the input file as dataframe. Provide the full path of the input file.*
> df = pd.read_csv("example.csv")

*convert the df into numpy array*
> var = df.to_numpy()

*call the predict function*
> x = acp.predict(var)

*to call the predict_proba function*
> y = acp.predict_proba(var)

*call gen_file function to generate the output file (output.txt) in your current working directory*
> acp.gen_file(var)

***Help***
To see the documentation of each function, use help command. For example, help(acr_cas_ppi) or help(predict).

***Requirments***
Python >3.9,
numpy,
pickle-mixin
sklearn.