Skip to content

Convert GCT to XLSX

Convert Gene Cluster Text expression matrices to XLSX while preserving headers, values, and metadata checks.

Make XLSX files online

We can't read GCT files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into XLSX:

Want to convert GCT to XLSX?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert gct to xlsx file

Excel, a reporting system, or a recipient who does not use GenePattern may require the matrix as an .xlsx workbook. Converting locally also makes the data easier to filter, chart, share, and archive without uploading potentially confidential expression results.

What the GCT format is

GCT means Gene Cluster Text. It is a tab-delimited text format used for gene-expression matrices and related genomic data, especially by the Broad Institute’s GenePattern and Gene Set Enrichment Analysis tools; R and Bioconductor workflows can also read or create it.

A standard versioned GCT file contains:

  • a version marker such as #1.2 on the first line;
  • the data-row and data-column counts on the second line;
  • a tab-separated header, normally beginning with Name and Description, on the third line;
  • gene identifiers, descriptions, and expression values on subsequent lines.

The .gct extension is also used by unrelated software. Open the file in a text editor and confirm that its first lines match the Gene Cluster Text structure before using these steps.

What the XLSX format is

XLSX is the Office Open XML workbook format supported by Microsoft Excel, LibreOffice Calc, Apple Numbers, and many reporting systems. It supports worksheets, filters, formulas, charts, formatting, and data validation, making it suitable for spreadsheet editing and distribution.

XLSX is not a complete replacement for GCT: the version marker and declared dimensions are not normally stored as workbook metadata, and spreadsheet applications can reinterpret scientific values or identifiers. Keep the original GCT file as the authoritative analysis source.

Convert with Python and pandas

This method is reproducible and avoids Excel’s automatic type conversion. Install Python and the required packages:

python -m pip install pandas openpyxl

Create gct_to_xlsx.py:

import pandas as pd

source = "input.gct"
target = "output.xlsx"

with open(source, "r", encoding="utf-8-sig", newline="") as f:
    version = f.readline().strip()
    dimensions = f.readline().rstrip("\r\n").split("\t")

if not version.startswith("#"):
    raise ValueError("Missing GCT version marker")
if len(dimensions) < 2 or not all(x.isdigit() for x in dimensions[:2]):
    raise ValueError("Invalid GCT dimension line")

rows, columns = map(int, dimensions[:2])
data = pd.read_csv(
    source,
    sep="\t",
    skiprows=2,
    dtype=str,
    keep_default_na=False,
    na_filter=False,
    encoding="utf-8-sig"
)

if len(data) != rows or len(data.columns) != columns:
    raise ValueError(
        f"Declared size is {rows} x {columns}, "
        f"but the table is {len(data)} x {len(data.columns)}"
    )

data.to_excel(target, index=False, sheet_name="GCT data")
print(f"Wrote {target}")

Place the script beside the source file, change input.gct and output.xlsx if needed, and run:

python gct_to_xlsx.py

The workbook contains the tabular header and data. The GCT version and dimension line are validated but omitted from the worksheet; retain them separately if downstream users need that metadata.

Convert with Excel or LibreOffice

For a small, non-sensitive file, import it as delimited text instead of merely renaming the extension:

  • Excel: choose Data → From Text/CSV, select the GCT file, set the delimiter to Tab, and exclude the first two lines if the preview treats the version and dimension lines as records. Load the table, then choose File → Save As and select Excel Workbook (*.xlsx).
  • LibreOffice Calc: choose File → Open, select Separated by and Tab in the import dialog, exclude the first two metadata lines, then choose File → Save As and select Excel 2007–365 (*.xlsx).

Set identifier columns to Text during import when they contain leading zeros, long numeric-looking IDs, dates, or other strings that must remain unchanged. A generic online converter may not understand the two GCT metadata lines, and uploading genomic data may violate laboratory or institutional policy. Use an online service only when it explicitly supports Gene Cluster Text, produces an XLSX file, and your data policy permits the upload; local Excel, LibreOffice, or Python conversion is safer.

Quality and compatibility checks

  • Compare the worksheet’s data-row and data-column counts with the second GCT line.
  • Confirm that the first two fields remain the identifier and description columns and spot-check expression values against the source.
  • Keep fields as text when exact strings, leading zeros, missing-value markers such as NA, or scientific notation must be preserved. The Python example disables pandas’ default missing-value conversion; selected expression columns can be converted to numeric values later.
  • Do not expect GCT-specific version metadata, comments, or analysis semantics to survive as native XLSX metadata. Add a worksheet note or separate metadata sheet if the recipient needs that context.
  • Excel worksheets allow a maximum of 1,048,576 rows and 16,384 columns. Large matrices may exceed those limits or become slow; retain GCT for computation and export only selected genes, samples, or summary statistics when necessary.

GCT vs XLSX: format comparison

How the GCT and XLSX formats compare on the properties that matter most for this conversion.

Comparison of the GCT and XLSX file formats
Property .GCT Gene Cluster Text .XLSX Microsoft Excel Open XML Spreadsheet
Open standard Yes Yes
Compression Uncompressed Both
Typical file size Small Medium
Opens in a web browser No Partial
Further editing Easy Easy
Metadata support None Extensive
Plain-text readable Yes No
Best used for Data exchange Data exchange
Introduced — 2007
Developer Broad Institute / GenePattern ecosystem Microsoft
MIME type — application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Information about file extensions and file types is provided by File-Extensions.org

The database currently does not contain any direct gct file converter links.

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.