English | 中文
Subset and QC GFF3/GTF annotations (regions, ID/attribute selectors, gene models, longest isoform, QC).
git clone https://github.com/WWz33/gffsub.git
cd gffsub && make -j
# minimal GFF3
printf '%s\n' '##gff-version 3' \
$'chr1\t.\tgene\t1\t100\t.\t+\t.\tID=GeneA;Name=GeneA' \
$'chr1\t.\tmRNA\t1\t100\t.\t+\t.\tID=mRNA1;Parent=GeneA' \
$'chr1\t.\texon\t1\t100\t.\t+\t.\tID=exon1;Parent=mRNA1' > data/smoke.gff3
./gffsub data/smoke.gff3 -r chr1:1-100 -f gene
./gffsub data/smoke.gff3 --id GeneA -C
./gffsub data/smoke.gff3 --qcgffsub <input.gff3> [options]
gffsub query|window|qc <input.gff3> [options]
See ./gffsub -h for the full flag list (one line per option).
| Flag | Default | Description |
|---|---|---|
-r, --region |
— | 1-based inclusive CHR:START-END |
-b, --bed |
— | BED intervals (0-based half-open) |
--id / --ids |
— | exact feature ID(s) |
--name |
— | gene by common naming keys |
--where KEY=VALUE |
— | exact column-9 attribute |
-C, --children |
off | include descendants of selector hits |
--parents |
off | include ancestors |
--model |
off | full gene model |
--nearest REGION |
— | nearest gene on same seqid |
--up / --down |
0 | window (bp) around --id |
--strand-aware |
off | window follows feature strand |
-f, --feature |
— | type column filter |
-L, --longest |
off | one transcript/gene: CDS length if any CDS, else exon |
-@, --threads |
1 | threads for --longest |
--qc |
off | QC report (TSV) |
-t, --format |
gff3 | gff3|gtf|gtf2|gtf3|bed |
-o, --output |
stdout | output file |
| Kind | Notes |
|---|---|
| Annotation | GFF3/GTF-style feature records |
GFF/GTF / -r |
1-based inclusive |
| BED | 0-based half-open |
--qc TSV |
severity, code, line_idx, id, message |
--summary |
tsv or json rows instead of features |
Primary input is annotation records (not FASTA/VCF).
MIT License