Skip to main content

genetrek

Python client and command line for GeneTrek: curated gene lists for neurodevelopmental disorders (NDD) and per-gene annotations (constraint, brain expression, rare-variant results) in one versioned table.

pip install genetrek            # or: uv add genetrek
pip install "genetrek[pandas]"  # to call .to_pandas() on the tables

Python 3.10 or newer. GeneTrek is for research use only, not for diagnostic use.

From Python

from genetrek import GeneTrek, Set

gt = GeneTrek()                                   # the public instance

hc = gt.gene_list("hc_ndd")                       # a gene list's members
table = gt.genes(["SHANK3", "KIAA1650", "85358"],  # any identifiers, any mix
                 columns=["loeuf", "hc_ndd"])       # -> polars DataFrame
gt.convert(["SHANK3", "ENSG00000100888"], to=["hgnc", "ncbi"])
gt.search("chr22:50,674,408-50,733,212")          # what the search box does

result = gt.compare([
    Set.field("hc_ndd"),
    Set.genes(["SHANK3", "CHD8", "SCN2A"], label="my genes"),
    Set.file("candidates.txt"),
])
result.pairs        # overlap, odds ratio with exact 95% CI, Fisher p, FDR, adjusted
result.methods      # the methods paragraph, with the database release
result.to_request_json("request.json")   # gt.replay("request.json") later

Tables are polars DataFrames; with the pandas extra, table.to_pandas(). A null means "not measured" and is never turned into False.

Errors are exceptions you can catch: UnknownGene, AmbiguousGene, UnknownField, NotAGeneList, and ApiError (with the server's .code) for the rest. Identifiers that match no gene, or several, are reported in an UnresolvedWarning rather than dropped silently.

From the shell

genetrek list hc_ndd > hc_ndd.txt                    # one gene per line
genetrek genes my_genes.txt --columns loeuf,hc_ndd   # TSV to stdout
genetrek convert - --to hgnc,ensg < ids.txt
genetrek search SHANK3 chr22:50674408-50733212
genetrek compare hc_ndd my_genes.txt:mine --out results/
genetrek replay results/request.json
genetrek download -o genetrek.parquet
genetrek --help

Tables go to stdout as TSV (NA for null), messages to stderr; --json prints JSON.

Which server

The public instance, https://genetrek.pasteur.fr, is the default. To use another one, name it once:

genetrek config add local http://localhost:8000
genetrek config add dev https://genetrek.dev.example.org --default
genetrek info          # says which server answered, and why it was chosen

The names live in a small TOML file in your configuration directory (genetrek config list prints where; $GENETREK_CONFIG moves it). The first of these that is set wins: GeneTrek(base_url=...) or --url; GeneTrek(server="dev") or --server dev; $GENETREK_URL; $GENETREK_SERVER; the file's default; the public instance.

Your genes

Your identifiers travel in request bodies only, never in a URL, so they are not written to any server's access log, and nothing you send is cached to disk. A My lists share link is read locally: only its token is sent.

Versions

Every result carries the database release it was computed on (result.release, gt.release()). The client checks the server's API version: genes(), search() and the error codes need API 1.1, which genetrek.pasteur.fr serves from GeneTrek v8; against an older server those methods raise ServerTooOld, and everything else works.

Citing and licences

How to cite GeneTrek: https://genetrek.pasteur.fr/cite. The code is MIT-licensed; the data keep each source's terms, listed per column on https://genetrek.pasteur.fr/columns.

Metadata

Release files for genetrek 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for genetrek 0.1.0
File Size Uploaded Provenance Actions
genetrek-0.1.0.tar.gz 30.5 kB With provenance Details for genetrek-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genetrek 0.1.0
File Interpreter ABI Platform Actions
genetrek-0.1.0-py3-none-any.whl Python 3 none any Details for genetrek-0.1.0-py3-none-any.whl

Total release size: 61.7 kB

Release files / genetrek-0.1.0.tar.gz

Download URL genetrek-0.1.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f79f55dc547f0cfa69f16e5d75d21075924852d653c549f1f7558fe001157a11
BLAKE2b-256 checksum
How to use checksums
6aabb53d9937dac171718f814ace31aee36c08a7cdff62d6c599b963d5612b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / genetrek-0.1.0-py3-none-any.whl

Download URL genetrek-0.1.0-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70ad8d985d4a8a9170e8a61835c107b23aa908623352a56819a1b6cdf85d29b5
BLAKE2b-256 checksum
How to use checksums
4ac8750023527cd59ee9a308c516e4d027abf1e6405c70cd16c769b583bf47be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for genetrek 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for genetrek-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page