File size: 7,281 Bytes
6d1bbc7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# NegBioDB Configuration
# Source of truth for thresholds, paths, and pipeline settings.

# === Inactivity Thresholds ===
inactivity_threshold_nm: 10000         # 10 uM in nM; compound inactive if IC50/Ki/Kd > this
positive_pchembl_min: 6.0             # pChEMBL >= 6 for positives (IC50 <= 1 uM)
borderline_exclusion:
  lower: 4.5                          # Exclude pChEMBL >= 4.5 from negative pool
  upper: 6.0                          # Matches positive_pchembl_min; effective gap: [4.5, 6.0)
davis_inactive_pkd_threshold: 5.0     # DAVIS: inactive if pKd <= 5 (NOT strictly < 5)
davis_active_pkd_threshold: 7.0       # DAVIS: active if pKd >= 7 (Kd <= 100 nM)

# === ChEMBL ETL Policy ===
# Core benchmark should remain conservative by default.
# Optional activity_comment route can be enabled for recall-focused expansion.
chembl_etl:
  include_activity_comment: false
  inactive_activity_comments:
    - "Not Active"
    - "Inactive"
    - "Not active"
    - "inactive"

# === ML Split Configuration ===
split_ratios:
  train: 0.7
  val: 0.1
  test: 0.2
random_seed: 42

# === Processing ===
pubchem_chunksize: 100000             # Rows per chunk for streaming PubChem processing

pubchem_etl:
  chunksize: 100000
  human_only: true

bindingdb_etl:
  chunksize: 100000
  inactive_threshold_nm: 10000
  human_only: true

# === Confidence Tier Ordering (gold = highest) ===
confidence_tiers:
  - gold
  - silver
  - bronze
  - copper

# === Paths (relative to project root) ===
paths:
  data_dir: data
  exports_dir: exports
  migrations_dir: migrations
  database: data/negbiodb.db

# === Download URLs ===
downloads:
  pubchem:
    # Legacy keys kept for backward compatibility
    url: "https://ftp.ncbi.nlm.nih.gov/pubchem/Bioassay/Extras/bioactivities.tsv.gz"
    dest: data/pubchem/bioactivities.tsv.gz
    min_size_bytes: 1000000000
    # Required files for full PubChem ETL
    bioassays_url: "https://ftp.ncbi.nlm.nih.gov/pubchem/Bioassay/Extras/bioassays.tsv.gz"
    bioassays_dest: data/pubchem/bioassays.tsv.gz
    bioassays_min_size_bytes: 10000000
    aid_uniprot_url: "https://ftp.ncbi.nlm.nih.gov/pubchem/Bioassay/Extras/Aid2GeneidAccessionUniProt.gz"
    aid_uniprot_dest: data/pubchem/Aid2GeneidAccessionUniProt.gz
    aid_uniprot_min_size_bytes: 1000000
    sid_cid_smiles_url: "https://ftp.ncbi.nlm.nih.gov/pubchem/Bioassay/Extras/Sid2CidSMILES.gz"
    sid_cid_smiles_dest: data/pubchem/Sid2CidSMILES.gz
    sid_cid_smiles_min_size_bytes: 1000000
    sid_lookup_db: data/pubchem/sid_lookup.sqlite
  chembl:
    dest_dir: data/chembl
  bindingdb:
    servlet_url: "https://www.bindingdb.org/rwd/bind/chemsearch/marvin/SDFdownload.jsp?download_file=/rwd/bind/downloads/BindingDB_All_202603_tsv.zip"
    file_url: "https://www.bindingdb.org/rwd/bind/downloads/BindingDB_All_202603_tsv.zip"
    dest_dir: data/bindingdb
    min_size_bytes: 500000000
  davis:
    base_url: "https://raw.githubusercontent.com/dingyan20/Davis-Dataset-for-DTA-Prediction/master"
    files:
      - drugs.csv
      - proteins.csv
      - drug_protein_affinity.csv
    dest_dir: data/davis
    min_rows: 25000

# ============================================================
# Clinical Trial Failure Domain
# ============================================================

