Data inputs¶
Mira combines public clinical and biomedical datasets with Open Targets entity indices. This page records where each source comes from, the format Mira expects, and where it fits in the default local layout.
Input acquisition will be automated separately. A future Make target or equivalent command should implement this contract without moving source-specific assumptions into the provider code.
Note
Previously generated LLM results are deliberately outside the scope of this page.
Input inventory¶
| Input | Source | Version policy | Format used by Mira | Default destination |
|---|---|---|---|---|
| Disease index | Open Targets downloads | Latest Open Targets release; use the same release as the drug-molecule index. | Partitioned Parquet read by Spark. | <data_root>/inputs/disease/ |
| Drug-molecule index | Open Targets downloads | Same Open Targets release as the disease index. | Partitioned Parquet read by Spark. | <data_root>/inputs/drug_molecule/ |
| ChEMBL database | ChEMBL 37 PostgreSQL archive | ChEMBL 37. | PostgreSQL database. | Database configured by CHEMBL_DB_URI; default localhost:5432/chembl_37. |
| ChEMBL clinical-trial mapping | Legacy private Oracle curation | Existing internal runs only; the process is intended for deprecation. | One Parquet file. | <data_root>/inputs/chembl_mapping.parquet |
| AACT | AACT downloads | Latest database snapshot selected for the run. | PostgreSQL database using the ctgov schema. |
Database configured by AACT_DB_URI; default localhost:5432/aact. |
| TTD drug–disease data | Therapeutic Target Database file | Latest available file; record the download date. | Structured text file. | <data_root>/inputs/P1-05-Drug_disease.txt |
| EMA human medicines | EMA medicines report | Latest report; record the download date. | Excel workbook. | <data_root>/inputs/medicines-output-medicines-report_en.xlsx |
| PMDA approvals | PMDA list of approved products | Latest consolidated New Drugs PDF linked from the page; record its covered date range. | PDF. | <data_root>/inputs/pmda_approvals.pdf |
data_root is set by MIRA_DATA_DIR and defaults to data. Database inputs are configured separately because Mira queries them rather than reading their dump archives directly.
Recommended local layout¶
<MIRA_DATA_DIR>/
├── inputs/
│ ├── disease/
│ │ └── *.parquet
│ ├── drug_molecule/
│ │ └── *.parquet
│ ├── chembl_mapping.parquet
│ ├── P1-05-Drug_disease.txt
│ ├── medicines-output-medicines-report_en.xlsx
│ └── pmda_approvals.pdf
└── outputs/
The Open Targets indices are distributed datasets: keep their Parquet parts together in their respective directories. Spark reads the directory, so the files do not need to be concatenated.
Keep a release manifest¶
Important
“Latest” changes over time. Every prepared input bundle should record the versions actually used, even when the acquisition command normally selects the newest release.
A future acquisition rule should write a small manifest containing at least:
- acquisition timestamp;
- source URL;
- Open Targets release identifier for both indices;
- ChEMBL release number;
- AACT snapshot date;
- download date for TTD and EMA;
- PMDA PDF title and covered date range;
- local destination;
- checksum when the publisher provides one, or a locally computed checksum otherwise.
Important
The disease and drug-molecule indices must come from the same Open Targets release. The ChEMBL database and any derived ChEMBL export should also record a common ChEMBL release.
Open Targets entity indices¶
Mira uses the Open Targets disease and drug-molecule datasets to build OnToma lookup tables. Download both from the Open Targets data downloads page and select the same release.
Open Targets distributes each dataset as a directory of Parquet parts. Place the complete directories at:
Disease fields used by OnToma¶
The current OnToma integration reads:
idnameexactSynonymsnarrowSynonymsbroadSynonymsrelatedSynonyms
The disease identifier becomes the mapped diseaseId. Names and synonyms become candidate labels.
Drug-molecule fields used by OnToma¶
The current integration reads:
idnametradeNamessynonymscrossReferences
The current OnToma version expects tradeNames and synonyms to contain structured labels with their source, and crossReferences to contain a source and list of identifiers. This is why Mira should consume the Open Targets release dataset directly rather than a simplified list of ChEMBL names.
Mira loads both directories as Spark DataFrames. See Entity mapping for how the lookup tables are used.
ChEMBL 37 PostgreSQL database¶
The default workflow uses the ChEMBL 37 PostgreSQL distribution. The configured default is:
Override the address, schema, or credentials with CHEMBL_DB_URI, CHEMBL_DB_SCHEMA, CHEMBL_USER, and CHEMBL_PASSWORD.
Mira reads these tables from the standard ChEMBL database:
| Table | Columns selected by the default recipe | Purpose |
|---|---|---|
drug_indication |
drugind_id, molregno, max_phase_for_ind, efo_id, efo_term |
Curated drug indications and maximum phase. |
indication_refs |
drugind_id, ref_type, ref_id, ref_url |
Evidence source and traceable reference for each indication. |
molecule_dictionary |
molregno, chembl_id, pref_name |
Converts internal molecule keys to ChEMBL identifiers and preferred names. |
drug_warning |
warning_id, molregno, warning metadata, EFO fields |
Drug warnings and withdrawals. |
warning_refs |
warning_id, ref_type, ref_id, ref_url |
Evidence source and traceable reference for each warning. |
The recipe uses the singular ChEMBL table name drug_indication.
See the ChEMBL provider guide for the indication and safety evidence contributed, reference-source semantics, and selection rules.
Legacy ChEMBL clinical-trial mapping¶
Warning
The current Open Targets workflow can optionally use a mapping file produced from private ChEMBL Oracle curation. This is a legacy internal input and the process is intended for deprecation. It should not form part of the public input-acquisition workflow.
The file contains:
| Column | Meaning |
|---|---|
studyId |
ClinicalTrials.gov NCT identifier. |
drugFromSource |
Intervention label used for the study-and-label match. |
drugId |
ChEMBL molecule identifier. |
diseaseFromSource |
Condition label used for the study-and-label match. |
diseaseId |
EFO identifier. |
Save the export as:
The legacy exporter is extract_chembl_ct_curation. The full recipe currently expects its Parquet output. Public and new workflows should omit it with the override documented in Run without ChEMBL clinical-trial curation.
AACT¶
Download the selected PostgreSQL snapshot from the AACT downloads page. AACT publishes current snapshots and archives; record the snapshot date used for a reproducible run.
Mira expects the database schema to be ctgov and reads:
studiesinterventionsconditionsstudy_referencesdesignsbrief_summariesdetailed_descriptionssponsors
The exact selected columns and transformation rules are documented in the AACT provider guide. Database installation and refresh commands will be owned by the future acquisition workflow.
Therapeutic Target Database¶
Download P1-05-Drug_disease.txt and preserve that filename in the default layout.
The Mira parser recognises records by line prefixes:
TTDDRUIDfor the TTD drug identifier;DRUGNAMEfor the drug label;INDICATIfor the disease label, ICD-11 value, and clinical stage.
These fields are separated by tabs. A format change that removes the prefixes, changes their order, or changes the number of indication fields requires a parser update.
See the TTD provider guide for the evidence contributed and the transformation and selection rules.
EMA human medicines¶
Download the EMA medicines report workbook and save it as:
Mira reads the Medicine worksheet. It expects the workbook's first data row to contain the effective column headings and filters Category to Human.
The provider uses these fields:
EMA product numberMedicine statusInternational non-proprietary name (INN) / common nameActive substanceName of medicineTherapeutic area (MeSH)Therapeutic indicationMedicine URLMarketing authorisation date
When Therapeutic area (MeSH) is unavailable, Mira uses disease NER on Therapeutic indication.
See the EMA provider guide for the evidence contributed and the label-selection rules.
PMDA approved products¶
Open the PMDA List of Approved Products and select the consolidated PDF under New Drugs. The link and covered date range change as PMDA updates the list.
Save the chosen PDF as:
The parser discovers tables by headers resembling:
- approval date;
- brand name;
- approval or partial change;
- active ingredient;
- notes.
Warning
It keeps rows whose approval field contains Approval, extracts drug names from the active-ingredient column, and applies disease NER to the notes. Because PDF tables are layout-sensitive, record the PDF title and date range and verify parsed row counts whenever the source is refreshed.
See the PMDA provider guide for the evidence contributed and the row-selection rules.
What the acquisition rule should provide¶
The acquisition mechanism remains open. Whether it is implemented with Make, a script, or another workflow tool, it should:
- Resolve and record concrete source versions before downloading.
- Download public files into the paths defined above.
- Restore or refresh the AACT and ChEMBL databases through separate targets.
- Avoid redownloading unchanged files when checksums match.
- Write the release manifest only after each input has been prepared successfully.
- Validate file type, required directories, database connectivity, tables, and essential columns.
- Fail with the source name and expected remedy when an input contract changes.
This keeps acquisition reproducible while allowing the provider and mapping documentation to remain focused on data behavior.