semvec/pypi-packages huggingface dataset:
splendaq 0.9.0
Generalized offline data acquisition with a focus on the Moku
License: MIT
Requires Python: >=3.6

# `splendaq`

[![Python package](https://github.com/splendor-collab/splendaq/actions/workflows/python-package.yml/badge.svg)](https://github.com/splendor-collab/splendaq/actions/workflows/python-package.yml) [![PyPI](https://img.shields.io/pypi/v/splendaq)](https://pypi.org/project/splendaq/) [![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/) [![GitHub](https://img.shields.io/github/license/splendor-collab/splendaq)](https://github.com/splendor-collab/splendaq/blob/main/LICENSE) [![arXiv](https://img.shields.io/badge/arXiv-2310.01279-<COLOR>.svg)](https://arxiv.org/abs/2310.01279)


Package for general data acquisition with a focus on the Moku device by [Liquid Instruments](https://www.liquidinstruments.com/).

If you use this package for your research, please cite our paper as below:
```
@article{Watkins:2023rgt,
    author = "Watkins, Samuel L.",
    title = "{SPLENDAQ: A Detector-Agnostic Data Acquisition System for Small-Scale Physics Experiments}",
    eprint = "2310.01279",
    archivePrefix = "arXiv",
    primaryClass = "physics.ins-det",
    reportNumber = "LA-UR-23-31174",
    doi = "10.1007/s10909-023-03021-w",
    journal = "J. Low Temp. Phys.",
    volume = "214",
    number = "3-4",
    pages = "133--142",
    year = "2024"
}
```
defense-predictor 1.0.1
Python module for running Defense Predictor, a machine learning model to predict antiphage defense systems
License: MIT
Requires Python: <4.0,>=3.10

# DefensePredictor: A Machine Learning Model to Discover Novel Prokaryotic Immune Systems

Python package to run DefensePredictor, a machine-learning model that leverages embeddings from a protein language model, [ESM2](https://github.com/facebookresearch/esm), to classify proteins as anti-phage defensive.

### Installation

In a fresh [conda](https://anaconda.org/anaconda/conda) or other virutal environment, run:

```bash
pip install defense_predictor
defense_predictor_download
```

The first command downloads the python package from PyPI and the second downloads the model weights. Once model weights are downloaded you do not need to run this command again. 

### Requirements 

Requires `python >= 3.10`

### Usage

`defense_predictor` can be run as python code

```python
import defense_predictor as dfp

ncbi_feature_table = 'GCF_003333385.1_ASM333338v1_feature_table.txt'
ncbi_cds_from_genomic = 'GCF_003333385.1_ASM333338v1_cds_from_genomic.fna'
ncbi_protein_fasta = 'GCF_003333385.1_ASM333338v1_protein.faa'
output_df, feature_matrix = dfp.defense_predictor(ft_file=ncbi_feature_table, fna_file=ncbi_cds_from_genomic, faa_file=ncbi_protein_fasta)
output_df.head()                                    
```

Or from the command line

```bash
defense_predictor \
     --ncbi_feature_table GCF_003333385.1_ASM333338v1_feature_table.txt \
     --ncbi_cds_from_genomic GCF_003333385.1_ASM333338v1_cds_from_genomic.fna \ 
     --ncbi_protein_fasta GCF_003333385.1_ASM333338v1_protein.faa \
     --output GCF_003333385_defense_predictor_output.csv
```

<br>

`defense_predictor` outputs the predicted log-odds of defense for each input protein in the columns `mean_log_odds`. We reccomend using a stringent log-odds cutoff of `4` to call a protein predicted defensive.

To see an example you can run the `defense_predictor_example.ipynb` in colab: <a href="https://colab.research.google.com/github/PeterDeWeirdt/defense_predictor/blob/main/defense_predictor_example.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> 

We reccomend running `defense_predictor` on a computer with a cuda-enabled GPU, to maximize computational efficiency. 

### Inputs

Input files can be downloaded from the [ftp webpage](https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/005/845/GCF_000005845.2_ASM584v2/) for any gemone of interest, which is linked on its [assembly page](https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_000005845.2/). Input files can be generated from an unannotated nuceotide assembly using NCBI's [Prokaryotic Genome Annotation Pipeline](https://github.com/ncbi/pgap).