What problem does it solve? Setting up a new genome build or species for TE-compatible RNA-seq preprocessing requires building shared TE reference artifacts (TE GTF, grouped subfamily SAF, exon-subtracted no-exon SAF), a recipe that previously lived only as scattered awk/bedtools snippets in per-dataset READMEs with no provenance tracking. ## Core Features & Use Cases - Grouped SAF generation: Converts a TEtranscripts RepeatMasker GTF into a SAF with GeneID = Subfamily:Family:Class so featureCounts pools loci into subfamily meta-features. - Exon subtraction with verification: Derives an exon BED from the canonical gene GTF, normalizes contig names, runs bedtools subtract, and enforces zero residual exon overlap. - Provenance recording: Ships a build-record template capturing source URLs, md5 checksums, exact commands, and consuming datasets. - Use Case: When moving a project from mm39 to GRCh38, run the owned build script once to produce the shared no-exon SAF that every downstream dataset reuses via star-te-preprocessing. ## Quick Start Run scripts/build_te_saf.sh with the TEtranscripts TE GTF, the matching gene GTF, an output directory, and a build prefix to generate the grouped and no-exon SAF reference files.