Snakemake workflow for cis/trans eQTL and veQTL mapping in Drosophila melanogaster across two treatment groups (Control and High Sugar).
Last updated: 03/20/2026 — Huiting
run_pipeline_cluster.sh
├── Snakefile_setup # Step 1: build conda environment
└── Snakefile # Step 2: run full mapping pipeline
├── rules/genotype_processing_eqtl.smk
├── rules/genotype_processing_veqtl.smk
├── rules/phenotype_processing_GRAMMAR.smk
├── rules/eqtl_mapping.smk
└── rules/veqtl_mapping.smk
git clone <repo-url>
cd <repo-dir>Edit config.yaml to point to your data files:
Dry run to preview jobs
snakemake --dry-runLocal run
# Step 1: set up conda environment
snakemake \
--snakefile Snakefile_setup \
--use-conda \
--cores 1
# Step 2: run pipeline locally
snakemake \
--use-conda \
--cores {cores}SGE cluster run
bash run_pipeline_cluster.shThis will:
- Create conda environment
- Submit all pipeline jobs to the SGE cluster via
qsub
| Step | Rule module | Description |
|---|---|---|
| 1 | genotype_processing_eqtl.smk |
Filter and reformat VCF for eQTL mapping |
| 2 | genotype_processing_veqtl.smk |
Filter and reformat VCF for veQTL mapping |
| 3 | phenotype_processing_GRAMMAR.smk |
GRAMMAR correction of phenotypes |
| 4 | eqtl_mapping.smk |
Cis and trans eQTL mapping (tensorQTL) |
| 5 | veqtl_mapping.smk |
Cis and trans veQTL mapping in parallel batches (veqtl-mapper) |
| Parameter | Value | Description |
|---|---|---|
GROUP |
["Ctrl", "HS"] |
Treatment groups |
GENE_COUNT |
8763 |
Genes after removing bimodal genes |
CIS_CHUNK_SIZE |
127 |
Genes per cis-veQTL batch job |
TRANS_CHUNK_SIZE |
30 |
Genes per trans-veQTL batch job |
| File | Purpose |
|---|---|
Snakefile_setup |
Conda environment setup and package install |
Snakefile |
Main pipeline entry point |
config.yaml |
All input/output paths |
run_pipeline.sh |
One-command launcher |
rules/ |
Individual rule modules (.smk) |
envs/ |
Individual envs modules (.yaml) |