Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy #8

Merged
merged 25 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cd60cd1
feat: Update pre-commit repos to latest versions
cauliyang Oct 2, 2024
7fe6b5e
feat: Add chop command to DeepChopper CLI
cauliyang Oct 2, 2024
8b20397
style: Update argument type and add annotation for clarity
cauliyang Oct 2, 2024
eb67167
refactor: Update deepchopper CLI predict function
cauliyang Oct 2, 2024
ff49a88
style: Reorder imports for better readability
cauliyang Oct 3, 2024
6e2a119
style: Remove unused imports and comments
cauliyang Oct 3, 2024
35a1681
feat: Add DeepChopper model class for pretrained models
cauliyang Oct 3, 2024
3313066
feat: Add UI functionality and improve predict CLI
cauliyang Oct 3, 2024
8b3a02d
fix: Update predict CLI output path handling
cauliyang Oct 4, 2024
0df5354
style: Improve code formatting and remove unnecessary lines
cauliyang Oct 4, 2024
82971e0
refactor: Update Cargo.toml and remove unnecessary imports
cauliyang Oct 4, 2024
ee6cf8b
refactor: Update function parameters in deepchopper/ui/main.py
cauliyang Oct 7, 2024
801da56
feat: Add file input option for dataset loading
cauliyang Oct 8, 2024
9534079
refactor: Improve dataset loading logic and input processing
cauliyang Oct 8, 2024
c4a04da
refactor: Improve data loading and processing in predict function
cauliyang Oct 8, 2024
50b7608
style: Update versions for gradio and fastapi
cauliyang Oct 8, 2024
1c592c9
refactor: Rename ui function to web
cauliyang Oct 8, 2024
cedd9e7
docs: Update DeepChopper README and tutorial
cauliyang Oct 8, 2024
4ea9a69
fix: Update pre-commit hook versions
cauliyang Oct 8, 2024
9ec4a1f
refactor: Improve code formatting in README.md
cauliyang Oct 8, 2024
6b53b40
docs: Update link to tutorial file in README
cauliyang Oct 8, 2024
56c5b0c
feat: Update DeepChopper commands and documentation
cauliyang Oct 8, 2024
22bfd8d
style: Improve command-line interface instructions
cauliyang Oct 8, 2024
6f7ff8d
add doc for project
cauliyang Oct 8, 2024
4256fe0
docs: Update documentation content in index.html
cauliyang Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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