Skip to the content.

Analyses of GREMA: reports, scripts and archived results

Everything about the evaluation of GREMA beyond the DREAM4 scoring script (evaluation/dream4_evaluate.py) is kept here: the reports, the scripts that make and score the data, and the archived results. All paths in the reports are relative to the root of the repository.

evaluation/
  dream4_evaluate.py            scoring of a result against a DREAM4-format gold standard
  gold_standards/, gold_standards_undirected/
  analysis/
    README.md                   this file
    *_REPORT.md, HANDOFF.md     the reports (table below)
    scripts/                    scripts of the analyses (table below)
    results/                    archived results (*.tgz) and results/README.md (what is in each archive)
  analysis/env/                 pixi.toml and pixi.lock of the Python environment of the analyses

Reports

Start here: GREMA_SCOPE.md, a one-page statement of what GREMA is for, on which data it worked and what the evidence does not support.

Report Question and answer in one line Archive in results/
HANDOFF.md The hand-off file the analyses started from (tasks T1-T4, rules, first results). Historical. final_results.tgz, irma_gp_inputs.tgz
SOS_REPORT.md SOS (4 experiments): -f 1 is better than -f 3, 500 generations are enough, the signs of the LexA edges are wrong, a simulation with a hidden LexA protein reproduces this, a restricted number of regulator slots trades TP against FP. sos_results.tgz
IRMA_REPORT.md IRMA: the built-in perturbation sets (-perturb) do not help; 500 / 1000 / 2000 generations give the same result. irma_t2_t3_results.tgz
HACKETT_REPORT.md TF-induction time courses of Hackett et al. (a microarray) with a gold standard of direct regulations: design, 5 min vs 15 min time grid, 10 / 3 / 2 regulator slots per gene. hackett_results.tgz
SSYSTEM_SLOTS_REPORT.md Default number of regulator slots (HFODE and S-system), 1 / 2 / 4 slots on IRMA, and the S-system output is not reversed. ssystem_slots_results.tgz
METHODS_REPORT.md GREMA against dynGENIE3; why SOS cannot rank methods (permutation control); edge scores, filters before GREMA, a second TF subset, real time points (-time). methods_comparison_results.tgz, hackett_set2_results.tgz, real_time_points_results.tgz
SIGN_SIMULATION_REPORT.md Signs of GREMA on simulated signed networks: right (92-100%) with the model right and with seven mild misspecifications. sign_simulation_results.tgz
PROTEIN_REGULATOR_REPORT.md Promoter activity measured, protein regulators, a shared driver: collinearity lowers the detection; an opposite direction (cleavage) makes the signs wrong. sim_protein_results.tgz
SIGNS_REAL_DATA_REPORT.md On the real IRMA data only 25-50% of the signs are right; not caused by the amount of data, a delay, an input or a protein-level inhibition, and a linear model is as wrong; a check of the data before the run. irma_sign_factors_results.tgz
HMSC_FEASIBILITY_REPORT.md Can GREMA build a GRN from the internal hMSC time series (RNA-seq + ATAC-seq footprints, 1 series of 5 points)? No: nothing that uses the dynamics recovers the 11 TRRUST pairs; a footprint prior is weakly informative (odds ratio 2.7); changes that could matter. hmsc_feasibility_results.tgz
IRMA_PREDICTION_REPORT.md Does the model fitted on IRMA switch-on predict switch-off (and the reverse)? No: skill -4.7 free-running, worse than persistence; in-sample 0.95. The model has no external input. irma_predict_results.tgz
INPUT_TERM_DESIGN.md, INPUT_TERM_REPORT.md An external input for HFODE (-input): design, implementation and tests. Works on simulated data with a known input (input edges AUROC 0.95, signs 15/15, held-out condition skill 0.92); no improvement on real IRMA and SOS. input_term_results.tgz
NONHILL_FORM_REPORT.md Is the limit of GREMA the Hill form or the data? Simulations with an OR gate, non-monotone, delayed (protein stage) and linear regulation: with 4 series the Hill fit tolerates all but the delay; with 1 series the misspecified forms lose 0.09-0.22 AUROC. sim_nonhill_results.tgz
SIGN_DIAGNOSIS_REPORT.md Why are the signs wrong on real IRMA? With the true structure told GREMA is right for only 43-50% of the signs, the sign is the same in every GA run and equals the sign of a linear regression (14/14), and it flips between switch-on and switch-off for 4 of 7 edges: the cause is the data, not the model. irma_sign_diagnosis_results.tgz
AUGMENTATION_REPORT.md Can augmented data (-perturb, GP samples) take the place of real series? No (simulation with a known truth): one more real series gives +0.10 AUROC, the best augmentation +0.04 and an unstable prediction. sim_augment_results.tgz
DREAM4_REPORT.md DREAM4 size 10 (5 networks): GREMA detects (AUROC 0.73, permuted 0.56), like dynGENIE3 in AUROC (0.74-0.76) and below it in AUPRC (0.36 against 0.51-0.53); signs right for 95% of the called edges (signs derived from the knockouts); 2 slots instead of 3 halve the false regulations (AUPRC 0.43). The size-10 inputs are identical to the official data; the size-100 inputs of the networks 1, 2 and 4 of the repository are damaged. dream4_size10_results.tgz

