Skip to content

v0.30.8 - opentargets and g2p fixes

Latest

Choose a tag to compare

@lauraluebbert lauraluebbert released this 28 Jun 23:22
· 51 commits to main since this release

Version ≥ 0.30.8 (Jun 28, 2026):

  • gget g2p: Either gene or --uniprot_id is now sufficient — whichever is missing is resolved via UniProt and cached. Gene→UniProt picks the canonical reviewed human Swiss-Prot entry; the resolution and its limitations are logged. The canonical pair is always prepended to the result as gene_name / uniprot_id columns (and stored on df.attrs), so the output schema is invariant regardless of input mode. Existing call sites continue to work.
    • New residues= filter (Python: int / list / range / set; CLI --residues 100,200,300 or 100-200) restricts features / alignment to specific positions client-side.
    • map results gain a parsed PDB Ids List column (list[str]) alongside the comma-joined PDB Ids string, for direct chaining into gget pdb.
    • Fixed silent failure when the gene/UniProt pair was unknown: G2P returns HTTP 200 with a JSON {"status":"failure",...} body that was being parsed as a single TSV column. Now logged as an error and returns None.
    • All failure modes now return None (was a mix of None and empty DataFrame).
    • Added retries with exponential backoff on transient failures (5xx, connection errors, timeouts).
    • URL-encoded path segments.
    • New out= Python argument writes the result to an explicit CSV path (takes precedence over save).
  • gget alphafold: Added a new jackhmmer_savedir argument (-jhd/--jackhmmer_savedir on the command line) that lets you choose where the temporary jackhmmer files are stored. By default, gget alphafold still creates a ~/tmp/jackhmmer/ folder in your home directory (which can take up to ~2 GB of disk space); the new argument lets you redirect these files elsewhere, e.g. to a disk with more free space. Resolves issue 49.
  • gget pdb: Added support for the PDBx/mmCIF structure format (fixes issue 178 and issue 177).
    • New resource="mmcif" option downloads the structure in PDBx/mmCIF format (.cif).
    • The default resource="pdb" now automatically falls back to PDBx/mmCIF when the legacy PDB file is unavailable (e.g. for large structures), since the legacy PDB format is being phased out by RCSB. A warning is logged and saved files use the correct extension (.cif).
  • gget opentargets: Adapted to several upstream Open Targets GraphQL API changes:
    • Fixed: gget opentargets resource="drugs" was failing with HTTP 400 — Field 'synonyms' of type '[DrugLabelAndSource!]!' must have a sub selection. Open Targets changed Drug.synonyms and Drug.tradeNames from scalar lists to lists of structured DrugLabelAndSource objects. The internal GraphQL query was updated to request the label sub-field; the drug.synonyms / drug.tradeNames columns in the returned DataFrame remain list[str], so existing user code is unaffected.
    • Fixed: gget opentargets resource="expression" had started returning an empty DataFrame because Open Targets retired the Target.expressions field. The query now uses the current Target.baselineExpression field. The returned columns have changed because the upstream data model changed: results are now per-biosample (tissue/cell type) baseline expression summary statistics (median, min, q1, q3, max, unit) with tissueBiosample/celltypeBiosample identifiers and datasourceId/datatypeId, instead of the old per-tissue RNA zscore/value/level fields. A gene can have thousands of biosamples; the page size follows --limit (capped at the API's 3000-per-request maximum), and a warning is logged if results are truncated — narrow with --filters (e.g. datasourceId, datatypeId). Resolves issue 247.
    • Docs: Clarified the meaning of the diseases resource score column (OpenTargets' single overall target–disease association score, 0–1, aggregated across all data types/sources — not a per-data-source score) and that disease.id values are EFO-mapped traits that include not only MONDO diseases but also phenotypes (HP_*) and measurements (EFO_*), with an example of how to filter to MONDO disease terms only. Addresses issue 168.
  • gget archs4 (tissue mode): No longer crashes with KeyError: ['color'] not found in axis when ARCHS4 intermittently omits the optional color column from its CSV response. The column is now dropped only if present. Output also has a deterministic row order (sorted by median descending, with id as tiebreaker) so equal-median tissues no longer flip order between requests.
  • gget bgee: Outbound Bgee API requests now send a User-Agent: gget/<version> header so the Bgee service can attribute (and, if needed, allow-list) gget traffic, improving resilience against intermittent request blocking.