Snakemake workflow to generate QC metric tables for gff3 or gtf formatted genome annotation files.
-
Completeness (BUSCO) — assessed with compleasm at both the protein and transcript level, with score
busco_score = 1 - (missing / total)(Missing BUSCOs / total in the lineage). Protein level runscompleasm protein; transcript level runscompleasm runon the extracted transcript FASTA. →results/qc/busco_completeness.tsv -
Structure & length (AGAT) — AGAT
agat_sp_statistics.plreports gene/transcript/exon/CDS/intron/UTR counts, per-gene and per-transcript ratios, feature-length distributions, and UTR presence, per biotype and for both the all-isoform and one-per-gene views. →results/qc/annotation_stats.tsv(tidy long form:annotation_id, feature_type, isoform_set, metric, value) -
Coding integrity (psauron) — psauron scores each CDS for being a real protein-coding sequence. The annotation-level score is the percentage of CDS classified as protein. →
results/qc/psauron_scores.tsv, plus the per-transcript scoring tableresults/psauron/<annotation_id>_psauron_score.csv
Each annotation is validated up front, and the workflow halts loudly on any failure (so no misleading numbers are produced). Validation runs on — and the metrics then use — the original annotation; nothing is rewritten.
gt gff3validator(GenomeTools) — strict GFF3 syntax: malformed records, invalid coordinates, danglingParentreferences, etc.- Custom checks vs the genome — every
seqidis present in the genome FASTA; every feature lies within1..sequence_length; every CDS has a valid phase (0/1/2); required feature types are present (CDS, exon, mRNA/transcript).
Per-annotation reports go to results/validated/<id>_validation_report.txt,
summarized in results/qc/validation_summary.tsv. Setting agat_advisory: true
adds a non-fatal report of what AGAT's standardizer would change/drop (AGAT is
not used to rewrite the annotation).
config/config.yaml workflow settings
annotations.tsv samplesheet: annotations to QC (+ their genomes)
workflow/Snakefile entry point
workflow/rules/*.smk rules (extract_sequences, compleasm, agat_stats, psauron)
workflow/envs/*.yml per-tool conda environments
workflow/scripts/ helper/parsing scripts
profiles/slurm/config.yaml per-rule threads/resources
my_runner.sh SLURM submission script (Cannon)
-
annotations.tsv— one row per annotation, tab-separated:column meaning annotation_idshort unique label (used in output) annotation_pathpath to the gff3 or gtf annotation genome_pathgenome FASTA the annotation was built on The annotation must contain CDS features (needed for protein/CDS extraction).
-
config/config.yamlbusco_lineage— BUSCO clade name, e.g.tetrapoda(seecompleasm list --remote)compleasm_odb— OrthoDB release (compleasm 0.2.8 default:odb12)busco_downloads_dir— where the lineage database is stored/reusedextract_tool—gffread(default) oragatfor sequence extractionpsauron_use_gpu/psauron_gpu_partition/psauron_gpus— see belowagat_advisory—trueadds a non-fatal report of what AGAT would change (defaultfalse)
Requires a global cannon Snakemake profile in $HOME/.config/snakemake/cannon/
and a conda environment containing Snakemake (referenced in my_runner.sh).
sbatch my_runner.shpsauron's model runs far faster on a GPU. It is CPU-only by default so the workflow works everywhere. To use a GPU:
- In
config/config.yamlsetpsauron_use_gpu: true,psauron_gpu_partitionto a partition you can access (Cannon:gpu,gpu_requeue,gpu_test,seas_gpu), andpsauron_gpus(usually1). The psauron job is then submitted to that partition with--gpus=N. - Because
--use-condabuilds environments on the (CPU) submit node, exportCONDA_OVERRIDE_CUDA=12.4(match your GPU's supported CUDA) before launching so the CUDA build of pytorch is selected forenvs/psauron_gpu.yml. Nomodule load cudais needed — the conda package bundles the CUDA runtime.
CPU-only users leave psauron_use_gpu: false; nothing GPU-related is built or requested.
Three QC tables under results/qc/:
| file | contents |
|---|---|
validation_summary.tsv |
per annotation_id: validation result + features scanned |
busco_completeness.tsv |
one row per annotation_id × level (protein/transcript) |
annotation_stats.tsv |
tidy long AGAT metrics per annotation_id × biotype × isoform view |
psauron_scores.tsv |
one row per annotation_id: psauron score + CDS counts |