flatten-gtf
Quick Start
- Command:
flattenGTF -a <input.gtf> -o <output.saf> - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/flattenGTF - Full reference: See references/help.md
When To Use This Tool
- Convert GTF or GFF annotations into SAF for Subread-family tools.
- Flatten overlapping exon-like intervals into meta-features grouped by
gene_idor another chosen attribute. - Prepare annotation files for
featureCountsworkflows that prefer SAF over raw GTF/GFF parsing.
Common Patterns
# 1) Default flattening: exon features grouped by gene_id
/home/vimalinx/miniforge3/envs/bio/bin/flattenGTF \
-a genes.gtf \
-o genes.saf
# 2) Flatten a different feature type or grouping attribute
/home/vimalinx/miniforge3/envs/bio/bin/flattenGTF \
-a annotation.gff3 \
-o cds_by_tx.saf \
-t CDS \
-g transcript_id
# 3) Keep exon boundaries while still producing non-overlapping output
/home/vimalinx/miniforge3/envs/bio/bin/flattenGTF \
-a genes.gtf \
-o genes.keep_edges.saf \
-C
Recommended Workflow
- Start from an annotation built against the same assembly as your alignments.
- Decide whether the defaults (
-t exon,-g gene_id) match the downstream counting unit you want. - Write SAF to a new file with
-oand inspect a few rows before large batch counting. - If merged intervals look too coarse, retry with
-Cto preserve exon edges.
Guardrails
flattenGTFis the actual binary name;flatten-gtfis just the skill folder name.-aand-oare mandatory, and the tool writes SAF to disk rather than stdout.--helpand--versionare not standard GNU modes here; they printunrecognized optionand then fall through to the usage banner.- Defaults are
-t exonand-g gene_id; if those attributes are absent the run will fail rather than guess.