Main findings (details and limits in the reports)

Scripts (scripts/; each has a usage line in its docstring)

Group Scripts
Run and score GREMA run_one.sh (one run in its own directory), eval_runs.py (AUROC / AUPRC of groups of runs), iteration_table.py, convergence.py, eval_prefilter.py, combine_scores.py, postprocess_scores.py, contrast_scores.py
Make or change the input data hackett_explore.py, hackett_prep.py (Hackett data and the gold standard of Ma et al.), make_sos_p_inputs.py, permute_replicates.py (the permutation control), augment_filtered.py, unfilter_results.py
Simulations sim_gen.py (IRMA topology), sim_sos.py, sim_sos_p.py (SOS with a hidden / measured LexA protein), sim_signed_net.py (random signed networks and variants), sim_protein_net.py (protein regulators, shared driver), sim_irma_like.py (IRMA-like with three switches)
Other methods and filters dyngenie3_runner.py (needs the dynGENIE3 code, see the report), lasso_prefilter.py, hsic_prefilter.py, hill_dictionary.py, gp_auto.py, gp_v2.py (Gaussian-process augmentation)
Signs and checks of the data eval_signs.py, eval_sim_variants.py, eval_protein_sims.py, eval_irma_like.py, eval_signs_real.py, linear_signs_irma.py, check_data.py
hMSC (RNA-seq + ATAC-seq) hmsc_prep.py (inputs, TRRUST gold standard, footprint prior), hmsc_prior_enrichment.py, hmsc_baselines.py, hmsc_time_control.py, hmsc_diagnose.py
Prediction predict_irma.py (free-running simulation of the fitted HFODE model on another condition, baselines)
External input make_input.py (input rows from a table of start times and levels), grema_simulate.py (simulate a fitted model for a new condition), sim_input_net.py, eval_input_sim.py (simulation with a known input), prep_sos_input.py, eval_sos_input.py (SOS with the UV dose), check_input_regression.sh (no change without -input), check_data.py --input
Non-Hill forms sim_nonhill.py (the IRMA topology with an OR gate, a bell, a protein stage or linear regulation), eval_nonhill.py
Sign diagnosis irma_oracle_knowledge.py (IRMA knowledge files with the true structure), eval_irma_oracle.py, irma_sign_oracle_linear.py (regression with the true structure; --grema compares it with GREMA)
Augmentation sim_aug_prep.py (a signed network with 5 series: real data s1-s4 and a held-out series), eval_augment.py (with gp_v2.py and -perturb)
DREAM4 dream4_verify_source.py (the DREAM4 files of the repository against the Bioconductor copy), eval_dream4.py, dream4_signs.py (signs of the gold edges from the knockout data, and the signs of GREMA against them), eval_dream4_slots.py (3 against 2 regulator slots), eval_dream4_null.py (a vote threshold from the permutation control: it fails), eval_dream4_genefit.py (the fit of a gene against its fit on permuted data: finds the genes without a regulator), dream4_perreg_fit.py, eval_dream4_perreg.py (a conditional permutation test for every called regulation: precision 0.28 to 0.53, not at its level)

