Genos Model Service
Model Use Instructions
The Genos Model is launched on the cloud platform in the "DCS-South1" area. This model is a basic large model for human genome research. It is trained on hundreds of high-quality genome benchmark data and has the ability to model human genome sequences up to one million bases (1m bp) in context. Learning with resolution at the single base level,Genos can identify complex regulatory patterns and functional features implicit in genome sequences, providing scientists with a new research paradigm to link genetic information with life activities.
The Genos Model launched this time provides two versions:
- 1.2B parameter version (lightweight research scene optimization) 
- 10B parameter version (high precision scientific and clinical research level) 
Both versions use the mix of Experts (MoE),
 Efficient allocation of computing resources through dynamic routing mechanism, excellent performance in complex regulatory network analysis and multi-modal sequence modeling.
1. Model Access
Basic entrance
This online model can be used online by opening the notebook through the cloud platform Portal or locally after installing the Genos package.
- Log in to the Alibaba Cloud area of the cloud platform and enter the Genos Model official website after entering the homepage: - GenOS Genomic Foundation Model-Exploring the mysteries of genes;  
- After entering the model official website, select two ways to use the model. Click to enter the use of personality analysis 

- Explore the model: Use the GPU resources of the cloud platform to enable the personality analysis access model 
- Model service: use API key to call Genos Model to perform analysis tasks through API interface. For API key application, please refer to [3. API KEY application description] 
For model services, the cloud platform provides a way to install Genos packages for local use. Genos is a Python-based SDK for accessing genome analysis models through GeneOS.
 It provides a unified interface that supports the following functions:
- Variant pathogenicity prediction: Assessing the pathogenicity of genetic variations 
- Embedding extraction: extracting deep learning embedding vectors from DNA sequences 
- RNA-seq coverage prediction: predicting RNA-seq coverage trajectories based on genomic coordinates 
- Genome Visualization: Mapping and Analyzing Genome Trajectories 
- Easy to use: the API is simple and intuitive, and has a comprehensive error handling mechanism 
- Security Authentication: Automatic Token Verification and Payment Checking 
- Perfect exception handling: provide specific exceptions for different error types 
Installation instructions
Support source code, PyPI two installation methods
Install from source
Git clone https://github.com/BGI-HangzhouAI/Genos.git
CD SDK
Pip install-E.
Install from PyPI (recommended)
pip install genos
Environmental requirement
- Python 3.8 or later 
- pip package manager installed 
2. Model Usage Billing
Genos provides two usage modes on the cloud platform. Select different modes of services based on your needs. When you register for the cloud platform, the system will give you a 300 yuan voucher, and you can use up to 1 billion tokens for free. If the voucher is used for other services on the cloud platform, the free use of tokens is reduced accordingly.The billing information corresponding to the model mode is as follows:

