Skip to content

feat: new command to update genes with current hgnc data

Feature: new command to update genes with current hgnc data

Usage e.g.:

python manage.py update_gene_hgnc -upg hgnc_complete_set.json

Arguments:

'--update_only_panel_genes', '-upg', "Update only genes contained in panels.")

'--create_missing_genes', '-m', "If gene is not found, create it.")

"hgnc_json_file"


Update Gene-data from HGNC (http://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/json/hgnc_complete_set.json)

This will:

1. Update Gene data
2. Increment and panel where this gene is referenced
3. Update all entities that use this gene

Runs as a transaction, won't update in case of any failure.

:param json_file: JSON File in the following format:

{
  "responseHeader": {
    "status": 0,
    "QTime": 21
  },
  "response": {
    "numFound": 42759,
    "docs": [
      {
        "date_approved_reserved": "1989-06-30",
        "vega_id": "OTTHUMG00000183507",
        "locus_group": "protein-coding gene",
        "symbol": "A1BG",
        "location": "19q13.43",
        "name": "alpha-1-B glycoprotein",
        "date_modified": "2020-09-17",
        "mgd_id": [
          "MGI:2152878"
        ],
        ..
       }
       ..
    ]
    "start": 0
  }
}

Checklist

  • The PR only includes changes relating to 1 ticket
  • I have added labels to reflect change type
  • I have checked all existing and new tests pass
  • I have checked that linting passes
  • I have added tests to cover my changes
  • I have updated the documentation where required
  • I have informed the team of any impactful changes
Edited by Rudi Koopmann

Merge request reports