Python scripts need numpy, scipy and scikit-learn; hsic_prefilter.py also pyHSICLasso; dyngenie3_runner.py needs the dynGENIE3 code and was run in a pixi environment (see METHODS_REPORT.md).

Run directories, downloaded data and logs (GREMA_analysis_runs/, outside the repository)

On the machine where the analyses were run they are in /mnt/10T-backup-mingju/GREMA_analysis_runs/ (1.9 GB; external/, runs/, logs/; the first runs that were made in ~/grema_runs/ are in runs/sos, runs/irma and runs/hackett_first), next to the repository, so that git clean or git add -A cannot touch them. The versioned part is results/*.tgz (the result files and the inputs needed to score them); the full run directories hold in addition the per-iteration results and the intermediate files.

Folder Content Report
external/hackett_data, external/hackett_gold the processed expression matrices of GEO GSE142864 and the platform table; the gold standard of Ma et al. (2014) HACKETT_REPORT.md
external/dyngenie_src, external/dyngenie_pixi the dynGENIE3 code (downloaded, read before use) and the pixi environment (env/pixi.toml, env/pixi.lock) METHODS_REPORT.md
external/irma_ref the paper that was used for the signs of IRMA SIGNS_REAL_DATA_REPORT.md
runs/hackett_runs, runs/set2, runs/rawtime_runs, runs/time_test the Hackett designs (first and second TF subset, small networks, the measured time points) and the GREMA runs on them; the tests of -time HACKETT_REPORT.md, METHODS_REPORT.md sections 7 and 8
runs/irma_slots, runs/ssystem_slots, runs/ssystem_runs, runs/ss_orient HFODE and S-system on IRMA with 1 / 2 / 4 regulator slots, the first S-system batch, the test of the direction of the S-system output SSYSTEM_SLOTS_REPORT.md
runs/contrast_runs, runs/nmin_runs, runs/dyngenie_runs runs that keep every iteration (contrast score), -nmax / -min, dynGENIE3 on IRMA, SOS and Hackett METHODS_REPORT.md sections 2-3
runs/perm_control the experiment-permuted data sets and the runs on them METHODS_REPORT.md section 1
runs/prefilter, runs/prefilter_hsic, runs/hill_dict, runs/hill_dict_perm, runs/prefilter_runs, runs/prefilter_hsic_runs, runs/hill_dict_runs the LASSO, HSIC-Lasso and Hill-dictionary filters (scores and filtered knowledge files) and GREMA on the filtered knowledge files METHODS_REPORT.md section 4
runs/sim_signed, runs/sim_protein, runs/sim_irma_signs, runs/sim_irma_like the simulated signed networks and their variants, the protein regulators with a shared driver, the IRMA-topology and the IRMA-like simulations SIGN_SIMULATION_REPORT.md, PROTEIN_REGULATOR_REPORT.md, SIGNS_REAL_DATA_REPORT.md
runs/sos SOS with 4 experiments: sos4 (-f 1, -f 3, first batch, job list t1_jobs.txt), sos4_slot1, sos4_slot4, sos4_g1000, sos4_selfrep (regulator slots, 1000 generations, LexA self-repression fixed), the SOS simulations sim_sos, sim_sos_p, and first_runs/ (the 1-experiment and 4-experiment runs of the first analysis) SOS_REPORT.md, PROTEIN_REGULATOR_REPORT.md
runs/irma IRMA: baseline/ (the first runs: fixed seeds, prefix of the time series, perturbation sets, GP augmentation), pt/ (perturbation sets T2, job lists t2*_jobs.txt), gen/, gen500/ (generations T3, job lists t3_*_jobs.txt) IRMA_REPORT.md, HANDOFF.md
runs/irma/predict the IRMA runs of the prediction test (switch-on and switch-off, default slots and two slots, 5 runs each) IRMA_PREDICTION_REPORT.md
runs/hackett_first the downloaded GEO page of the first Hackett exploration (geo_page.html) HACKETT_REPORT.md
runs/archive_staging the staging folders (pack*, unpack*) from which the archives in results/ were made and checked; nothing here is needed to continue results/README.md
runs/hmsc the hMSC feasibility trial: runx2/, multi/, multi150/ (inputs, GREMA runs runs/, dynGENIE3 dyn_rf*, time-shuffled inputs shuf/) HMSC_FEASIBILITY_REPORT.md
external/trrust TRRUST v2 human TF -> gene pairs (public download, https://www.grnpedia.org/trrust/data/trrust_rawdata.human.tsv) HMSC_FEASIBILITY_REPORT.md
runs/dream4_size10, external/dream4_bioc the DREAM4 size-10 runs (GREMA, dynGENIE3, permuted controls); the Bioconductor package DREAM4 1.28.0 with the official text files DREAM4_REPORT.md
runs/sim_input, runs/irma/input_example, runs/sos/input_dose the tests of the external input: the simulation with a known input, IRMA with the medium, SOS with the UV dose INPUT_TERM_REPORT.md
runs/sim_nonhill, runs/sim_augment, runs/irma/sign_diagnosis the simulations with non-Hill regulation functions; augmented against real series; IRMA with the true structure told NONHILL_FORM_REPORT.md, AUGMENTATION_REPORT.md, SIGN_DIAGNOSIS_REPORT.md
logs/ the launcher logs (*.out)  

Backup at the end of a stage, and restoring on another machine

bash evaluation/analysis/scripts/backup_runs.sh stage1      # one .tar.zst per folder + MANIFEST.tsv + SHA256SUMS

writes to GREMA_analysis_backups/<stage>/ next to GREMA_analysis_runs/ (the pixi environment folder .pixi is left out). The folder can be kept as it is or uploaded (for example to Zenodo; check the licence of the data first, see below). To continue the analyses on another machine:

  1. clone the repository and build the solvers (README);
  2. mkdir GREMA_analysis_runs && cd GREMA_analysis_runs && mkdir external runs logs, then for every archive tar --zstd -xf <name>.tar.zst -C <external|runs|logs> (check with sha256sum -c SHA256SUMS first);
  3. rebuild the Python environment: cd GREMA_analysis_runs/external/dyngenie_pixi && cp <repository>/evaluation/analysis/env/pixi.* . && pixi install;
  4. without the backup: results/*.tgz score every reported result; the simulated data are made again by the scripts (sim_*.py, the seeds are in the reports), the Hackett data and the gold standard are downloaded again (commands in HACKETT_REPORT.md), only the runs have to be repeated.

Data licences: the Hackett data (GEO) and the gold standard of Ma et al. are public; the SOS data are from the web page of Uri Alon’s lab and the paper that was used for the IRMA signs is under the copyright of its publisher; do not put the downloaded copies (external/) into a public record without checking; the runs and simulations (runs/, logs/) are our own.

Archived results (results/)

Each *.tgz holds the final_results.txt of the runs (columns TF GENE REGULATORY CONFIDENCE_LEVEL VOTE_SCORE) and the input files that are needed to score them, not the full run directories (10-30 MB each). results/README.md lists the content of every archive. To score one:

mkdir -p /tmp/res && tar xzf evaluation/analysis/results/final_results.tgz -C /tmp/res
python3 evaluation/analysis/scripts/eval_runs.py --gold input/IRMA/IRMA_GoldStandard.tsv \
    "f1-on=/tmp/res/irma_fixed/f1_on_r*/final_results.txt"

The archives of the Hackett data hold the inputs made by hackett_prep.py; the raw data (GEO GSE142864, the gold standard of Ma et al. 2014) are public and not in the repository, the download commands are in HACKETT_REPORT.md.