The GMT (Gene Matrix Transposed) file format is a tab-delimited text file where each row defines a single gene set using three required columns: the gene set name, a brief description, and a list of gene identifiers belonging to that set. This flat-file structure serves as the primary input for tools like GSEA and Enrichr.
Glossary
GMT File Format

What is GMT File Format?
The GMT file format is the standard tab-delimited text format for storing gene set databases used in pathway enrichment analysis.
Each row in a GMT file is variable-length, with the gene identifier list extending across an arbitrary number of tab-separated columns. The format is the backbone of the Molecular Signatures Database (MSigDB) and enables the storage of curated pathway definitions, Gene Ontology annotations, and computationally derived gene set collections for functional class scoring and over-representation analysis.
Key Characteristics of GMT Files
The GMT (Gene Matrix Transposed) file format is the universal standard for storing and distributing gene set databases. Its simple tab-delimited structure enables seamless interoperability between pathway enrichment tools like GSEA, Enrichr, and custom analysis pipelines.
Tab-Delimited Row Structure
Each line in a GMT file represents a single gene set and is composed of three required columns separated by tab characters. The first column contains the gene set name (a unique identifier), the second column provides a description (often a URL or free text), and all subsequent columns list the gene identifiers (e.g., HGNC symbols, Entrez IDs) belonging to that set. This flat, line-oriented structure makes the format trivially parseable by standard Unix tools like awk and cut.
Variable-Length Gene Membership
Unlike fixed-width matrix formats, GMT files accommodate gene sets of arbitrary size. A pathway like 'Apoptosis' may contain 80 genes, while 'Ribosome' may contain 150. The tab-delimited format naturally handles this variability because each line simply continues until the final gene identifier. Parsers read until the newline character, making the format inherently schema-flexible without requiring a predefined column count.
Identifier Consistency Requirement
The gene identifiers used within a GMT file must match the identifier namespace of the expression dataset being analyzed. Common namespaces include:
- HGNC gene symbols (e.g., TP53, BRCA1)
- Entrez Gene IDs (e.g., 7157, 672)
- Ensembl Gene IDs (e.g., ENSG00000141510) Mismatched namespaces are a primary source of enrichment analysis failure, as the tool cannot map gene sets to the ranked expression list.
Human-Readable and Editable
Because GMT files are plain text, they can be opened, inspected, and modified in any text editor. Researchers frequently create custom GMT files by subsetting existing databases, merging gene sets from multiple sources, or defining entirely novel gene sets based on experimental data. This transparency contrasts with binary or database-locked formats and supports FAIR data principles (Findable, Accessible, Interoperable, Reusable).
GMT vs. GMX Format
The GMX (Gene Matrix eXpanded) format is a closely related alternative where each gene set occupies its own column in a tab-delimited file, with the gene set name in the first row and member genes listed below. While GMX is more convenient for visual inspection in spreadsheet software, GMT is preferred for programmatic processing because each gene set is an independent record, enabling line-by-line streaming for memory-efficient parsing of large collections containing thousands of gene sets.
Frequently Asked Questions
A technical deep dive into the Gene Matrix Transposed file format, the universal standard for storing and distributing gene set collections in bioinformatics enrichment analysis.
A GMT (Gene Matrix Transposed) file is a tab-delimited text format for storing gene set databases where each row represents a single gene set. The structure consists of three required columns followed by a variable number of gene identifier columns. The first column contains the gene set name (a unique identifier), the second column contains a description (often a URL or free-text annotation), and all subsequent columns contain the gene identifiers belonging to that set. Each row is terminated by a newline character. Critically, the number of gene columns varies per row—there is no requirement for uniform width. This sparse, row-oriented design makes GMT files human-readable and easily parseable by standard bioinformatics tools like GSEA, Enrichr, and clusterProfiler. The format's simplicity is its strength: it imposes no schema beyond the tab delimiter, allowing it to represent any collection of named sets, from Gene Ontology categories to custom CRISPR screen hits.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The GMT file format is the standard data exchange backbone for gene set enrichment analysis. Understanding these related concepts is essential for building robust, reproducible computational biology pipelines.
Gene Set Enrichment Analysis (GSEA)
The primary analytical consumer of GMT files. GSEA loads a GMT-formatted gene set database and evaluates whether predefined gene sets show statistically significant differences between two biological states. The algorithm uses a running sum statistic to detect non-random clustering of gene set members within a ranked expression list, producing an Enrichment Score (ES) for each GMT entry.
Gene Set Collection
A curated library of gene sets sharing a common biological theme, stored as a single GMT file. Collections can be:
- Positional: Gene sets organized by chromosomal cytoband location
- Curated: Manually assembled from literature and pathway databases like KEGG and Reactome
- Computational: Derived from mining large-scale expression data for co-regulated modules
- Ontology: Built from Gene Ontology term annotations
Over-Representation Analysis (ORA)
A complementary enrichment method that also consumes GMT files but uses a different statistical approach. ORA takes a thresholded list of differentially expressed genes and tests whether any gene set in the GMT database contains more DE genes than expected by chance. The hypergeometric distribution models the null probability, making ORA conceptually simpler but sensitive to the chosen significance cutoff.
Enrichment Map Visualization
A network-based method for visualizing GSEA results from GMT databases. Nodes represent enriched gene sets, while edges connect sets with substantial leading-edge subset overlap. This approach reveals pathway crosstalk and functional modules that would be obscured in flat ranked lists, helping researchers identify the dominant biological themes emerging from their GMT collection.
Gene Ontology (GO)
A structured vocabulary that provides the annotation backbone for many GMT files. GO organizes gene product attributes into three independent ontologies: Biological Process, Molecular Function, and Cellular Component. GMT files derived from GO map each ontology term to its associated gene identifiers, enabling systematic functional profiling of experimental results.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us