Sovereign 8s.is mirror of standardgalactic/trex
  • Python 83.7%
  • Shell 16.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-03 10:54:39 +02:00
apps Delete apps/varscan.jar 2026-03-24 15:33:04 +01:00
icon.iconset Add files via upload 2026-03-24 15:10:20 +01:00
licenses Update LICENSES.txt 2026-07-29 16:54:52 +02:00
ref_data Add files via upload 2026-03-24 15:14:35 +01:00
01_alignment_paired_end.sh Add files via upload 2026-03-24 13:55:01 +01:00
01_alignment_single_end.sh Add files via upload 2026-03-24 13:55:01 +01:00
02_combine_gatk_varscan.sh Add files via upload 2026-03-24 13:55:01 +01:00
02_gatk.sh Add files via upload 2026-03-24 13:55:01 +01:00
02_varscan.sh Add files via upload 2026-03-24 13:55:01 +01:00
03_snpeff.sh Add files via upload 2026-03-24 13:55:01 +01:00
analysis_pipeline.py Add files via upload 2026-03-24 13:55:01 +01:00
annotation.py Update annotation.py 2026-07-29 16:56:30 +02:00
controller.py Add files via upload 2026-03-24 13:55:01 +01:00
GLOBAL_PATHS.py Update GLOBAL_PATHS.py 2026-07-29 16:57:34 +02:00
icon.icns Add files via upload 2026-03-24 13:55:01 +01:00
read_variant_file.py Update read_variant_file.py 2026-07-29 16:58:48 +02:00
README.md Clearer installation guidelines 2026-08-03 10:54:39 +02:00
relevant_csv_headers.py Update relevant_csv_headers.py 2026-07-29 17:01:45 +02:00
requirements.txt Add files via upload 2026-03-24 13:55:01 +01:00
run_controller_parallel.sh Update run_controller_parallel.sh 2026-08-02 14:23:48 +02:00
statistics.py Add files via upload 2026-03-24 13:55:01 +01:00
t_rex_logo.png Add files via upload 2026-03-24 13:55:01 +01:00
view.py Update view.py 2026-07-29 17:02:35 +02:00

T-Rex


Overview

T-Rex (Trio Rare variant analysis of Exomes) is a desktop application for standardized and local analysis of Illumina whole exome sequencing germline trio data.

It enables users to process FASTQ, BAM, VCF, CSV, and TSV files with customizable filtering options for variant type, statistical significance, and population allele frequency based on the gnomAD database v4.1.


Key Features

  • Intuitive desktop GUI built with CustomTkinter (Python)
  • Compatible with macOS (arm64), Linux (x86, Ubuntu ≥24), and Windows (via WSL2 on Windows 11+)
  • End-to-end integrated analysis pipeline with:
    • Read preprocessing using Trimmomatic
    • Alignment to GRCh38 reference genome using BWA-MEM
    • Post-processing with Picard
    • Variant calling by GATK4 HaplotypeCaller and VarScan2
    • Variant annotation via SnpEff / SnpSift
    • Quality control after each analysis step
  • Statistical tests supported: Chi-square test and Transmission Disequilibrium Test with automatic Bonferroni correction (α ≤ 0.05)
  • Filtering based on allele frequency from gnomAD v4.1 (PopMax, Overall, European, and Non-Finnish European populations)
  • Pathogenicity annotation using ClinVar data (Release date: 20.07.2026)
  • Tested with 13 medical doctors and scientists for stability and intuitive user design

Getting Started

Installation & System Requirements

  • macOS: arm64 (M1+ chips)
  • Linux: x86 architecture (Ubuntu 24+)
  • Windows: Windows 11 with WSL2 enabled (see official WSL installation guide)
  • The app was tested on M1 chips and on Ubuntu 24.

Launching the App

  • For macOS (arm64) and Linux (x86 Ubuntu ≥24) users, we recommend to download the precompiled app from Zenodo.
  • For Windows 11+ users, WSL2 (Windows Subsystem for Linux 2) must be installed and activated before running the app. We then recommend downloading the precompiled Linux version from Zenodo.

Important:
T-Rex runs inside WSL2 on Windows. Follow Microsoft’s official guide to install and enable WSL2:
https://learn.microsoft.com/en-us/windows/wsl/install

Installation via GitHub on macOS and Linux

1. Clone the repository:

git clone https://github.com/SaraLuisaReh/trex.git

cd trex

2. Ensure Python 3.12 is installed

python3.12 --version

3. Check that tkinter is installed (Tkinter is a standard (built-in) Python library and is usually included with most Python installations.)

python3.12 -m tkinter

If a small window opens, tkinter is installed correctly.

If not:

On Ubuntu/Linux:

