Sign inSign up

coder02lq/geg2p

By coder02lq

Updated 8 months ago

Image
0

143

coder02lq/geg2p repository overview

GEG2P Parallel Docker Instructions

Installation

Pull the pre-built Docker image from Docker Hub:

docker pull coder02lq/geg2p:v1

Prerequisites

  • Docker installed (or Podman)
  • NVIDIA GPU Driver: Version ≥ 525.60 (supports CUDA 12.x)
  • NVIDIA Container Toolkit: Required for Docker to access GPU resources

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.

Data Preparation

Before running the container, prepare a local directory (e.g., data/) containing your input files. The standard requirements are:

File TypeTypical NameCSV FormatParameterDescription
Genotypegenotype.csvID,snp1,snp2...--snp_pathGenetic markers (0, 1, 2). Rows are samples.
Phenotypephenotype.csvID,trait1...--phe_pathTrait values. ID must match genotype file.
CV Structurecvf.csvID,cv_1--cvf_pathPre-defined folds (e.g., 1-10).
File Examples

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.

  • Example: -v /path/to/host/data:/data maps your local data folder to /data inside the container.
  • Arguments should then reference the container path: --snp_path /data/genotype.csv.

Running the Container

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"
Output & Persistence

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.

Available Options
OptionDefaultDescription
--plantMy_ExperimentOutput folder name
--snp_path./data/genotype.csvPath to genotype CSV
--phe_path./data/phenotyp.csvPath to phenotype CSV
--cvf_path./data/cvf.csvPath to CVF CSV
--traitstrait1Traits to analyze (space separated)
--snp_num200SNP count
--kmax5K-fold CV count
--devicecudacuda or cpu
--max_cpu_cores4CPU core limit per process, set to 0 for no limit
--max_parallel10Max parallel models
--g2p_modelsBayesA BayesB BayesC BL BRR RRBLUP LASSO SPLS RR BRNNSpace-separated list of G2P models
--ml_modelsKNN XGBoost MLP RandomForest SVRSpace-separated list of ML models
--dl_modelsLCNN gmlp DNNGP DLGWAS DeepGSSpace-separated list of DL models

Notes

  • The container sets WORKDIR to /app.
  • Scripts are located in /app.
  • Ensure your data files are accessible inside the container (use -v to mount).

Tag summary

Content type

Image

Digest

sha256:5a8290bae

Size

10.1 GB

Last updated

8 months ago

docker pull coder02lq/geg2p:v1