Get more failures https://www.biospace.com/drug-development/5-clinical-assets-that-flopped-in-2024
With Anaconda and MongoDB installed, run this commands to get up and running in ~10min as you'll download the entire clinicaltrials.gov database and FDA approval file.
Note, I have a Macbook with the M2 chip so your environment might not translate. The better path would be to have this spun up in a server but that's a later problem 😉
chmod +x setup_structure.sh
./setup_structure.sh
- FDA data only shows True Positives (ie it does not return drugs failing approval eg Simufilam by NASDAQ:SAVA)
- Relatedly, there might be issues on comparing
- Using the ClinicalTrail.gov API and not their search feature
- Once I had all the Lead Sponsors from Clinical Trials, I manually downloaded and joined NYSE and NASDAQ data to get ~300 companies of the 7k.
- Study showing this works that used a data service that's prohibitively expensive; another paper that used BioPharmaAnalyst data
- Make modular updates to MongoDB vs slash & burn
- Use OpenFDA API instead of the manual download that was uploaded & updated on Dec 12, 2024
- There are often multiple names associated with a drug across data sources
- eg In the FDA, BIZENGRI is the brand name for the active ingredient "ZENOCUTUZUMAB-ZBCO" but Clinical Trials has "Zenocutuzumab" and "MCLA-128"
- The sponsor matches (FDA
MERUS N.V.; CTMerus N.V.)
- Maybe use Regulations.gov API to pull data on comments made about companies?
- JnJ Acquisition
- Overall, 90% of clinical drug trails fail between Phase 1 onward but about 40% succeed when at Phase 3.
- TODO
protocolSection.identificationModule.nctId (always one value)
protocolSection.sponsorCollaboratorsModule.leadSponsor.name (always one value)
protocolSection.statusModule.lastUpdatePostDateStruct.date (always one value)
protocolSection.interventions.name (but not `name: 'Placebo'`; this can still return multiple values)
protocolSection.interventions.otherNames (list)
protocolSection.statusModule.overallStatus (directional but not definitive)
protocolSection.oversightModule.isFdaRegulatedDrug
protocolSection.designModule.phases ('PHASE3')
protocolSection.statusModule.lastUpdateSubmitDate
results.application_number (unique ID)
results.sponsor_name (might match `company_ct`)
products.brand_name
products.active_ingredients
openfda.substance_name
openfda.generic_name
results.submissions.submission_status_date (when submission_type = "ORIG" and submission_code = "AP")
results.submissions.submission_status,
results.submissions.submission_class_code
project_root/ ├─ data_ingest/ │ ├─ extract_load_clinical_trials.py │ ├─ extract_load_fda_approvals.py │ ├─ extract_load_stocks.py │ └─ raw_data/ │ ├─ data_cleaning/ │ ├─ combine_fda_and_ct.py │ ├─ filter_clinical_trials.py │ ├─ filter_fda_approvals.py │ ├─ filter_stocks.py │ ├─ integrate_stocks_and_drugs.py │ └─ processed_data/ │ ├─ viz/ │ ├─ plot_stock_time_series.py │ └─ figures/ (PNG, HTML) │ ├─ models/ │ ├─ feature_engineering.py │ ├─ train_model.py │ ├─ evaluate_model.py │ └─ saved_models/ │ ├─ utils/ │ ├─ config.py │ ├─ helpers.py │ └─ constants.py │ └─ README.md