Pull the pre-built Docker image from Docker Hub:
docker pull coder02lq/geg2p:v1
Note
This image contains libraries pre-built for CUDA 12.x. If your host's NVIDIA driver version is too old, it may cause GPU-related errors. It is recommended to update your drivers for the best compatibility.
Before running the container, prepare a local directory (e.g., data/) containing your input files. The standard requirements are:
| File Type | Typical Name | CSV Format | Parameter | Description |
|---|---|---|---|---|
| Genotype | genotype.csv | ID,snp1,snp2... | --snp_path | Genetic markers (0, 1, 2). Rows are samples. |
| Phenotype | phenotype.csv | ID,trait1... | --phe_path | Trait values. ID must match genotype file. |
| CV Structure | cvf.csv | ID,cv_1 | --cvf_path | Pre-defined folds (e.g., 1-10). |
1. Genotype File (Samples as rows, markers as columns, values 0/1/2)
ID,snp1,snp2,snp3,snp4,snp5
Sample1,0,0,0,0,0
Sample2,0,2,0,0,2
Sample3,0,0,0,0,0
2. Phenotype File (ID must match Genotype file)
ID,trait1
Sample1,228.2
Sample2,210.86
Sample3,219.26
3. CV Structure File (Optional, for custom cross-validation folds)
ID,cv_1
Sample1,10
Sample2,7
Sample3,9
Mounting Principle: The container needs access to these files. We use the -v flag to map your host folder to a path inside the container.
-v /path/to/host/data:/data maps your local data folder to /data inside the container.--snp_path /data/genotype.csv.Use the following command to run the container with customized parameters:
docker run --rm --gpus all \
-v /path/to/data:/data \
-v /path/to/logs:/app/training_logs \
-v /path/to/results:/app/results \
-v /path/to/models:/app/model \
coder02lq/geg2p:v1 \
--plant "My_Experiment" \
--snp_path /data/genotype.csv \
--phe_path /data/phenotype.csv \
--cvf_path /data/cvf.csv \
--traits "trait1" \
--snp_num 200 \
--kmax 5 \
--device cuda \
--max_cpu_cores 4 \
--max_parallel 10 \
--g2p_models "BayesA BayesB BayesC BL BRR RRBLUP LASSO SPLS RR BRNN" \
--ml_models "KNN XGBoost MLP RandomForest SVR" \
--dl_models "LCNN gmlp DNNGP DLGWAS DeepGS"
The outputs are saved in the container at:
/app/results/<plant>/: Contains CSV prediction files./app/model/<plant>/: Contains trained Deep Learning model files (.pth)./app/training_logs/: Contains logs for each model's training process (useful for debugging).Important: You must mount local directories to /app/results, /app/model, and /app/training_logs (as shown in the command above) to persist these files on your host machine after the container stops. The <plant> folder (e.g., My_Experiment) will be automatically created inside these mounted directories.
| Option | Default | Description |
|---|---|---|
--plant | My_Experiment | Output folder name |
--snp_path | ./data/genotype.csv | Path to genotype CSV |
--phe_path | ./data/phenotyp.csv | Path to phenotype CSV |
--cvf_path | ./data/cvf.csv | Path to CVF CSV |
--traits | trait1 | Traits to analyze (space separated) |
--snp_num | 200 | SNP count |
--kmax | 5 | K-fold CV count |
--device | cuda | cuda or cpu |
--max_cpu_cores | 4 | CPU core limit per process, set to 0 for no limit |
--max_parallel | 10 | Max parallel models |
--g2p_models | BayesA BayesB BayesC BL BRR RRBLUP LASSO SPLS RR BRNN | Space-separated list of G2P models |
--ml_models | KNN XGBoost MLP RandomForest SVR | Space-separated list of ML models |
--dl_models | LCNN gmlp DNNGP DLGWAS DeepGS | Space-separated list of DL models |
WORKDIR to /app./app.-v to mount).Content type
Image
Digest
sha256:5a8290bae…
Size
10.1 GB
Last updated
8 months ago
docker pull coder02lq/geg2p:v1