Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ai-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
debug: false
review_simple_changes: false
review_comment_lgtm: false
openai_light_model: gpt-4
openai_heavy_model: gpt-4
openai_light_model: gpt-4 # changed to gpt-4.1
openai_heavy_model: gpt-4 # changed to gpt-4.1
openai_timeout_ms: 900000 # 15分.
language: ja-JP
path_filters: |
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## What is RaptGen-UI?

RaptGen-UI is a web-based user-friendly interface for RaptGen, a powerful Latent Space Bayesian Optimization (LSBO) method for identifying and optimizing aptamers from high-throughput SELEX data. For more information about RaptGen, please refer to the [RaptGen paper](https://doi.org/10.1038/s43588-022-00249-6).
RaptGen-UI is a web-based user-friendly interface for RaptGen, a powerful Latent Space Bayesian Optimization (LSBO) method for identifying and optimizing aptamers from high-throughput SELEX data. For more information about RaptGen-UI, please refer to the [paper](https://doi.org/10.1093/bioadv/vbaf120).

## Overview

Expand All @@ -27,7 +27,7 @@ Click on the links to learn more about each module.
Git clone this repository.

```shell
$ git clone https://github.com/Unkosan/RaptGen-UI.git
$ git clone https://github.com/hmdlab/RaptGen-UI.git
$ cd RaptGen-UI
```

Expand All @@ -52,17 +52,24 @@ The detailed procedure can be found in the [documentation](https://unkosan.githu
Contributions are welcome!
If you find any bugs or have any suggestions, please feel free to open an issue or submit a pull request.

<!-- Just make sure to follow the [Code of Conduct](CODE_OF_CONDUCT.md). -->

## Citation

If you use RaptGen-UI in your research, please cite the following paper:

```bibtex
@article{nakano2025raptgenui,
title={RaptGen-UI: Interactive Interface for RNA Aptamer Identification Using Latent Space Bayesian Optimization}
author={Nakano, Ryota and Iwano, Natsuki and Ichinose, Akiko and Hamada, Michiaki}
year={2025},
author = {Nakano, Ryota and Iwano, Natsuki and Ichinose, Akiko and Hamada, Michiaki},
title = {RaptGen-UI: an integrated platform for exploring and analyzing the sequence landscape of HT-SELEX experiments},
journal = {Bioinformatics Advances},
volume = {5},
number = {1},
pages = {vbaf120},
year = {2025},
month = {05},
issn = {2635-0041},
doi = {10.1093/bioadv/vbaf120},
url = {https://doi.org/10.1093/bioadv/vbaf120},
eprint = {https://academic.oup.com/bioinformaticsadvances/article-pdf/5/1/vbaf120/63309611/vbaf120.pdf},
}
```

Expand Down
18 changes: 5 additions & 13 deletions backend/core/gmmjobs.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import time
from threading import Semaphore
from uuid import uuid4
from celery.contrib.abortable import AbortableTask

from sqlalchemy.orm import Session

from core.db import (
GMMJob,
OptimalTrial,
BIC,
ViewerSequenceEmbeddings,
get_db_session,
)
from tasks import celery
from threading import Semaphore
import numpy as np
from celery.contrib.abortable import AbortableTask
from core.db import BIC, GMMJob, OptimalTrial, ViewerSequenceEmbeddings, get_db_session
from sklearn.mixture import GaussianMixture

from sqlalchemy.orm import Session
from tasks import celery

semaphore = Semaphore(value=2)

Expand Down
21 changes: 10 additions & 11 deletions backend/routers/gmm.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
from typing import List, Optional, Literal
from fastapi import APIRouter, Depends
from pydantic import BaseModel
from sqlalchemy.orm import Session

from core.db import GMMJob, OptimalTrial, BIC
import re
from fastapi import HTTPException
from core.gmmjobs import initialize_job_gmm, run_job_gmm
from time import time
from celery.contrib.abortable import AbortableAsyncResult
from tasks import celery
from typing import List, Literal, Optional
from uuid import uuid4

from celery.contrib.abortable import AbortableAsyncResult
from core.db import (
BIC,
GMMJob,
JobStatus,
OptimalTrial,
ViewerGMM,
ViewerSequenceEmbeddings,
get_db_session,
)

from core.gmmjobs import initialize_job_gmm, run_job_gmm
from fastapi import APIRouter, Depends, HTTPException
from pydantic import BaseModel
from sqlalchemy.orm import Session
from tasks import celery

router = APIRouter()

Expand Down
22 changes: 10 additions & 12 deletions backend/routers/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
router = APIRouter()

import os
from io import BytesIO
import pickle
from typing import List, Optional, Tuple, Dict, Any, OrderedDict
from pydantic import BaseModel
from core.preprocessing import calc_target_length, estimate_adapters
from core.algorithms import CNN_PHMM_VAE
from datetime import datetime
import torch
import pandas as pd
import numpy as np
from io import BytesIO
from typing import Any, Dict, List, Optional, OrderedDict, Tuple

import numpy as np
import pandas as pd
import torch
from core.algorithms import CNN_PHMM_VAE
from core.preprocessing import calc_target_length, estimate_adapters
from pydantic import BaseModel
from sklearn.mixture import GaussianMixture

DATA_PATH = "/app/data/"

Expand Down Expand Up @@ -250,9 +251,6 @@ def _validate_pHMM_model(pickle_state_dict: BytesIO) -> Dict[str, Any]:
}


from sklearn.mixture import GaussianMixture


@router.post("/api/upload/validate-GMM-model")
async def validate_GMM_model(gmm_data: bytes = File(...)):
result = _validate_GMM_model(BytesIO(gmm_data))
Expand Down Expand Up @@ -286,8 +284,8 @@ def _validate_GMM_model(pickle_gmm: BytesIO) -> Dict[str, Any]:
}


from tasks import batch_encode, celery
from fastapi import Form
from tasks import batch_encode, celery


@router.post("/api/upload/batch-encode")
Expand Down
22 changes: 10 additions & 12 deletions backend/tests/unit/test_jobs.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import os
from time import sleep

import numpy as np
import pandas as pd
import pytest
import pytest_postgresql.factories as factories

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from celery.contrib.abortable import AbortableAsyncResult
from time import sleep
import pandas as pd
import os
import numpy as np

from core.jobs import run_job_raptgen, ChildJobTask, initialize_job_raptgen
from core.db import (
BaseSchema,
ParentJob,
ChildJob,
SequenceData,
ParentJob,
PreprocessingParams,
RaptGenParams,
SequenceData,
)
from core.jobs import ChildJobTask, initialize_job_raptgen, run_job_raptgen
from core.schemas import RaptGenTrainingParams
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from tasks import celery


raptgen_parent_params = {
"uuid": "8aab26d7-7657-47fa-b624-ed752864ae76",
"name": "test_raptgen",
Expand Down
4 changes: 4 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# About

## Paper

[RaptGen-UI: an integrated platform for exploring and analyzing the sequence landscape of HT-SELEX experiments](https://doi.org/10.1093/bioadv/vbaf120)

## Developers

Design and engineering: [Ryota Nakano](https://github.com/unkosan) and [Natsuki Iwano](https://github.com/Xilorole)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Welcome to RaptGen-UI

RaptGen-UI is a web-based user-friendly interface for RaptGen, a powerful Latent Space Bayesian Optimization (LSBO) method for identifying and optimizing aptamers from high-throughput SELEX data. For more information about RaptGen, please refer to the [RaptGen paper](https://doi.org/10.1038/s43588-022-00249-6).
RaptGen-UI is a web-based user-friendly interface for RaptGen, a powerful Latent Space Bayesian Optimization (LSBO) method for identifying and optimizing aptamers from high-throughput SELEX data. For more information about RaptGen-UI, please refer to the [paper](https://doi.org/10.1093/bioadv/vbaf120).

## Overview of Pipeline

Expand Down