cairijun / blast_online Goto Github PK
View Code? Open in Web Editor NEWBiobrick Blast Online
License: MIT License
Biobrick Blast Online
License: MIT License
/result/<task_id>
在输出结果时会尝试把结果转换成表格(二维列表)。格式如下:
[
["query id", "subject id", "% identity", "alignment length", "mismatches", "gap opens", "q. start", "q. end", "s. start", "s. end", "evalue", "bit score"],
["lcl|FJ881694.1_cdsid_ACO57213.1", "BBa_S04192", "100.00", "2652", "0", "0", "1", "2652", "1238", "3889", "0.0", "5257"],
["lcl|FJ881694.1_cdsid_ACO57213.1", "BBa_S04186", "100.00", "2652", "0", "0", "1", "2652", "227", "2878", "0.0", "5257"],
["lcl|FJ881694.1_cdsid_ACO57213.1", "BBa_S03938", "100.00", "2652", "0", "0", "1", "2652", "16", "2667", "0.0", "5257"]
]
如果没有字段名信息(tabular without comment),字段名全部设置成空字符串。
如果转换失败,则原样输出。
刚刚提交的版本有问题,还在测试,暂时别更新
我才发现我做错事了。。提交了个我自己调试时候的index.html。。马上改过来
依赖:Redis、Python、Blast、pip_requirements.txt
中的Python包。
config.py
中配置如下:
CELERY_BROKER
: Celery队列后端地址,默认为本地Redis服务器
BLAST_DEFAULT_KWARGS
: Blast的默认参数
BLAST_DB_DIR
: Blast数据库路径
BLAST_INPUT_DIR
: Blast输入文件路径
BLAST_OUTPUT_DIR
: Blast输出文件路径
POLL_STATUS_RETRIES
: 每次长轮询请求状态查询次数
配置完成后运行run_server.py
。
添加如下数据库:
GET /
首页
POST /query
提交查询
参数:
Key | Description | Example |
---|---|---|
program | 程序名称 | blastn |
evalue | E-value | 1000 |
outfmt | 输出格式 | pairwise |
database | 数据库名称 | Biobrick |
input | 输入 | - |
返回JSON:
Key | Description | Example |
---|---|---|
errno | 错误码,0为成功 | 0 |
err_msg | 错误信息 | "Success" |
task_id | 任务ID | "065fb64cd42911e3a14510604b805805" |
POST /query/upload
上传文件查询
multipart/form-data格式,参数与POST /query
一样,只是input
字段换成上传的文件。返回不变。
GET /status/<task_id>
查询当前状态(非阻塞)
返回JSON:
Key | Description | Example |
---|---|---|
errno | 错误码,0为成功 | 0 |
err_msg | 错误信息 | "Success" |
status | 当前状态 | "finished" |
msg | 错误详细信息(failed状态才有) | "Wrong format" |
状态取值:
Status | Description |
---|---|
nonexistent | 任务不存在 |
queuing | 排队中 |
working | 运算中 |
finished | 完成 |
failed | 失败 |
GET /status/<task_id>/poll
查询当前状态(Long-polling)
返回值与GET /status/<task_id>
一样,但是这个为Long-polling接口。此接口在以下情况下返回:
Event | Behavior |
---|---|
任务不存在 | 返回nonexistent |
超时 | 返回超时时的任务状态 |
任务完成或失败 | 返回finished或failed |
任务状态改变 | 返回最新的状态 |
GET /result/<task_id>
获取结果
返回JSON:
Key | Description | Example |
---|---|---|
errno | 错误码,0为成功 | 0 |
err_msg | 错误信息 | "Success" |
result | 结果 | - |
GET /result/download/<task_id>
下载结果
如题。
任务可以提交,但是提交后没有进入查询列表。手动添加任务也不行。
测试服务器上的代码已切换回原来的版本。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.