---
name: "gff-sort"
section: "1"
platform: "linux"
package: "ncbi-entrez-direct"
version: "24.0.20250523+dfsg-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gff-sort"
---

# gff-sort(1)

sort a General Feature Format version 3 file

## NAME

gff-sort - sort a General Feature Format version 3 file

## SYNOPSIS

**gff-sort**

## DESCRIPTION

**gff-sort** reads a General Feature Format version 3 (GFF3) file from standard input and prints a sorted equivalent to standard output. It sorts according to the following criteria:

- •

  accession (highest priority), case insensitively

- •

  feature identifier, case insensitively and hierarchically

- •

  strand (positive first)

- •

  start position

- •

  length (longest first)

- •

  feature key (lowest priority):

  - •

    **gene** or **pseudogene** (first)

  - •

    **mRNA**, **primary\_transcript**, or a recombination site such as **C\_region**

  - •

    **CDS**

  - •

    **exon** or **intron**

  - •

    anything else (last)

## SEE ALSO

[**gff2xml**(1)](/gff2xml/1.md), [**sort-table**(1)](/sort-table/1.md), [**transmute**(1)](/transmute/1.md), [**xtract**(1)](/xtract/1.md).