ct_domain:
  # === Paths ===
  paths:
    database: data/negbiodb_ct.db
    migrations_dir: migrations_ct
    data_dir: data/ct

  # === Downloads ===
  downloads:
    aact:
      # AACT pipe-delimited snapshot; URL changes monthly — update as needed
      # Get latest from: https://aact.ctti-clinicaltrials.org/pipe_files
      dest_dir: data/ct/aact
      required_disk_gb: 6.0
      # 13 of 46 AACT tables needed for v1
      tables:
        - studies
        - interventions
        - conditions
        - outcomes
        - outcome_analyses
        - outcome_measurements
        - designs
        - sponsors
        - calculated_values
        - browse_interventions
        - browse_conditions
        - drop_withdrawals
        - documents
    opentargets:
      url: "https://huggingface.co/api/datasets/opentargets/clinical_trial_reason_to_stop/parquet/default/train/0000.parquet"
      dest: data/ct/opentargets/stop_reasons.parquet
    cto:
      url: "https://huggingface.co/api/datasets/chufangao/CTO/parquet/human_labels/test/0.parquet"
      dest: data/ct/cto/cto_outcomes.parquet
    shi_du:
      # Figshare: Shi & Du 2024, doi:10.6084/m9.figshare.c.6860254.v1
      efficacy_url: "https://ndownloader.figshare.com/files/42520528"
      efficacy_dest: data/ct/shi_du/efficacy_df.csv
      safety_url: "https://ndownloader.figshare.com/files/42520534"
      safety_dest: data/ct/shi_du/safety_df.csv

  # === Failure Classification ===
  failure_category_precedence:
    - safety
    - efficacy
    - pharmacokinetic
    - enrollment
    - strategic
    - regulatory
    - design
    - other

  # === Drug Name Resolution ===
  drug_resolution:
    fuzzy_threshold: 0.90
    pubchem_rate_limit_per_sec: 5
    pubchem_cache: data/ct/pubchem_name_cache.json
    overrides_file: data/ct/drug_name_overrides.csv

  # === NLP Classifier ===
  classifier:
    max_features: 10000
    ngram_range: [1, 2]
    cv_folds: 5

# ============================================================
# Protein-Protein Interaction Negative Domain
# ============================================================

ppi_domain:
  # === Paths ===
  paths:
    database: data/negbiodb_ppi.db
    migrations_dir: migrations_ppi
    data_dir: data/ppi

  # === Downloads ===
  downloads:
    huri:
      hi_union_url: "https://www.interactome-atlas.org/data/HI-union.tsv"
      # hi_iii_url removed — HI-III-20.tsv returns 404 as of 2026-03
      idmapping_url: "https://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/HUMAN_9606_idmapping.dat.gz"
      dest_dir: data/ppi/huri
    intact:
      url: "https://ftp.ebi.ac.uk/pub/databases/intact/current/psimitab/intact_negative.txt"
      dest: data/ppi/intact/intact_negative.txt
      min_size_bytes: 1000000
    humap:
      base_url: "https://humap3.proteincomplexes.org/static/downloads/humap3"
      neg_train: ComplexPortal_reduced_20230309.neg_train_ppis.txt
      neg_test: ComplexPortal_reduced_20230309.neg_test_ppis.txt
      pos_train: ComplexPortal_reduced_20230309.train_ppis.txt
      pos_test: ComplexPortal_reduced_20230309.test_ppis.txt
      dest_dir: data/ppi/humap
    string:
      links_url: "https://stringdb-downloads.org/download/protein.links.v12.0/9606.protein.links.v12.0.txt.gz"
      mapping_url: "https://stringdb-downloads.org/download/mapping_files/uniprot/human.uniprot_2_string.2018.tsv.gz"
      dest_dir: data/ppi/string
    biogrid:
      url: "https://downloads.thebiogrid.org/Download/BioGRID/Latest-Release/BIOGRID-ALL-LATEST.tab3.zip"
      dest_dir: data/ppi/biogrid

  # === Evidence Type Priority (best first) ===
  evidence_type_priority:
    - experimental_non_interaction
    - literature_reported
    - ml_predicted_negative
    - low_score_negative
    - compartment_separated

  # === STRING ETL Settings ===
  string_etl:
    min_protein_degree: 5
    max_negative_pairs: 500000

  # === Benchmark Split ===
  split_ratios: {train: 0.7, val: 0.1, test: 0.2}
  random_seed: 42