Skip to content

Commit

Permalink
Merge pull request #8 from ylab-hi/deploy
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
cauliyang authored Oct 9, 2024
2 parents e8c9130 + 4256fe0 commit 2403520
Show file tree
Hide file tree
Showing 55 changed files with 6,527 additions and 2,794 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
stages: [commit]
Expand All @@ -29,7 +29,7 @@ repos:
- id: cargo-check

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.4.2"
rev: "v0.6.9"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
Expand Down Expand Up @@ -81,7 +81,7 @@ repos:

# jupyter notebook linting
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:
- id: nbqa-black
args: ["--line-length=99"]
Expand Down
11 changes: 11 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
name = "deepchopper"
version = "0.1.0"
edition = "2021"
authors = ["Yangyang Li <[email protected]>"]
description = "A Genomic Language Model for Chimera Artifact Detection in Nanopore Direct RNA Sequencing"
documentation = "https://docs.rs/bitflags"
homepage = "https://serde.rs"
repository = "https://github.com/rust-lang/cargo"
license = "Apache-2.0"
readme = "README.md"

[lib]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
name = "deepchopper"
crate-type = ["cdylib", "rlib"]

[[bin]]
path = "src/bin/predict.rs"
name = "deepchopper-chop"

[profile.dev]
debug = 1

Expand Down
68 changes: 54 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# <img src="./documentation/logo.webp" alt="logo" height=100> **DeepChopper** [![social](https://img.shields.io/github/stars/ylab-hi/DeepChopper?style=social)](https://github.com/ylab-hi/DeepChopper/stargazers)
# <img src="./documentation/logo.webp" alt="logo" height="100"/> **DeepChopper** [![social](https://img.shields.io/github/stars/ylab-hi/DeepChopper?style=social)](https://github.com/ylab-hi/DeepChopper/stargazers)

<!--toc:start-->

- [Feature](#feature)
- [🤜 Contribution](#%F0%9F%A4%9C-contribution)
- [ **DeepChopper** ](#-deepchopper-)
- [Install](#install)
- [Usage](#usage)
- [Command-Line Interface](#command-line-interface)
- [Library](#library)
- [Cite](#cite)
- [🤜 Contribution](#-contribution)
- [Build Environment](#build-environment)
- [Install Dependencies](#install-dependencies)

<!--toc:end-->

Language models identify chimeric artificial reads in NanoPore direct-RNA sequencing data.
DeepChopper leverages language model to accurately detect and chop these aritificial sequences which may cause chimeric reads, ensuring higher quality and more reliable sequencing results.
By integrating seamlessly with existing workflows, DeepChopper provides a robust solution for researchers and bioinformaticians working with NanoPorea direct-RNA sequencing data.
DeepChopper leverages language model to accurately detect and chop artificial sequences which may cause chimeric reads, ensuring higher quality and more reliable sequencing results.
By integrating seamlessly with existing workflows, DeepChopper provides a robust solution for researchers and bioinformatics working with NanoPore direct-RNA sequencing data.

## Install

Expand All @@ -33,37 +39,71 @@ DeepChopper can be installed using pip, the Python package installer. Follow the
4. Verify the installation:

```bash
deepchopper --version
deepchopper --help
```

5. DeepChopper include a Rust command line tool for faster performance.

```bash
cargo install deepchopper
```

For GPU support, ensure you have CUDA installed on your system, then install the GPU version:

```bash
pip install deepchopper[gpu]
```

Note: If you encounter any issues,
please check our GitHub repository for troubleshooting guides or to report a problem.
Note: If you encounter any issues, please check our GitHub repository for troubleshooting guides or to report a problem.

## Usage

We provide a [complete guide](./documentation/tutorial.md) on how to use DeepChopper for NanoPore direct-RNA sequencing data.
Below is a brief overview of the command-line interface and library usage.

### Command-Line Interface

DeepChopper provides a command-line interface (CLI) for easy access to its features. In total, there are three commands: `encode`, `predict`, and `chop`.
DeepChopper can be used to encode, predict, and chop chimeric reads in direct-RNA sequencing data.

Firstly, we need to encode the input data using the `encode` command, which will generate a `.parquet` file.

```bash
deepchopper endcode <input.fq>
```

Next, we can use the `predict` command to predict chimeric reads in the encoded data.

```bash
deepchopper endcode --input <input>
deepchopper predict <input.parquet> --ouput-path predictions
```

Finally, we can use the `chop` command to chop the chimeric reads in the input data.

```bash
deepchopper predict --input <input> --output <output>
deepchopper chop <predictions> raw.fq
```

Besides, DeepChopper provides a web-based user interface for users to interact with the tool.
However, the web-based application can only take one FASTQ record at a time.

```bash
deepchopper chop --input <input> --output <output>
deepchopper web
```

### Library

```python
import deepchopper

model = deepchopper.DeepChopper.from_pretrained("yangliz5/deepchopper")
```

## Cite

## 🤜 Contribution

**Build Environment**
### Build Environment

```bash
git clone https://github.com/ylab-hi/DeepChopper.git
Expand All @@ -72,7 +112,7 @@ conda env create -n environment.yaml
conda activate deepchopper
```

**Install Dependencies**
### Install Dependencies

```bash
pip install pipx
Expand Down
5 changes: 3 additions & 2 deletions deepchopper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""DeepChopper package."""

from . import data, eval, models, train, utils
from . import data, eval, models, train, ui, utils
from .deepchopper import * # noqa: F403
from .models import DeepChopper

__all__ = ["models", "utils", "data", "train", "eval"]
__all__ = ["models", "utils", "data", "train", "eval", "DeepChopper", "ui"]
Loading

0 comments on commit 2403520

Please sign in to comment.