update_readme_paperlink
#2
by cmatkhan - opened
- README.md +72 -262
- control_2014.parquet +0 -3
- kemmeren_2014.parquet +2 -2
- kemmeren_2014.parquet.md5 +1 -0
- scripts/parse_kemmeren_data.R +19 -53
README.md
CHANGED
|
@@ -14,37 +14,9 @@ pretty_name: "Kemmeren, 2014 Overexpression"
|
|
| 14 |
size_categories:
|
| 15 |
- 1M<n<10M
|
| 16 |
|
| 17 |
-
experimental_conditions:
|
| 18 |
-
temperature_celsius: 30
|
| 19 |
-
cultivation_method: plate
|
| 20 |
-
growth_phase_at_harvest:
|
| 21 |
-
phase: "early_mid_log"
|
| 22 |
-
od600: 0.6
|
| 23 |
-
od600_tolerance: 0.1
|
| 24 |
-
media:
|
| 25 |
-
name: synthetic_complete
|
| 26 |
-
carbon_source:
|
| 27 |
-
- compound: D-glucose
|
| 28 |
-
# Kemmeren et al 2014: 2% D-glucose
|
| 29 |
-
concentration_percent: 2
|
| 30 |
-
nitrogen_source:
|
| 31 |
-
- compound: yeast_nitrogen_base
|
| 32 |
-
# Kemmeren et al 2014: 6.71 g/l
|
| 33 |
-
concentration_percent: 0.671
|
| 34 |
-
specifications:
|
| 35 |
-
- without_amino_acids
|
| 36 |
-
- without_carbohydrate
|
| 37 |
-
- with_ammonium_sulfate
|
| 38 |
-
- compound: amino_acid_dropout_mix
|
| 39 |
-
# Kemmeren et al 2014: 2.0 g/l
|
| 40 |
-
concentration_percent: 0.2
|
| 41 |
-
doi: https://doi.org/10.1016/j.cell.2014.02.054
|
| 42 |
-
citation: >-
|
| 43 |
-
Kemmeren, P, Sameith, K, van de Pasch, LA, Benschop, JJ, Lenstra, TL, Margaritis, T, et al. 2014. Large-scale genetic perturbations reveal regulatory networks and an abundance of gene-specific repressors. Cell, 157: 740-752
|
| 44 |
configs:
|
| 45 |
- config_name: kemmeren_2014
|
| 46 |
-
description:
|
| 47 |
-
Microarray expression data comparing strains in which the gene encoding a single protein has been deleted. Includes sequence-specific DNA-binding TFs as well kinases, phosphatases, and many other potential regulatory proteins. Cells were grown on synthetic complete medium with glucose.
|
| 48 |
dataset_type: annotated_features
|
| 49 |
default: true
|
| 50 |
metadata_fields: ["regulator_locus_tag", "regulator_symbol"]
|
|
@@ -53,183 +25,36 @@ configs:
|
|
| 53 |
path: kemmeren_2014.parquet
|
| 54 |
dataset_info:
|
| 55 |
features:
|
| 56 |
-
- name: sample_id
|
| 57 |
-
dtype: integer
|
| 58 |
-
description: >-
|
| 59 |
-
unique identifier for a specific sample.
|
| 60 |
-
The sample ID identifies a unique regulator.
|
| 61 |
-
- name: db_id
|
| 62 |
-
dtype: integer
|
| 63 |
-
description: >-
|
| 64 |
-
an old unique identifer, for use internally only. Deprecated and will be removed eventually.
|
| 65 |
-
Do not use in analysis. db_id = 0 for loci that were originally parsed incorrectly.
|
| 66 |
- name: regulator_locus_tag
|
| 67 |
dtype: string
|
| 68 |
-
description:
|
| 69 |
-
induced transcriptional regulator systematic ID.
|
| 70 |
-
See hf/BrentLab/yeast_genome_resources
|
| 71 |
role: regulator_identifier
|
| 72 |
- name: regulator_symbol
|
| 73 |
dtype: string
|
| 74 |
-
description:
|
| 75 |
-
induced transcriptional regulator common name.
|
| 76 |
-
If no common name exists, then the `regulator_locus_tag` is used.
|
| 77 |
role: regulator_identifier
|
| 78 |
- name: reporterId
|
| 79 |
dtype: string
|
| 80 |
description: probe ID as reported from the original data
|
| 81 |
- name: target_locus_tag
|
| 82 |
dtype: string
|
| 83 |
-
description:
|
| 84 |
-
The systematic ID of the feature to which the effect/pvalue is assigned.
|
| 85 |
-
See hf/BrentLab/yeast_genome_resources
|
| 86 |
role: target_identifier
|
| 87 |
- name: target_symbol
|
| 88 |
dtype: string
|
| 89 |
-
description:
|
| 90 |
-
The common name of the feature to which the effect/pvalue is assigned.
|
| 91 |
-
If there is no common name, the `target_locus_tag` is used.
|
| 92 |
role: target_identifier
|
| 93 |
- name: M
|
| 94 |
dtype: float64
|
| 95 |
description: log₂ fold change (mutant vs wildtype)
|
| 96 |
role: quantitative_measure
|
| 97 |
-
- name: Madj
|
| 98 |
-
dtype: float64
|
| 99 |
-
description: >-
|
| 100 |
-
M value with the cell cycle signal removed
|
| 101 |
-
(see paper cited in the introduction above)
|
| 102 |
-
role: quantitative_measure
|
| 103 |
- name: A
|
| 104 |
dtype: float64
|
| 105 |
-
description:
|
| 106 |
-
average log2 intensity of the two channels, a proxy for expression level
|
| 107 |
-
(This is a guess based on microarray convention -- not specified on holstege site)
|
| 108 |
role: quantitative_measure
|
| 109 |
-
- name:
|
| 110 |
-
dtype: float64
|
| 111 |
-
description: significance of the modeled effect (M), from limma
|
| 112 |
-
role: quantitative_measure
|
| 113 |
-
- name: variable_in_wt
|
| 114 |
-
dtype: string
|
| 115 |
-
description: >-
|
| 116 |
-
True if the given locus is variable in the WT condition.
|
| 117 |
-
Recommended to remove these from analysis. False otherwise.
|
| 118 |
-
See Holstege website for more information
|
| 119 |
-
role: experimental_condition
|
| 120 |
-
- name: multiple_probes
|
| 121 |
-
dtype: string
|
| 122 |
-
description: >-
|
| 123 |
-
True if there is more than one probe associated with
|
| 124 |
-
the same genomic locus. False otherwise
|
| 125 |
-
role: experimental_condition
|
| 126 |
-
- name: kemmeren_regulator
|
| 127 |
-
dtype: string
|
| 128 |
-
description: >-
|
| 129 |
-
True if the regulator is one of the regulators studied in the
|
| 130 |
-
original Kemmeren et al. (2014) global regulator study. False otherwise
|
| 131 |
-
role: experimental_condition
|
| 132 |
-
- name: regulator_desc
|
| 133 |
-
dtype: string
|
| 134 |
-
description: >-
|
| 135 |
-
functional description of the induced regulator
|
| 136 |
-
from the original paper supplement
|
| 137 |
-
role: experimental_condition
|
| 138 |
-
- name: functional_category
|
| 139 |
-
dtype: string
|
| 140 |
-
description: functional classification of the regulator from the original paper supplement
|
| 141 |
-
role: experimental_condition
|
| 142 |
-
- name: slides
|
| 143 |
-
dtype: string
|
| 144 |
-
description: identifier(s) for the microarray slide(s) used in this experiment
|
| 145 |
-
role: experimental_condition
|
| 146 |
-
- name: mating_type
|
| 147 |
-
dtype: string
|
| 148 |
-
description: mating type of the strain background used in the experiment
|
| 149 |
-
role: experimental_condition
|
| 150 |
-
- name: source_of_deletion_mutants
|
| 151 |
-
dtype: string
|
| 152 |
-
description: origin of the strain
|
| 153 |
-
role: experimental_condition
|
| 154 |
-
- name: primary_hybsets
|
| 155 |
-
dtype: string
|
| 156 |
-
description: identifier for the primary hybridization set to which this sample belongs
|
| 157 |
-
role: experimental_condition
|
| 158 |
-
- name: responsive_non_responsive
|
| 159 |
-
dtype: string
|
| 160 |
-
description: >-
|
| 161 |
-
classification of the regulator as responsive or not to the
|
| 162 |
-
deletion from the original paper supplement
|
| 163 |
-
role: experimental_condition
|
| 164 |
-
- name: nr_sign_changes
|
| 165 |
-
dtype: integer
|
| 166 |
-
description: >-
|
| 167 |
-
number of significant changes in expression detected for the regulator locus tag (abs(M) > log2(1.7) & pval < 0.05).
|
| 168 |
-
Note that there is a slight difference when calculating from the data provided here, I believe due to a difference in
|
| 169 |
-
the way the targets are parsed and filtered (some ORFs that have since been removed from the annotations are removed).
|
| 170 |
-
I didn't investigate this closely, though.
|
| 171 |
-
role: experimental_condition
|
| 172 |
-
- name: profile_first_published
|
| 173 |
-
dtype: string
|
| 174 |
-
description: citation or reference indicating where this expression profile was first published
|
| 175 |
-
role: experimental_condition
|
| 176 |
-
- name: chase_notes
|
| 177 |
-
dtype: string
|
| 178 |
-
description: notes added during data curation and parsing
|
| 179 |
-
- name: responsive
|
| 180 |
-
dtype: string
|
| 181 |
-
description: Per the paper(s), The authors consider a target responsive if Madj > 1.7 and pval < 0.05
|
| 182 |
-
|
| 183 |
-
- config_name: control_2014
|
| 184 |
-
description: This stores the WT/background strains "WT-BY4743", "WT-MATA" and "WT-YPD" from Kemmeren 2014
|
| 185 |
-
dataset_type: annotated_features
|
| 186 |
-
metadata_fields: ["strain"]
|
| 187 |
-
data_files:
|
| 188 |
-
- split: train
|
| 189 |
-
path: control_2014.parquet
|
| 190 |
-
dataset_info:
|
| 191 |
-
features:
|
| 192 |
-
- name: sample_id
|
| 193 |
-
dtype: integer
|
| 194 |
-
description: >-
|
| 195 |
-
unique identifier for a specific sample.
|
| 196 |
-
The sample ID identifies a unique regulator.
|
| 197 |
-
- name: strain
|
| 198 |
-
dtype: string
|
| 199 |
-
description: >-
|
| 200 |
-
The genotype or strain used in the experiment,
|
| 201 |
-
one of "WT-BY4743", "WT-MATA" and "WT-YPD"
|
| 202 |
-
role: regulator_identifier
|
| 203 |
-
- name: regulator_symbol
|
| 204 |
-
dtype: string
|
| 205 |
-
description: >-
|
| 206 |
-
induced transcriptional regulator common name.
|
| 207 |
-
If no common name exists, then the `regulator_locus_tag` is used.
|
| 208 |
-
role: regulator_identifier
|
| 209 |
-
- name: reporterId
|
| 210 |
-
dtype: string
|
| 211 |
-
description: probe ID as reported from the original data
|
| 212 |
-
- name: target_locus_tag
|
| 213 |
-
dtype: string
|
| 214 |
-
description: >-
|
| 215 |
-
The systematic ID of the feature to which the effect/pvalue is assigned.
|
| 216 |
-
See hf/BrentLab/yeast_genome_resources
|
| 217 |
-
role: target_identifier
|
| 218 |
-
- name: target_symbol
|
| 219 |
-
dtype: string
|
| 220 |
-
description: >-
|
| 221 |
-
The common name of the feature to which the effect/pvalue is assigned.
|
| 222 |
-
If there is no common name, the `target_locus_tag` is used.
|
| 223 |
-
role: target_identifier
|
| 224 |
-
- name: M
|
| 225 |
-
dtype: float64
|
| 226 |
-
description: log₂ fold change (mutant vs wildtype)
|
| 227 |
-
role: quantitative_measure
|
| 228 |
-
- name: A
|
| 229 |
dtype: float64
|
| 230 |
-
description:
|
| 231 |
-
average log2 intensity of the two channels, a proxy for expression level
|
| 232 |
-
(This is a guess based on microarray convention -- not specified on holstege site)
|
| 233 |
role: quantitative_measure
|
| 234 |
- name: pval
|
| 235 |
dtype: float64
|
|
@@ -237,41 +62,12 @@ configs:
|
|
| 237 |
role: quantitative_measure
|
| 238 |
- name: variable_in_wt
|
| 239 |
dtype: string
|
| 240 |
-
description:
|
| 241 |
-
True if the given locus is variable in the WT condition.
|
| 242 |
-
Recommended to remove these from analysis. False otherwise.
|
| 243 |
-
See Holstege website for more information
|
| 244 |
role: experimental_condition
|
| 245 |
- name: multiple_probes
|
| 246 |
dtype: string
|
| 247 |
-
description:
|
| 248 |
-
True if there is more than one probe associated with
|
| 249 |
-
the same genomic locus. False otherwise
|
| 250 |
role: experimental_condition
|
| 251 |
-
- name: kemmeren_regulator
|
| 252 |
-
dtype: string
|
| 253 |
-
description: >-
|
| 254 |
-
True if the regulator is one of the regulators studied in the
|
| 255 |
-
original Kemmeren et al. (2014) global regulator study. False otherwise
|
| 256 |
-
role: experimental_condition
|
| 257 |
-
- name: description
|
| 258 |
-
dtype: string
|
| 259 |
-
description: >-
|
| 260 |
-
functional description of the induced regulator
|
| 261 |
-
from the original paper supplement
|
| 262 |
-
role: experimental_condition
|
| 263 |
-
- name: mating_type
|
| 264 |
-
dtype: string
|
| 265 |
-
description: mating type of the strain background used in the experiment
|
| 266 |
-
role: experimental_condition
|
| 267 |
-
- name: chase_notes
|
| 268 |
-
dtype: string
|
| 269 |
-
description: notes added during data curation and parsing
|
| 270 |
-
- name: responsive
|
| 271 |
-
dtype: string
|
| 272 |
-
description: >-
|
| 273 |
-
Per the paper(s), The authors consider a target responsive
|
| 274 |
-
if M > 1.7 and pval < 0.05
|
| 275 |
---
|
| 276 |
# Kemmeren 2014
|
| 277 |
|
|
@@ -295,75 +91,89 @@ Margaritis T, Brok MO, Kemmeren P, Holstege FC. Cell cycle population effects in
|
|
| 295 |
perturbation studies. Mol Syst Biol. 2014 Jun 21;10(6):732. doi: 10.15252/msb.20145172.
|
| 296 |
PMID: 24952590; PMCID: PMC4265054.](https://doi.org/10.15252/msb.20145172)
|
| 297 |
|
| 298 |
-
|
| 299 |
-
strategy to deduplicate these is to take the max `M`, `Madj` and min `pval`.
|
| 300 |
|
| 301 |
-
|
|
|
|
| 302 |
|
| 303 |
-
|
| 304 |
-
[labretriever](https://github.com/cmatKhan/labretriever#installation)
|
| 305 |
-
(`pip install labretriever`) and/or the
|
| 306 |
-
[HuggingFace Hub client](https://huggingface.co/docs/huggingface_hub/installation)
|
| 307 |
-
(`pip install huggingface_hub`).
|
| 308 |
|
| 309 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 310 |
|
| 311 |
-
|
| 312 |
-
[labretriever.VirtualDB](https://cmatkhan.github.io/labretriever/virtual_db_configuration/).
|
| 313 |
-
Download the
|
| 314 |
-
[collection config](https://github.com/BrentLab/tfbpshiny/blob/main/tfbpshiny/brentlab_yeast_collection.yaml)
|
| 315 |
-
and use it to query the data directly in Python, or with an AI assistant using the
|
| 316 |
-
[labretriever plugin](https://cmatkhan.github.io/labretriever/mcp_server/#quick-install-claude-code-plugin).
|
| 317 |
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
|
|
|
| 321 |
|
| 322 |
-
#
|
| 323 |
-
card = DataCard("BrentLab/kemmeren_2014")
|
| 324 |
-
print([c.config_name for c in card.configs]) # list available datasets
|
| 325 |
-
info = card.info()
|
| 326 |
-
print(info["doi"])
|
| 327 |
-
print(info["citation"])
|
| 328 |
|
| 329 |
-
|
| 330 |
-
|
| 331 |
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
|
| 336 |
-
#
|
|
|
|
| 337 |
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
and query with DuckDB.
|
| 341 |
|
| 342 |
-
|
|
|
|
|
|
|
|
|
|
| 343 |
|
| 344 |
```python
|
| 345 |
from huggingface_hub import snapshot_download
|
| 346 |
import duckdb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
|
|
|
|
| 348 |
repo_path = snapshot_download(
|
| 349 |
-
repo_id=
|
| 350 |
repo_type="dataset",
|
| 351 |
-
|
| 352 |
)
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
```
|
| 360 |
|
| 361 |
-
|
|
|
|
| 362 |
|
| 363 |
-
|
| 364 |
-
|
|
|
|
| 365 |
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
```
|
|
|
|
|
|
|
|
|
| 14 |
size_categories:
|
| 15 |
- 1M<n<10M
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
configs:
|
| 18 |
- config_name: kemmeren_2014
|
| 19 |
+
description: Transcriptional regulator overexpression perturbation data with differential expression measurements
|
|
|
|
| 20 |
dataset_type: annotated_features
|
| 21 |
default: true
|
| 22 |
metadata_fields: ["regulator_locus_tag", "regulator_symbol"]
|
|
|
|
| 25 |
path: kemmeren_2014.parquet
|
| 26 |
dataset_info:
|
| 27 |
features:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
- name: regulator_locus_tag
|
| 29 |
dtype: string
|
| 30 |
+
description: induced transcriptional regulator systematic ID. See hf/BrentLab/yeast_genome_resources
|
|
|
|
|
|
|
| 31 |
role: regulator_identifier
|
| 32 |
- name: regulator_symbol
|
| 33 |
dtype: string
|
| 34 |
+
description: induced transcriptional regulator common name. If no common name exists, then the `regulator_locus_tag` is used.
|
|
|
|
|
|
|
| 35 |
role: regulator_identifier
|
| 36 |
- name: reporterId
|
| 37 |
dtype: string
|
| 38 |
description: probe ID as reported from the original data
|
| 39 |
- name: target_locus_tag
|
| 40 |
dtype: string
|
| 41 |
+
description: The systematic ID of the feature to which the effect/pvalue is assigned. See hf/BrentLab/yeast_genome_resources
|
|
|
|
|
|
|
| 42 |
role: target_identifier
|
| 43 |
- name: target_symbol
|
| 44 |
dtype: string
|
| 45 |
+
description: The common name of the feature to which the effect/pvalue is assigned. If there is no common name, the `target_locus_tag` is used.
|
|
|
|
|
|
|
| 46 |
role: target_identifier
|
| 47 |
- name: M
|
| 48 |
dtype: float64
|
| 49 |
description: log₂ fold change (mutant vs wildtype)
|
| 50 |
role: quantitative_measure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
- name: A
|
| 52 |
dtype: float64
|
| 53 |
+
description: average log₂ intensity of the two channels, a proxy for expression level (This is a guess based on microarray convention -- not specified on holstege site)
|
|
|
|
|
|
|
| 54 |
role: quantitative_measure
|
| 55 |
+
- name: Madj
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
dtype: float64
|
| 57 |
+
description: M value with the cell cycle signal removed (see paper cited in the introduction above)
|
|
|
|
|
|
|
| 58 |
role: quantitative_measure
|
| 59 |
- name: pval
|
| 60 |
dtype: float64
|
|
|
|
| 62 |
role: quantitative_measure
|
| 63 |
- name: variable_in_wt
|
| 64 |
dtype: string
|
| 65 |
+
description: True if the given locus is variable in the WT condition. Recommended to remove these from analysis. False otherwise. See Holstege website for more information
|
|
|
|
|
|
|
|
|
|
| 66 |
role: experimental_condition
|
| 67 |
- name: multiple_probes
|
| 68 |
dtype: string
|
| 69 |
+
description: True if there is more than one probe associated with the same genomic locus. False otherwise
|
|
|
|
|
|
|
| 70 |
role: experimental_condition
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
---
|
| 72 |
# Kemmeren 2014
|
| 73 |
|
|
|
|
| 91 |
perturbation studies. Mol Syst Biol. 2014 Jun 21;10(6):732. doi: 10.15252/msb.20145172.
|
| 92 |
PMID: 24952590; PMCID: PMC4265054.](https://doi.org/10.15252/msb.20145172)
|
| 93 |
|
| 94 |
+
This repo provides 1 dataset:
|
|
|
|
| 95 |
|
| 96 |
+
- **kemmeren_2014**: Transcriptional regulator overexpression perturbation data with
|
| 97 |
+
differential expression measurements.
|
| 98 |
|
| 99 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
+
The python package `tfbpapi` provides an interface to this data which eases
|
| 102 |
+
examining the datasets, field definitions and other operations. You may also
|
| 103 |
+
download the parquet datasets directly from hugging face by clicking on
|
| 104 |
+
"Files and Versions", or by using the huggingface_cli and duckdb directly.
|
| 105 |
+
In both cases, this provides a method of retrieving dataset and field definitions.
|
| 106 |
|
| 107 |
+
### `tfbpapi`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
+
After [installing
|
| 110 |
+
tfbpapi](https://github.com/BrentLab/tfbpapi/?tab=readme-ov-file#installation), you can
|
| 111 |
+
adapt this [tutorial](https://brentlab.github.io/tfbpapi/tutorials/hfqueryapi_tutorial/)
|
| 112 |
+
in order to explore the contents of this repository.
|
| 113 |
|
| 114 |
+
### huggingface_cli/duckdb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
+
You can retrieves and displays the file paths for each configuration of
|
| 117 |
+
the "BrentLab/kemmeren_2014" dataset from Hugging Face Hub.
|
| 118 |
|
| 119 |
+
```python
|
| 120 |
+
from huggingface_hub import ModelCard
|
| 121 |
+
from pprint import pprint
|
| 122 |
+
|
| 123 |
+
card = ModelCard.load("BrentLab/kemmeren_2014", repo_type="dataset")
|
| 124 |
+
|
| 125 |
+
# cast to dict
|
| 126 |
+
card_dict = card.data.to_dict()
|
| 127 |
|
| 128 |
+
# Get partition information
|
| 129 |
+
dataset_paths_dict = {d.get("config_name"): d.get("data_files")[0].get("path") for d in card_dict.get("configs")}
|
| 130 |
|
| 131 |
+
pprint(dataset_paths_dict)
|
| 132 |
+
```
|
|
|
|
| 133 |
|
| 134 |
+
If you wish to pull the entire repo, due to its size you may need to use an
|
| 135 |
+
[authentication token](https://huggingface.co/docs/hub/en/security-tokens).
|
| 136 |
+
If you do not have one, try omitting the token related code below and see if
|
| 137 |
+
it works. Else, create a token and provide it like so:
|
| 138 |
|
| 139 |
```python
|
| 140 |
from huggingface_hub import snapshot_download
|
| 141 |
import duckdb
|
| 142 |
+
import os
|
| 143 |
+
|
| 144 |
+
repo_id = "BrentLab/kemmeren_2014"
|
| 145 |
+
|
| 146 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 147 |
|
| 148 |
+
# Download entire repo to local directory
|
| 149 |
repo_path = snapshot_download(
|
| 150 |
+
repo_id=repo_id,
|
| 151 |
repo_type="dataset",
|
| 152 |
+
token=hf_token
|
| 153 |
)
|
| 154 |
+
|
| 155 |
+
print(f"\n✓ Repository downloaded to: {repo_path}")
|
| 156 |
+
|
| 157 |
+
# Construct path to the kemmeren_2014 parquet file
|
| 158 |
+
parquet_path = os.path.join(repo_path, "kemmeren_2014.parquet")
|
| 159 |
+
print(f"✓ Parquet file at: {parquet_path}")
|
| 160 |
```
|
| 161 |
|
| 162 |
+
Use your favorite method of interacting with `parquet` files (eg duckDB, but you could
|
| 163 |
+
use dplyr in R or pandas, too).
|
| 164 |
|
| 165 |
+
```python
|
| 166 |
+
# Connect to DuckDB and query the parquet file
|
| 167 |
+
conn = duckdb.connect()
|
| 168 |
|
| 169 |
+
query = """
|
| 170 |
+
SELECT *
|
| 171 |
+
FROM read_parquet(?)
|
| 172 |
+
WHERE regulator_locus_tag = 'YJR060W'
|
| 173 |
+
"""
|
| 174 |
+
|
| 175 |
+
result = conn.execute(query, [parquet_path]).fetchall()
|
| 176 |
+
print(f"Found {len(result)} rows for YJR060W")
|
| 177 |
```
|
| 178 |
+
|
| 179 |
+
**NOTE:** There are some loci with multiple probes (`multiple_probes == TRUE`). One strategy to deduplicate these is to take the max `M`, `Madj` and min `pval`.
|
control_2014.parquet
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:490665c992e5c586a914077e10578bec0a829f54425a1212b40021f174926133
|
| 3 |
-
size 661123
|
|
|
|
|
|
|
|
|
|
|
|
kemmeren_2014.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c463017444bd7690959c0d6fff0d0ebe2faa7b916dd9c44e305156f6c98b863
|
| 3 |
+
size 319218929
|
kemmeren_2014.parquet.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
9109e2e853acab9fa341a1eebc1c649c kemmeren_2014.parquet
|
scripts/parse_kemmeren_data.R
CHANGED
|
@@ -119,14 +119,9 @@ deleteome_all_mutants_controls_long = deleteome_all_mutants_controls %>%
|
|
| 119 |
mutate(kemmeren_regulator = toupper(str_remove(tolower(kemmeren_regulator), "-del-1$|-del-mata$|-del$"))) %>%
|
| 120 |
mutate(kemmeren_regulator = ifelse(kemmeren_regulator == "ARG5,6", "ARG56", kemmeren_regulator))
|
| 121 |
|
| 122 |
-
kem_sup1_regulator_info = read_excel(here("data/kemmeren/
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
kem_sup1_regulator_info = kem_sup1_regulator_info %>%
|
| 127 |
-
left_join(kem_sup1_regulator_info_straininfo) %>%
|
| 128 |
-
mutate(`profile first published` = citation) %>%
|
| 129 |
-
select(-citation)
|
| 130 |
|
| 131 |
parsed_regulators = deleteome_all_mutants_controls_long %>%
|
| 132 |
select(kemmeren_regulator) %>%
|
|
@@ -184,8 +179,7 @@ regulators_munging_df = bind_rows(regulators_munging_list) %>%
|
|
| 184 |
regulator_symbol = symbol)) %>%
|
| 185 |
replace_na(list(chase_notes = "none")) %>%
|
| 186 |
mutate(regulator_locus_tag = ifelse(str_detect(kemmeren_regulator, "^WT-"), kemmeren_regulator, regulator_locus_tag),
|
| 187 |
-
regulator_symbol = ifelse(str_detect(kemmeren_regulator, "^WT-"), kemmeren_regulator, regulator_symbol))
|
| 188 |
-
janitor::clean_names()
|
| 189 |
|
| 190 |
|
| 191 |
stopifnot(setequal(regulators_munging_df$kemmeren_regulator,
|
|
@@ -257,48 +251,20 @@ final_parsed_df = Reduce(left_join, final_parsed_list) %>%
|
|
| 257 |
# duplicated to mulitple Madj. This removes those duplicates
|
| 258 |
distinct(reporterId, .keep_all = TRUE) %>%
|
| 259 |
ungroup() %>%
|
| 260 |
-
left_join(select(regulators_munging_df,
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
slides = slide_s,
|
| 266 |
-
regulator_desc = description) %>%
|
| 267 |
-
arrange(regulator_locus_tag)
|
| 268 |
-
# select(regulator_locus_tag, regulator_symbol, reporterId,
|
| 269 |
-
# target_locus_tag, target_symbol, M, Madj, A, pval,
|
| 270 |
-
# variable_in_wt, multiple_probes)
|
| 271 |
-
|
| 272 |
-
db_kemmeren_meta = read_csv("data/kemmeren/db_kemmeren_meta_20251126.csv") %>%
|
| 273 |
-
mutate(id = ifelse(regulator_locus_tag == 'YLR352W', 0, id)) %>%
|
| 274 |
-
select(id, regulator_locus_tag) %>%
|
| 275 |
-
distinct() %>%
|
| 276 |
-
mutate(id = as.integer(id)) %>%
|
| 277 |
-
dplyr::rename(db_id = id)
|
| 278 |
|
| 279 |
-
|
| 280 |
-
left_join(db_kemmeren_meta) %>%
|
| 281 |
-
replace_na(list(db_id = 0)) %>%
|
| 282 |
arrange(regulator_locus_tag) %>%
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
# tuple is the same as it is in the current hackett_2020, or that any changes
|
| 293 |
-
# are intentional
|
| 294 |
-
|
| 295 |
-
# final_df_parsed_with_ids %>%
|
| 296 |
-
# write_parquet("~/code/hf/kemmeren_2014/kemmeren_2014.parquet",
|
| 297 |
-
# compression = "zstd",
|
| 298 |
-
# chunk_size = 6181,
|
| 299 |
-
# write_statistics = TRUE,
|
| 300 |
-
# use_dictionary = c(
|
| 301 |
-
# regulator_locus_tag = TRUE,
|
| 302 |
-
# target_locus_tag = TRUE
|
| 303 |
-
# )
|
| 304 |
-
# )
|
|
|
|
| 119 |
mutate(kemmeren_regulator = toupper(str_remove(tolower(kemmeren_regulator), "-del-1$|-del-mata$|-del$"))) %>%
|
| 120 |
mutate(kemmeren_regulator = ifelse(kemmeren_regulator == "ARG5,6", "ARG56", kemmeren_regulator))
|
| 121 |
|
| 122 |
+
kem_sup1_regulator_info = read_excel(here("data/kemmeren/mmc1.xlsx")) %>%
|
| 123 |
+
# additional columns are not tabular
|
| 124 |
+
.[,1:9]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
parsed_regulators = deleteome_all_mutants_controls_long %>%
|
| 127 |
select(kemmeren_regulator) %>%
|
|
|
|
| 179 |
regulator_symbol = symbol)) %>%
|
| 180 |
replace_na(list(chase_notes = "none")) %>%
|
| 181 |
mutate(regulator_locus_tag = ifelse(str_detect(kemmeren_regulator, "^WT-"), kemmeren_regulator, regulator_locus_tag),
|
| 182 |
+
regulator_symbol = ifelse(str_detect(kemmeren_regulator, "^WT-"), kemmeren_regulator, regulator_symbol))
|
|
|
|
| 183 |
|
| 184 |
|
| 185 |
stopifnot(setequal(regulators_munging_df$kemmeren_regulator,
|
|
|
|
| 251 |
# duplicated to mulitple Madj. This removes those duplicates
|
| 252 |
distinct(reporterId, .keep_all = TRUE) %>%
|
| 253 |
ungroup() %>%
|
| 254 |
+
left_join(select(regulators_munging_df, kemmeren_regulator,
|
| 255 |
+
regulator_locus_tag, regulator_symbol)) %>%
|
| 256 |
+
select(regulator_locus_tag, regulator_symbol, reporterId,
|
| 257 |
+
target_locus_tag, target_symbol, M, Madj, A, pval,
|
| 258 |
+
variable_in_wt, multiple_probes)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
|
| 260 |
+
final_parsed_df %>%
|
|
|
|
|
|
|
| 261 |
arrange(regulator_locus_tag) %>%
|
| 262 |
+
write_parquet(here("data/kemmeren/kemmeren_2014.parquet"),
|
| 263 |
+
compression = "zstd",
|
| 264 |
+
chunk_size = 6181,
|
| 265 |
+
write_statistics = TRUE,
|
| 266 |
+
use_dictionary = c(
|
| 267 |
+
regulator_locus_tag = TRUE,
|
| 268 |
+
target_locus_tag = TRUE
|
| 269 |
+
)
|
| 270 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|