3. API Key Application Description (for model application scenarios)
In the model application mode, users need to access the Genos service through APIs of the cloud platform. To ensure safe calling and accurate billing, you must first apply for a personal API Key in the platform Personal Center.
3.1 The Role of API Key
- As a unique identity credential to access the Genos Model; 
- Used for call statistics and task billing; 
- Used for log tracking and security control. 
3.2 Application Conditions
- Have a cloud platform registered account; 
- Account status is normal; 
- Has agreed to the Genos API use notice and the privacy and use terms. 
3.3 Application Steps
- Log in to the cloud platform and open "personal center→api Key management 」Personal Center; 
- Click the "create API Key" button; 
- Read "instructions for using API" and confirm consent; 
- The system automatically generates your own Key, copy and use it. 
Note Please keep it properly to avoid leakage.
4. API Key usage guide
Use Declaration
- The Key is only for the use of the account and cannot be shared, transferred or disclosed; 
- If the Key is leaked, abused or used for illegal purposes, the platform has the right to immediately disable it; 
- Key can be "disabled" manually in the console 」. 
Sample code
The following example shows how to use API Key to call the Genos Model Inference interface:
curl -X POST "https://cloud.stomics.tech/api/aigateway/genos/variant_predict" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_key>" \
-d '{
  "assembly":"hg19", 
  "chrom":"chr6", 
  "pos":51484075, 
  "ref":"T", 
  "alt":"G"
}'
Response example
{
    "result": {
        "variant": "chr6-51484075-T-G",
        "prediction": "Benign",
        "score_Benign": 0.853630542755127,
        "score_Pathogenic": 0.14636942744255066
    },
    "status": 200,
    "messages": "",
    "model_name": "VariantEffectPred-FT",
    "token_cnt": 8192,
    "start_time": 1760678302,
    "end_time": 1760678310
}
Client Call Instance
from genos import create_client
client = create_client(token="your_token")
# 变异预测
result = client.variant_predict({
  "assembly":"hg19", 
  "chrom":"chr6", 
  "pos":51484075, 
  "ref":"T", 
  "alt":"G"
})
print(result)
Quick Start
Basic Usage
from genos import create_client
# 创建客户端(默认使用环境变量 GENOS_API_TOKEN)
client = create_client()
# 或者显式提供 token
client = create_client(token="your_api_token_here")
Prediction of variation pathogenicity
Predicting the pathogenicity or benignity of a genetic variant:
# 预测变异致病性
result = client.variant_predict("hg19", "chr6", 51484075, "T", "G")['result']
print(f"Variant: {result['variant']}")
print(f"Prediction: {result['prediction']}")
print(f"Pathogenic Score: {result['score_Pathogenic']:.4f}")
print(f"Benign Score: {result['score_Benign']:.4f}")
DNA sequence embedding extraction
# 为单条序列提取嵌入向量
sequence = "ATCGATCGATCGATCGATCGATCGATCG"
result = client.get_embedding(sequence, model_name="Genos-1.2B")['result']
print(f"Sequence Length: {result['sequence_length']}")
print(f"Embedding Dimension: {result['embedding_dim']}")
print(f"Embedding Shape: {result['embedding_shape']}")
# 访问嵌入向量
embedding_vector = result['embedding']  # 浮点数列表
Available Models
| Model Name | Parameter Scale | Depaint | 
|---|---|---|
| Genes-1.2B | 1.2 billion parameters | General Version | 
| Genes-10B | 10 billion parameters | High-precision version | 
The Pooling method:
- mean: Sequence Average Pooling
- max: Max Pooling
- last: The last token is embedded
- noneReturns the full token embedding sequence
RNA-seq coverage prediction
# 根据基因组坐标预测 RNA-seq 覆盖轨迹
result = client.rna_coverage_track_pred(chrom="chr6", start_pos=51484075)['result']
print(f"Predicted coverage track: {result}")
Advanced Configuration
Custom Embedded Service
GenosClient allows users to configure custom embedded API endpoints.
Note: Mutation prediction and RNA-seq prediction models are not open source, only official hosting services are available.
from genos import GenosClient
# Initialize the client with a custom embedded service endpoint
client = GenosClient (
token = "your_custom_token",# The authentication token of the custom embedded service
api_map = {
# Customizable only embedded services
"embedding": "https://custom-embed-api.example.com/predict"
}
)
# Mutation and RNA API will still use official hosting services
Timeout Configuration
To adjust the request timeout for long-running tasks:
# 设置 60 秒超时
client = create_client(token="your_token", timeout=60)
Error Handling
Genos provides a comprehensive error handling mechanism to return specific exceptions for different error types. All API responses follow a uniform format.
Error response format:
{0}
"Result": {},
"Status": "<HTTP_STATUS_CODE>",
"Messages": "<ERROR_MESSAGE>"
}
Common error codes:
| Status Code | Error message | Depaint | 
|---|---|---|
| 400 | Insufficient balance | Insufficient account balance | 
| 401 | Invalid API Key | The provided API Key is invalid or has expired | 
| 500 | Internal server error | Server Internal Error | 
Note: Returning "200" means that the service returns normally
5. API Key management operation
| Function | Explain | 
|---|---|
| View Key | The console displays the currently active Key. | 
| Deactivate Key | Pause calling service | 
| Enable Key | Manually restore the disabled Key status | 
| Delete Key | Manually delete unnecessary keys |