From 4862eefc6ce6e7c1d2a791919fe5611eec5e5a09 Mon Sep 17 00:00:00 2001 From: Natsuki IWANO Date: Mon, 5 May 2025 03:38:53 +0000 Subject: [PATCH 1/5] feat: update OpenAI model references to gpt-4.1 in ai-review workflow --- .github/workflows/ai-review.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ai-review.yaml b/.github/workflows/ai-review.yaml index 05fdbe2d..206b30af 100644 --- a/.github/workflows/ai-review.yaml +++ b/.github/workflows/ai-review.yaml @@ -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: | From ca9008912233088b71bebd9039e9e244b2651ab9 Mon Sep 17 00:00:00 2001 From: Ryota Nakano <71750787+unkosan@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:29:58 +0900 Subject: [PATCH 2/5] feat: updated citation --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ddcc9d35..f06b14ed 100644 --- a/README.md +++ b/README.md @@ -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. - - ## 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}, } ``` From 50ca93b40ab5c87735ed4e18996b14934fdaca06 Mon Sep 17 00:00:00 2001 From: Ryota Nakano <71750787+unkosan@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:44:55 +0900 Subject: [PATCH 3/5] feat: added paper info to the summary --- README.md | 4 ++-- docs/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f06b14ed..df76a2c1 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 ``` diff --git a/docs/index.md b/docs/index.md index f069f2fd..cd6f4887 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 From d151e47d33e535b335c7a6c9fd58d9c3770aa362 Mon Sep 17 00:00:00 2001 From: Ryota Nakano <71750787+unkosan@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:48:29 +0900 Subject: [PATCH 4/5] feat: added paper info the mkdocs --- docs/about.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/about.md b/docs/about.md index 786eecab..bda13126 100644 --- a/docs/about.md +++ b/docs/about.md @@ -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) From 1239b2c66ec5d0936fabd1b5268fb459f5c327ac Mon Sep 17 00:00:00 2001 From: Ryota Nakano <71750787+unkosan@users.noreply.github.com> Date: Sat, 31 Jan 2026 20:11:21 +0900 Subject: [PATCH 5/5] chore: fmt --- backend/core/gmmjobs.py | 18 +++++------------- backend/routers/gmm.py | 21 ++++++++++----------- backend/routers/upload.py | 22 ++++++++++------------ backend/tests/unit/test_jobs.py | 22 ++++++++++------------ 4 files changed, 35 insertions(+), 48 deletions(-) diff --git a/backend/core/gmmjobs.py b/backend/core/gmmjobs.py index 8548f6bb..42d33d7a 100644 --- a/backend/core/gmmjobs.py +++ b/backend/core/gmmjobs.py @@ -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) diff --git a/backend/routers/gmm.py b/backend/routers/gmm.py index 6970286d..61cd0b4a 100644 --- a/backend/routers/gmm.py +++ b/backend/routers/gmm.py @@ -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() diff --git a/backend/routers/upload.py b/backend/routers/upload.py index 317f2b87..460ab9c5 100644 --- a/backend/routers/upload.py +++ b/backend/routers/upload.py @@ -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/" @@ -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)) @@ -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") diff --git a/backend/tests/unit/test_jobs.py b/backend/tests/unit/test_jobs.py index 8dc00025..cf736fd4 100644 --- a/backend/tests/unit/test_jobs.py +++ b/backend/tests/unit/test_jobs.py @@ -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",