sudo apt install python3-tk

On macOS: Install Python via Homebrew or from the official Python installer, as tkinter is sometimes not included in system Python:

brew install python@3.12

4. Create a virtual environment

python3.12 -m venv venv

5. Activate the virtual environment

source venv/bin/activate

6. Install required Python packages

pip install --upgrade pip

pip install -r requirements.txt

7. Download the reference dataset ZIP from Zenodo:

  • Unzip the downloaded file.

  • Copy all files from the unpacked folder into the ref_data folder inside your T-Rex installation. Only copy the single files, not the whole folder! Do not rename or move the files, as T-Rex relies on the exact file names for correct operation.

  • Following these steps ensures the application can access the reference data without errors.

For the fully precompiled T-Rex app from Zenodo: You do not need to download this reference dataset. The precompiled app already includes all necessary reference files.

8. Download the app binaries

  • Download the app binaries ZIP for your operating system from Zenodo:

    • Linux/Ubuntu: apps_linux.zip
    • macOS: apps_macos.zip
  • Unzip the downloaded file.

  • Open the apps folder inside of the extracted folder.

  • Copy all files and folders from the extracted apps folder into the apps folder of your T-Rex installation.

    • Copy only the files and subfolders into the apps folder. Do not copy the extracted folder itself.
    • Do not rename, remove, or move any files or folders, as T-Rex expects the original file names and directory structure.

Note:If you downloaded the fully precompiled T-Rex application from Zenodo, you can skip this step. The precompiled application already contains all required app binaries.

9. Run the application:

python view.py

10. Fixing execution permissions

In some cases, the downloaded app may not have the correct execution permissions.

To fix this, run:

chmod -R u+x /path/to/your/folder

This grants execution rights to all files in the folder for your user.

If you prefer a more restrictive approach (only making files executable):

find /path/to/your/folder -type f -exec chmod +x {} ;


Starting an Analysis

  • Click “New Analysis” in the app and follow the on-screen instructions.

Input file formats

  • Supports FASTQ, BAM, VCF, CSV, and TSV input files.

  • For TSV/CSV input, the file must include these exact headers (order doesn’t matter):

    • sample
    • location (format: chromosome:position, e.g. 9:141950, no 'chr')
    • ref (reference base)
    • alt (alternate/variant base)
    • biotype (protein coding variants must be 'protein_coding')
    • af_c (allele frequency of the child, decimal ≤ 1.0)
    • af_f (allele frequency of the father)
    • af_m (allele frequency of the mother)
    • gnomad_af (allele frequency in reference population)
    • gnomad_an (allele number in reference population)
  • Recommendation: We recommend to start the analysis with FASTQ, BAM or VCF files due to the stricter format requirements for TSV/CSV files.

Test files

T-Rex can be tested by downloading the file “trio-test-data.zip” from Zenodo. The dataset contains FASTQ, BAM, VCF, and TSV files from three artificial trios.

The dataset is very small and only requires a few minutes to run.

The dataset includes four variants with a gnomAD allele frequency of approximately 85%. To ensure that all variants are displayed in the application, please set the maximum allele frequency to 100%.

Running the analysis pipeline on a server and/or parallelized

The analysis pipeline of T-Rex can also be run parallelized on a server via the bash script "run_controller_parallel.sh". Usage instructions are in the script.


Source Code & Citation

  • The full source code is available on GitHub.
  • Please cite the software using the Zenodo archive DOI.

Credits

  • Code developed by: Sara-Luisa Reh, Carolin Walter
  • Supervisors: Franziska Auer, Julia Hauer
  • Contributors: Judith Lohse, Tabita Ghete, Markus Metzler, Anne Quante, Arndt Borkhardt
  • Logo design: Anne-Christine Reh
  • Acknowledgments We thank the 13 medical doctors and scientists who participated in user testing for their valuable feedback.

Reference Data

T-Rex uses publicly available reference datasets:

  • Ensembl GRCh38 (© EMBL-EBI and the Ensembl project, CC BY 4.0)
  • gnomAD v4.1 (© Broad Institute, CC BY 4.0)
  • ClinVar (Release date: 20.07.2026) (NCBI, Public Domain)

Preprocessed reference files compatible with T-Rex are available on Zenodo.

These files are derived from the original datasets and have been modified (e.g., formatting, filtering, indexing) for compatibility with the pipeline.

Full license and attribution information is provided in licenses.txt. Full scientific citations for these datasets are provided in the associated publication.


License

  • T-Rex is licensed under the GNU General Public License v3.0 (GPLv3).
  • See the included LICENSE and LICENSES.txt files for third-party tools and dependencies.

Disclaimer

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. USE IT AT YOUR OWN RISK.