adding mindel promoter data and updating readme
Browse files- README.md +286 -294
- rossi_2021_af_combined_mindel.parquet +3 -0
- rossi_2021_af_replicates_mindel.parquet +3 -0
- rossi_2021_metadata.parquet +2 -2
- scripts/genomecov_to_annotated_features.R +152 -72
README.md
CHANGED
|
@@ -36,29 +36,201 @@ experimental_conditions:
|
|
| 36 |
duration_minutes: 6
|
| 37 |
pre_induction_temperature_celsius: 25
|
| 38 |
method: equal_volume_medium_transfer
|
|
|
|
| 39 |
doi: https://doi.org/10.1038/s41586-021-03314-8
|
| 40 |
citation: Rossi, MJ, Kuntala, PK, Lai, WKM, Yamada, N, Badjatia, N, Mittal, et al. 2021. A high-resolution protein architecture of the budding yeast genome. Nature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
configs:
|
| 42 |
-
- config_name:
|
| 43 |
description: Metadata describing the tagged regulator in each experiment
|
| 44 |
dataset_type: metadata
|
|
|
|
| 45 |
data_files:
|
| 46 |
- split: train
|
| 47 |
path: rossi_2021_metadata.parquet
|
| 48 |
dataset_info:
|
| 49 |
features:
|
| 50 |
-
- name:
|
| 51 |
-
dtype: string
|
| 52 |
-
description: Systematic gene name (ORF identifier) of the transcription factor
|
| 53 |
-
- name: regulator_symbol
|
| 54 |
-
dtype: string
|
| 55 |
-
description: Standard gene symbol of the transcription factor
|
| 56 |
-
- name: run_accession
|
| 57 |
dtype: string
|
| 58 |
description: GEO run accession identifier for the sample
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
- name: yeastepigenome_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
dtype: string
|
|
|
|
|
|
|
|
|
|
| 61 |
description: Sample identifier used by yeastepigenome.org
|
|
|
|
| 62 |
- config_name: genome_map
|
| 63 |
description: "ChIP-exo 5' tag coverage data partitioned by sample accession"
|
| 64 |
dataset_type: genome_map
|
|
@@ -67,6 +239,9 @@ configs:
|
|
| 67 |
path: genome_map/*/*.parquet
|
| 68 |
dataset_info:
|
| 69 |
features:
|
|
|
|
|
|
|
|
|
|
| 70 |
- name: chr
|
| 71 |
dtype: string
|
| 72 |
description: Chromosome name (e.g., chrI, chrII, etc.)
|
|
@@ -77,259 +252,104 @@ configs:
|
|
| 77 |
dtype: int32
|
| 78 |
description: "Depth of coverage (number of 5' tags) at this genomic position"
|
| 79 |
|
| 80 |
-
- config_name:
|
| 81 |
-
description:
|
| 82 |
-
dataset_type:
|
| 83 |
-
applies_to: ["rossi_2021_af_replicates"]
|
| 84 |
data_files:
|
| 85 |
- split: train
|
| 86 |
-
path:
|
| 87 |
dataset_info:
|
| 88 |
features:
|
| 89 |
-
- name:
|
| 90 |
-
dtype: string
|
| 91 |
-
description: Systematic gene identifier for the transcription factor
|
| 92 |
-
role: regulator_identifier
|
| 93 |
-
- name: regulator_symbol
|
| 94 |
-
dtype: string
|
| 95 |
-
description: Standard gene symbol for the transcription factor
|
| 96 |
-
role: regulator_identifier
|
| 97 |
-
- name: run_accession
|
| 98 |
-
dtype: string
|
| 99 |
-
description: SRA run accession identifier for this biological replicate
|
| 100 |
-
- name: yeastepigenome_id
|
| 101 |
dtype: string
|
| 102 |
-
description:
|
| 103 |
-
- name:
|
| 104 |
-
dtype: string
|
| 105 |
-
description: >-
|
| 106 |
-
Experimental treatment applied prior to ChIP-exo. The majority of
|
| 107 |
-
samples are untreated; a subset of SAGA-associated factors received a
|
| 108 |
-
brief heat shock (equal volume of 37°C medium mixed into a 25°C culture,
|
| 109 |
-
6 min at 37°C).
|
| 110 |
-
role: experimental_condition
|
| 111 |
-
- name: growth_media
|
| 112 |
-
dtype: string
|
| 113 |
-
description: >-
|
| 114 |
-
Growth medium used in the experiment, as reported in yeastepigenome.org
|
| 115 |
-
sample metadata. The majority of samples used YPD (rich medium).
|
| 116 |
-
role: experimental_condition
|
| 117 |
-
- name: antibody
|
| 118 |
-
dtype: string
|
| 119 |
-
description: Antibody used for ChIP-exo immunoprecipitation
|
| 120 |
-
- name: sample_id
|
| 121 |
dtype: string
|
| 122 |
-
description:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
-
- config_name:
|
| 125 |
-
description:
|
| 126 |
-
dataset_type:
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
data_files:
|
| 129 |
- split: train
|
| 130 |
-
path:
|
| 131 |
dataset_info:
|
| 132 |
features:
|
| 133 |
-
- name: regulator_locus_tag
|
| 134 |
-
dtype: string
|
| 135 |
-
description: Systematic gene identifier for the transcription factor
|
| 136 |
-
role: regulator_identifier
|
| 137 |
-
- name: regulator_symbol
|
| 138 |
-
dtype: string
|
| 139 |
-
description: Standard gene symbol for the transcription factor
|
| 140 |
-
role: regulator_identifier
|
| 141 |
-
- name: treatment
|
| 142 |
-
dtype: string
|
| 143 |
-
description: >-
|
| 144 |
-
Experimental treatment applied prior to ChIP-exo. The majority of
|
| 145 |
-
samples are untreated; a subset of SAGA-associated factors received a
|
| 146 |
-
brief heat shock (equal volume of 37°C medium mixed into a 25°C culture,
|
| 147 |
-
6 min at 37°C).
|
| 148 |
-
role: experimental_condition
|
| 149 |
-
- name: growth_media
|
| 150 |
-
dtype: string
|
| 151 |
-
description: >-
|
| 152 |
-
Growth medium used in the experiment, as reported in yeastepigenome.org
|
| 153 |
-
sample metadata. The majority of samples used YPD (rich medium).
|
| 154 |
-
role: experimental_condition
|
| 155 |
-
- name: multi_antibody
|
| 156 |
-
dtype: bool
|
| 157 |
-
description: TRUE if the set of replicates includes more than one type of antibody
|
| 158 |
-
- name: antibody
|
| 159 |
-
dtype: string
|
| 160 |
-
description: >-
|
| 161 |
-
Antibody used for ChIP-exo immunoprecipitation. If multi_antibody is TRUE,
|
| 162 |
-
then the antibodies in the set are separated by `;`
|
| 163 |
- name: sample_id
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
dtype: string
|
| 165 |
-
description:
|
| 166 |
|
| 167 |
-
- config_name:
|
| 168 |
description: ChIP-exo annotated features at biological replicate level with binding peaks and statistical significance metrics
|
| 169 |
dataset_type: annotated_features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
data_files:
|
| 171 |
- split: train
|
| 172 |
-
path:
|
| 173 |
dataset_info:
|
| 174 |
features:
|
| 175 |
- name: sample_id
|
| 176 |
-
dtype:
|
| 177 |
description: Unique identifier for the biological replicate
|
| 178 |
role: sample_id
|
| 179 |
- name: run_accession
|
| 180 |
dtype: string
|
| 181 |
description: SRA run accession identifier for this biological replicate
|
| 182 |
-
- name: regulator_locus_tag
|
| 183 |
-
dtype: string
|
| 184 |
-
description: Systematic gene identifier for the transcription factor
|
| 185 |
-
role: regulator_identifier
|
| 186 |
-
- name: regulator_symbol
|
| 187 |
-
dtype: string
|
| 188 |
-
description: Standard gene symbol for the transcription factor
|
| 189 |
-
role: regulator_identifier
|
| 190 |
-
- name: target_locus_tag
|
| 191 |
-
dtype: string
|
| 192 |
-
description: Systematic gene identifier for the target gene
|
| 193 |
-
role: target_identifier
|
| 194 |
-
- name: target_symbol
|
| 195 |
-
dtype: string
|
| 196 |
-
description: Standard gene symbol for the target gene
|
| 197 |
-
role: target_identifier
|
| 198 |
-
- name: seqnames
|
| 199 |
-
dtype: string
|
| 200 |
-
description: Chromosome identifier (e.g., chrI, chrII, chrXVI)
|
| 201 |
-
- name: start
|
| 202 |
-
dtype: int64
|
| 203 |
-
description: Promoter region start position (1-based coordinate)
|
| 204 |
-
- name: end
|
| 205 |
-
dtype: int64
|
| 206 |
-
description: Promoter region end position (1-based, inclusive)
|
| 207 |
-
- name: background_counts
|
| 208 |
-
dtype: int64
|
| 209 |
-
description: Read counts in the background/control sample for this peak region
|
| 210 |
-
role: quantitative_measure
|
| 211 |
-
- name: experiment_counts
|
| 212 |
-
dtype: int64
|
| 213 |
-
description: Read counts in the ChIP-exo experiment sample for this peak region
|
| 214 |
-
role: quantitative_measure
|
| 215 |
-
- name: total_background_counts
|
| 216 |
-
dtype: int64
|
| 217 |
-
description: Total read counts across the entire genome in the background sample
|
| 218 |
-
role: quantitative_measure
|
| 219 |
-
- name: total_experiment_counts
|
| 220 |
-
dtype: int64
|
| 221 |
-
description: Total read counts across the entire genome in the experiment sample
|
| 222 |
-
role: quantitative_measure
|
| 223 |
-
- name: enrichment
|
| 224 |
-
dtype: float64
|
| 225 |
-
description: Enrichment score for the binding peak
|
| 226 |
-
role: quantitative_measure
|
| 227 |
-
- name: poisson_pval
|
| 228 |
-
dtype: float64
|
| 229 |
-
description: P-value from Poisson distribution test for peak significance
|
| 230 |
-
role: quantitative_measure
|
| 231 |
-
- name: log_poisson_pval
|
| 232 |
-
dtype: float64
|
| 233 |
-
description: Log-transformed Poisson p-value
|
| 234 |
-
role: quantitative_measure
|
| 235 |
-
- name: hypergeometric_pval
|
| 236 |
-
dtype: float64
|
| 237 |
-
description: P-value from hypergeometric distribution test for peak significance
|
| 238 |
-
role: quantitative_measure
|
| 239 |
-
- name: log_hypergeometric_pval
|
| 240 |
-
dtype: float64
|
| 241 |
-
description: Log-transformed hypergeometric p-value
|
| 242 |
-
role: quantitative_measure
|
| 243 |
-
- name: poisson_qval
|
| 244 |
-
dtype: float64
|
| 245 |
-
description: FDR-adjusted q-value from Poisson test (multiple testing correction)
|
| 246 |
-
role: quantitative_measure
|
| 247 |
-
- name: hypergeometric_qval
|
| 248 |
-
dtype: float64
|
| 249 |
-
description: FDR-adjusted q-value from hypergeometric test (multiple testing correction)
|
| 250 |
-
role: quantitative_measure
|
| 251 |
|
| 252 |
- config_name: rossi_2021_af_combined
|
| 253 |
description: Combined ChIP-exo annotated features with binding peaks and statistical significance metrics aggregated across biological replicates
|
| 254 |
dataset_type: annotated_features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
data_files:
|
| 256 |
- split: train
|
| 257 |
path: rossi_2021_af_combined.parquet
|
| 258 |
dataset_info:
|
| 259 |
features:
|
| 260 |
- name: sample_id
|
| 261 |
-
dtype:
|
| 262 |
description: Unique identifier combining regulator and replicates
|
| 263 |
role: sample_id
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
role: target_identifier
|
| 280 |
-
- name: seqnames
|
| 281 |
-
dtype: string
|
| 282 |
-
description: Chromosome identifier (e.g., chrI, chrII, chrXVI)
|
| 283 |
-
- name: start
|
| 284 |
-
dtype: int64
|
| 285 |
-
description: Promoter region start position (1-based coordinate)
|
| 286 |
-
- name: end
|
| 287 |
-
dtype: int64
|
| 288 |
-
description: Promoter region end position (1-based, inclusive)
|
| 289 |
-
- name: background_counts
|
| 290 |
-
dtype: int64
|
| 291 |
-
description: Combined read counts in the background/control sample for this peak region
|
| 292 |
-
role: quantitative_measure
|
| 293 |
-
- name: experiment_counts
|
| 294 |
-
dtype: int64
|
| 295 |
-
description: Combined read counts in the ChIP-exo experiment sample for this peak region
|
| 296 |
-
role: quantitative_measure
|
| 297 |
-
- name: total_background_counts
|
| 298 |
-
dtype: int64
|
| 299 |
-
description: Total read counts across the entire genome in the combined background sample
|
| 300 |
-
role: quantitative_measure
|
| 301 |
-
- name: total_experiment_counts
|
| 302 |
dtype: int64
|
| 303 |
-
description:
|
| 304 |
-
role:
|
| 305 |
-
- name: enrichment
|
| 306 |
-
dtype: float64
|
| 307 |
-
description: Enrichment score for the binding peak calculated from combined replicates
|
| 308 |
-
role: quantitative_measure
|
| 309 |
-
- name: poisson_pval
|
| 310 |
-
dtype: float64
|
| 311 |
-
description: P-value from Poisson distribution test for peak significance
|
| 312 |
-
role: quantitative_measure
|
| 313 |
-
- name: log_poisson_pval
|
| 314 |
-
dtype: float64
|
| 315 |
-
description: Log-transformed Poisson p-value
|
| 316 |
-
role: quantitative_measure
|
| 317 |
-
- name: hypergeometric_pval
|
| 318 |
-
dtype: float64
|
| 319 |
-
description: P-value from hypergeometric distribution test for peak significance
|
| 320 |
-
role: quantitative_measure
|
| 321 |
-
- name: log_hypergeometric_pval
|
| 322 |
-
dtype: float64
|
| 323 |
-
description: Log-transformed hypergeometric p-value
|
| 324 |
-
role: quantitative_measure
|
| 325 |
-
- name: poisson_qval
|
| 326 |
-
dtype: float64
|
| 327 |
-
description: FDR-adjusted q-value from Poisson test (multiple testing correction)
|
| 328 |
-
role: quantitative_measure
|
| 329 |
-
- name: hypergeometric_qval
|
| 330 |
-
dtype: float64
|
| 331 |
-
description: FDR-adjusted q-value from hypergeometric test (multiple testing correction)
|
| 332 |
-
role: quantitative_measure
|
| 333 |
---
|
| 334 |
# Rossi 2021
|
| 335 |
|
|
@@ -338,99 +358,71 @@ This work was published in
|
|
| 338 |
|
| 339 |
[Rossi MJ, Kuntala PK, Lai WKM, Yamada N, Badjatia N, Mittal C, Kuzu G, Bocklund K, Farrell NP, Blanda TR, Mairose JD, Basting AV, Mistretta KS, Rocco DJ, Perkinson ES, Kellogg GD, Mahony S, Pugh BF. A high-resolution protein architecture of the budding yeast genome. Nature. 2021 Apr;592(7853):309-314. doi: 10.1038/s41586-021-03314-8. Epub 2021 Mar 10. PMID: 33692541; PMCID: PMC8035251.](https://doi.org/10.1038/s41586-021-03314-8)
|
| 340 |
|
| 341 |
-
##
|
| 342 |
-
|
| 343 |
-
The python package `tfbpapi` provides an interface to this data which eases
|
| 344 |
-
examining the datasets, field definitions and other operations. You may also
|
| 345 |
-
download the parquet datasets directly from hugging face by clicking on
|
| 346 |
-
"Files and Versions", or by using the huggingface_cli and duckdb directly.
|
| 347 |
-
In both cases, this provides a method of retrieving dataset and field definitions.
|
| 348 |
-
|
| 349 |
-
### `tfbpapi`
|
| 350 |
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
|
|
|
|
|
|
| 354 |
|
| 355 |
-
###
|
| 356 |
|
| 357 |
-
|
| 358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 359 |
|
| 360 |
```python
|
| 361 |
-
from
|
| 362 |
-
from
|
| 363 |
|
| 364 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 365 |
|
| 366 |
-
#
|
| 367 |
-
|
| 368 |
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
pprint(dataset_paths_dict)
|
| 373 |
```
|
| 374 |
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
|
| 379 |
```python
|
| 380 |
from huggingface_hub import snapshot_download
|
| 381 |
import duckdb
|
| 382 |
-
import os
|
| 383 |
-
# Download only the metadata first
|
| 384 |
-
repo_path = snapshot_download(
|
| 385 |
-
repo_id="BrentLab/rossi_2021",
|
| 386 |
-
repo_type="dataset",
|
| 387 |
-
allow_patterns="rossi_2021_metadata.parquet"
|
| 388 |
-
)
|
| 389 |
-
|
| 390 |
-
dataset_path = os.path.join(repo_path, "rossi_2021_metadata.parquet")
|
| 391 |
-
conn = duckdb.connect()
|
| 392 |
-
meta_res = conn.execute("SELECT * FROM read_parquet(?) LIMIT 10", [dataset_path]).df()
|
| 393 |
-
print(meta_res)
|
| 394 |
-
```
|
| 395 |
-
|
| 396 |
-
We might choose to take a look at the file with accession SRR11466106:
|
| 397 |
|
| 398 |
-
```python
|
| 399 |
-
# Download only a specific sample's genome coverage data
|
| 400 |
repo_path = snapshot_download(
|
| 401 |
repo_id="BrentLab/rossi_2021",
|
| 402 |
repo_type="dataset",
|
| 403 |
-
allow_patterns="
|
| 404 |
)
|
| 405 |
-
|
| 406 |
-
#
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
```
|
| 412 |
|
| 413 |
-
|
| 414 |
-
[authentication token](https://huggingface.co/docs/hub/en/security-tokens).
|
| 415 |
-
If you do not have one, try omitting the token related code below and see if
|
| 416 |
-
it works. Else, create a token and provide it like so:
|
| 417 |
-
|
| 418 |
-
```python
|
| 419 |
-
|
| 420 |
-
repo_id = "BrentLab/rossi_2021"
|
| 421 |
-
|
| 422 |
-
hf_token = os.getenv("HF_TOKEN")
|
| 423 |
-
|
| 424 |
-
# Download entire repo to local directory
|
| 425 |
-
repo_path = snapshot_download(
|
| 426 |
-
repo_id=repo_id,
|
| 427 |
-
repo_type="dataset",
|
| 428 |
-
token=hf_token
|
| 429 |
-
)
|
| 430 |
|
| 431 |
-
|
|
|
|
| 432 |
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
```
|
|
|
|
| 36 |
duration_minutes: 6
|
| 37 |
pre_induction_temperature_celsius: 25
|
| 38 |
method: equal_volume_medium_transfer
|
| 39 |
+
|
| 40 |
doi: https://doi.org/10.1038/s41586-021-03314-8
|
| 41 |
citation: Rossi, MJ, Kuntala, PK, Lai, WKM, Yamada, N, Badjatia, N, Mittal, et al. 2021. A high-resolution protein architecture of the budding yeast genome. Nature.
|
| 42 |
+
|
| 43 |
+
features:
|
| 44 |
+
- applies_to:
|
| 45 |
+
- rossi_2021_metadata_replicate
|
| 46 |
+
- rossi_2021_metadata_sample
|
| 47 |
+
fields:
|
| 48 |
+
- name: treatment
|
| 49 |
+
dtype: string
|
| 50 |
+
description: >-
|
| 51 |
+
Experimental treatment applied prior to ChIP-exo. The majority of
|
| 52 |
+
samples are untreated; a subset of SAGA-associated factors received a
|
| 53 |
+
brief heat shock (equal volume of 37°C medium mixed into a 25°C culture,
|
| 54 |
+
6 min at 37°C).
|
| 55 |
+
role: experimental_condition
|
| 56 |
+
- name: growth_media
|
| 57 |
+
dtype: string
|
| 58 |
+
description: >-
|
| 59 |
+
Growth medium used in the experiment, as reported in yeastepigenome.org
|
| 60 |
+
sample metadata. The majority of samples used YPD (rich medium).
|
| 61 |
+
role: experimental_condition
|
| 62 |
+
|
| 63 |
+
- applies_to:
|
| 64 |
+
- rossi_2021_metadata_replicate
|
| 65 |
+
- rossi_2021_metadata_sample
|
| 66 |
+
- rossi_2021_af_replicates
|
| 67 |
+
- rossi_2021_af_combined
|
| 68 |
+
- rossi_2021_af_replicates_mindel
|
| 69 |
+
- rossi_2021_af_combined_mindel
|
| 70 |
+
fields:
|
| 71 |
+
- name: regulator_locus_tag
|
| 72 |
+
dtype: string
|
| 73 |
+
description: Systematic gene name (ORF identifier) of the transcription factor
|
| 74 |
+
- name: regulator_symbol
|
| 75 |
+
dtype: string
|
| 76 |
+
description: Standard gene symbol of the transcription factor
|
| 77 |
+
|
| 78 |
+
- applies_to:
|
| 79 |
+
- rossi_2021_af_replicates
|
| 80 |
+
- rossi_2021_af_combined
|
| 81 |
+
- rossi_2021_af_replicates_mindel
|
| 82 |
+
- rossi_2021_af_combined_mindel
|
| 83 |
+
fields:
|
| 84 |
+
- name: target_locus_tag
|
| 85 |
+
dtype: string
|
| 86 |
+
description: Systematic gene identifier for the target gene
|
| 87 |
+
role: target_identifier
|
| 88 |
+
- name: target_symbol
|
| 89 |
+
dtype: string
|
| 90 |
+
description: Standard gene symbol for the target gene
|
| 91 |
+
role: target_identifier
|
| 92 |
+
- name: seqnames
|
| 93 |
+
dtype: string
|
| 94 |
+
description: Chromosome identifier (e.g., chrI, chrII, chrXVI)
|
| 95 |
+
- name: start
|
| 96 |
+
dtype: int64
|
| 97 |
+
description: Promoter region start position (1-based coordinate)
|
| 98 |
+
- name: end
|
| 99 |
+
dtype: int64
|
| 100 |
+
description: Promoter region end position (1-based, inclusive)
|
| 101 |
+
- name: background_counts
|
| 102 |
+
dtype: int64
|
| 103 |
+
description: Read counts in the background/control sample for this peak region
|
| 104 |
+
role: quantitative_measure
|
| 105 |
+
- name: experiment_counts
|
| 106 |
+
dtype: int64
|
| 107 |
+
description: Read counts in the ChIP-exo experiment sample for this peak region
|
| 108 |
+
role: quantitative_measure
|
| 109 |
+
- name: total_background_counts
|
| 110 |
+
dtype: int64
|
| 111 |
+
description: Total read counts across the entire genome in the background sample
|
| 112 |
+
role: quantitative_measure
|
| 113 |
+
- name: total_experiment_counts
|
| 114 |
+
dtype: int64
|
| 115 |
+
description: Total read counts across the entire genome in the experiment sample
|
| 116 |
+
role: quantitative_measure
|
| 117 |
+
- name: enrichment
|
| 118 |
+
dtype: float64
|
| 119 |
+
description: Enrichment score for the binding peak
|
| 120 |
+
role: quantitative_measure
|
| 121 |
+
- name: poisson_pval
|
| 122 |
+
dtype: float64
|
| 123 |
+
description: P-value from Poisson distribution test for peak significance
|
| 124 |
+
role: quantitative_measure
|
| 125 |
+
- name: log_poisson_pval
|
| 126 |
+
dtype: float64
|
| 127 |
+
description: Log-transformed Poisson p-value
|
| 128 |
+
role: quantitative_measure
|
| 129 |
+
- name: hypergeometric_pval
|
| 130 |
+
dtype: float64
|
| 131 |
+
description: P-value from hypergeometric distribution test for peak significance
|
| 132 |
+
role: quantitative_measure
|
| 133 |
+
- name: log_hypergeometric_pval
|
| 134 |
+
dtype: float64
|
| 135 |
+
description: Log-transformed hypergeometric p-value
|
| 136 |
+
role: quantitative_measure
|
| 137 |
+
- name: poisson_qval
|
| 138 |
+
dtype: float64
|
| 139 |
+
description: FDR-adjusted q-value from Poisson test (multiple testing correction)
|
| 140 |
+
role: quantitative_measure
|
| 141 |
+
- name: hypergeometric_qval
|
| 142 |
+
dtype: float64
|
| 143 |
+
description: FDR-adjusted q-value from hypergeometric test (multiple testing correction)
|
| 144 |
+
role: quantitative_measure
|
| 145 |
+
|
| 146 |
+
- applies_to:
|
| 147 |
+
- rossi_2021_af_replicates_mindel
|
| 148 |
+
- rossi_2021_af_combined_mindel
|
| 149 |
+
fields:
|
| 150 |
+
- name: width
|
| 151 |
+
dtype: int64
|
| 152 |
+
description: Width of the promoter region
|
| 153 |
+
- name: strand
|
| 154 |
+
dtype: string
|
| 155 |
+
description: Genomic strand of the promoter region (+ or -)
|
| 156 |
+
- name: mindel_name
|
| 157 |
+
dtype: string
|
| 158 |
+
description: Name of the promoter region as defined in the Mindel promoters
|
| 159 |
+
- name: promoter_sequence
|
| 160 |
+
dtype: string
|
| 161 |
+
description: Nucleotide sequence of the promoter region
|
| 162 |
+
- name: in_mahendrawada_features
|
| 163 |
+
dtype: bool
|
| 164 |
+
description: >-
|
| 165 |
+
TRUE if the promoter region was used in Mahendrawada 2025. Note that this
|
| 166 |
+
is equivalent to protein coding non dubious ORF
|
| 167 |
+
- name: promoter_exact_aligns
|
| 168 |
+
dtype: int64
|
| 169 |
+
description: >-
|
| 170 |
+
this is a feature from the Mindel data that I have not documented. It is a TODO.
|
| 171 |
+
|
| 172 |
configs:
|
| 173 |
+
- config_name: rossi_2021_metadata_replicate
|
| 174 |
description: Metadata describing the tagged regulator in each experiment
|
| 175 |
dataset_type: metadata
|
| 176 |
+
applies_to: ["genome_map"]
|
| 177 |
data_files:
|
| 178 |
- split: train
|
| 179 |
path: rossi_2021_metadata.parquet
|
| 180 |
dataset_info:
|
| 181 |
features:
|
| 182 |
+
- name: accession
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
dtype: string
|
| 184 |
description: GEO run accession identifier for the sample
|
| 185 |
+
role: sample_id
|
| 186 |
+
- name: sample_id
|
| 187 |
+
dtype: int64
|
| 188 |
+
description: Unique identifier for the biological replicate. Note this is the
|
| 189 |
+
same as the sample_id in rossi_2021_metadata_sample
|
| 190 |
- name: yeastepigenome_id
|
| 191 |
+
dtype: float64
|
| 192 |
+
description: Sample identifier used by yeastepigenome.org
|
| 193 |
+
- name: antibody
|
| 194 |
+
dtype: string
|
| 195 |
+
description: Antibody used for ChIP-exo immunoprecipitation
|
| 196 |
+
|
| 197 |
+
- config_name: rossi_2021_metadata_sample
|
| 198 |
+
description: Sample-level metadata for combined ChIP-exo experiments including experimental conditions
|
| 199 |
+
dataset_type: metadata
|
| 200 |
+
applies_to: ["rossi_2021_af_combined"]
|
| 201 |
+
data_files:
|
| 202 |
+
- split: train
|
| 203 |
+
path: rossi_2021_metadata_sample.parquet
|
| 204 |
+
dataset_info:
|
| 205 |
+
features:
|
| 206 |
+
- name: sample_id
|
| 207 |
+
dtype: int64
|
| 208 |
+
description: Unique identifier combining regulator and replicates
|
| 209 |
+
- name: multi_antibody
|
| 210 |
+
dtype: bool
|
| 211 |
+
description: TRUE if the set of replicates includes more than one type of antibody
|
| 212 |
+
- name: antibody
|
| 213 |
+
dtype: string
|
| 214 |
+
description: >-
|
| 215 |
+
Antibody used for ChIP-exo immunoprecipitation. If multi_antibody is TRUE,
|
| 216 |
+
then the antibodies in the set are separated by `;`
|
| 217 |
+
|
| 218 |
+
- config_name: genome_map_control_meta
|
| 219 |
+
description: Sample accession metadata for ChIP-exo input/control coverage tracks
|
| 220 |
+
dataset_type: metadata
|
| 221 |
+
applies_to: ["genome_map_control"]
|
| 222 |
+
data_files:
|
| 223 |
+
- split: train
|
| 224 |
+
path: genome_map_control_meta.parquet
|
| 225 |
+
dataset_info:
|
| 226 |
+
features:
|
| 227 |
+
- name: accession
|
| 228 |
dtype: string
|
| 229 |
+
description: SRA run accession identifier for the control sample
|
| 230 |
+
- name: yeastepigenome_id
|
| 231 |
+
dtype: float64
|
| 232 |
description: Sample identifier used by yeastepigenome.org
|
| 233 |
+
|
| 234 |
- config_name: genome_map
|
| 235 |
description: "ChIP-exo 5' tag coverage data partitioned by sample accession"
|
| 236 |
dataset_type: genome_map
|
|
|
|
| 239 |
path: genome_map/*/*.parquet
|
| 240 |
dataset_info:
|
| 241 |
features:
|
| 242 |
+
- name: accession
|
| 243 |
+
dtype: string
|
| 244 |
+
description: GEO run accession identifier for the sample (partitioning column)
|
| 245 |
- name: chr
|
| 246 |
dtype: string
|
| 247 |
description: Chromosome name (e.g., chrI, chrII, etc.)
|
|
|
|
| 252 |
dtype: int32
|
| 253 |
description: "Depth of coverage (number of 5' tags) at this genomic position"
|
| 254 |
|
| 255 |
+
- config_name: genome_map_control
|
| 256 |
+
description: "ChIP-exo 5' tag coverage data for input/control samples, partitioned by sample accession"
|
| 257 |
+
dataset_type: genome_map
|
|
|
|
| 258 |
data_files:
|
| 259 |
- split: train
|
| 260 |
+
path: genome_map_control/*/*.parquet
|
| 261 |
dataset_info:
|
| 262 |
features:
|
| 263 |
+
- name: accession
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
dtype: string
|
| 265 |
+
description: GEO run accession identifier for the sample (partitioning column)
|
| 266 |
+
- name: chr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
dtype: string
|
| 268 |
+
description: Chromosome name (e.g., chrI, chrII, etc.)
|
| 269 |
+
- name: pos
|
| 270 |
+
dtype: int32
|
| 271 |
+
description: "Genomic position of the 5' tag"
|
| 272 |
+
- name: pileup
|
| 273 |
+
dtype: int32
|
| 274 |
+
description: "Depth of coverage (number of 5' tags) at this genomic position"
|
| 275 |
|
| 276 |
+
- config_name: rossi_2021_af_replicates
|
| 277 |
+
description: ChIP-exo annotated features at biological replicate level with binding peaks and statistical significance metrics
|
| 278 |
+
dataset_type: annotated_features
|
| 279 |
+
genome_resources:
|
| 280 |
+
region_sets:
|
| 281 |
+
Kang:
|
| 282 |
+
path: https://huggingface.co/datasets/BrentLab/yeast_genome_resources/blob/main/yiming_promoters.bed
|
| 283 |
+
join_column: target_locus_tag
|
| 284 |
data_files:
|
| 285 |
- split: train
|
| 286 |
+
path: rossi_2021_af_replicates.parquet
|
| 287 |
dataset_info:
|
| 288 |
features:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
- name: sample_id
|
| 290 |
+
dtype: int64
|
| 291 |
+
description: Unique identifier for the biological replicate
|
| 292 |
+
role: sample_id
|
| 293 |
+
- name: run_accession
|
| 294 |
dtype: string
|
| 295 |
+
description: SRA run accession identifier for this biological replicate
|
| 296 |
|
| 297 |
+
- config_name: rossi_2021_af_replicates_mindel
|
| 298 |
description: ChIP-exo annotated features at biological replicate level with binding peaks and statistical significance metrics
|
| 299 |
dataset_type: annotated_features
|
| 300 |
+
genome_resources:
|
| 301 |
+
region_sets:
|
| 302 |
+
Mindel:
|
| 303 |
+
path: https://huggingface.co/datasets/BrentLab/yeast_genome_resources/blob/main/mindel_promoters.csv.gz
|
| 304 |
+
join_column: target_locus_tag
|
| 305 |
data_files:
|
| 306 |
- split: train
|
| 307 |
+
path: rossi_2021_af_replicates_mindel.parquet
|
| 308 |
dataset_info:
|
| 309 |
features:
|
| 310 |
- name: sample_id
|
| 311 |
+
dtype: int64
|
| 312 |
description: Unique identifier for the biological replicate
|
| 313 |
role: sample_id
|
| 314 |
- name: run_accession
|
| 315 |
dtype: string
|
| 316 |
description: SRA run accession identifier for this biological replicate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
|
| 318 |
- config_name: rossi_2021_af_combined
|
| 319 |
description: Combined ChIP-exo annotated features with binding peaks and statistical significance metrics aggregated across biological replicates
|
| 320 |
dataset_type: annotated_features
|
| 321 |
+
genome_resources:
|
| 322 |
+
region_sets:
|
| 323 |
+
Kang:
|
| 324 |
+
path: https://huggingface.co/datasets/BrentLab/yeast_genome_resources/blob/main/yiming_promoters.bed
|
| 325 |
+
join_column: target_locus_tag
|
| 326 |
data_files:
|
| 327 |
- split: train
|
| 328 |
path: rossi_2021_af_combined.parquet
|
| 329 |
dataset_info:
|
| 330 |
features:
|
| 331 |
- name: sample_id
|
| 332 |
+
dtype: int64
|
| 333 |
description: Unique identifier combining regulator and replicates
|
| 334 |
role: sample_id
|
| 335 |
+
|
| 336 |
+
- config_name: rossi_2021_af_combined_mindel
|
| 337 |
+
description: Combined ChIP-exo annotated features with binding peaks and statistical significance metrics aggregated across biological replicates
|
| 338 |
+
dataset_type: annotated_features
|
| 339 |
+
genome_resources:
|
| 340 |
+
region_sets:
|
| 341 |
+
Mindel:
|
| 342 |
+
path: https://huggingface.co/datasets/BrentLab/yeast_genome_resources/blob/main/mindel_promoters.csv.gz
|
| 343 |
+
join_column: target_locus_tag
|
| 344 |
+
data_files:
|
| 345 |
+
- split: train
|
| 346 |
+
path: rossi_2021_af_combined_mindel.parquet
|
| 347 |
+
dataset_info:
|
| 348 |
+
features:
|
| 349 |
+
- name: sample_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
dtype: int64
|
| 351 |
+
description: Unique identifier combining regulator and replicates
|
| 352 |
+
role: sample_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 353 |
---
|
| 354 |
# Rossi 2021
|
| 355 |
|
|
|
|
| 358 |
|
| 359 |
[Rossi MJ, Kuntala PK, Lai WKM, Yamada N, Badjatia N, Mittal C, Kuzu G, Bocklund K, Farrell NP, Blanda TR, Mairose JD, Basting AV, Mistretta KS, Rocco DJ, Perkinson ES, Kellogg GD, Mahony S, Pugh BF. A high-resolution protein architecture of the budding yeast genome. Nature. 2021 Apr;592(7853):309-314. doi: 10.1038/s41586-021-03314-8. Epub 2021 Mar 10. PMID: 33692541; PMCID: PMC8035251.](https://doi.org/10.1038/s41586-021-03314-8)
|
| 360 |
|
| 361 |
+
## Accessing Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
|
| 363 |
+
The examples below require
|
| 364 |
+
[labretriever](https://github.com/cmatKhan/labretriever#installation)
|
| 365 |
+
(`pip install labretriever`) and/or the
|
| 366 |
+
[HuggingFace Hub client](https://huggingface.co/docs/huggingface_hub/installation)
|
| 367 |
+
(`pip install huggingface_hub`).
|
| 368 |
|
| 369 |
+
### Accessing Data with labretriever
|
| 370 |
|
| 371 |
+
This repository is part of a collection configured as a unified database using
|
| 372 |
+
[labretriever.VirtualDB](https://cmatkhan.github.io/labretriever/virtual_db_configuration/).
|
| 373 |
+
Download the
|
| 374 |
+
[collection config](https://github.com/BrentLab/tfbpshiny/blob/main/tfbpshiny/brentlab_yeast_collection.yaml)
|
| 375 |
+
and use it to query the data directly in Python, or with an AI assistant using the
|
| 376 |
+
[labretriever plugin](https://cmatkhan.github.io/labretriever/mcp_server/#quick-install-claude-code-plugin).
|
| 377 |
|
| 378 |
```python
|
| 379 |
+
from labretriever.virtual_db import VirtualDB
|
| 380 |
+
from labretriever.datacard import DataCard
|
| 381 |
|
| 382 |
+
# Citation and metadata
|
| 383 |
+
card = DataCard("BrentLab/rossi_2021")
|
| 384 |
+
info = card.info()
|
| 385 |
+
print(info["doi"])
|
| 386 |
+
print(info["citation"])
|
| 387 |
|
| 388 |
+
# path to the downloaded brentlab_yeast_collection.yaml
|
| 389 |
+
vdb = VirtualDB("/path/to/brentlab_yeast_collection.yaml")
|
| 390 |
|
| 391 |
+
print(vdb.get_dataset_description("rossi"))
|
| 392 |
+
vdb.query("SELECT * FROM rossi LIMIT 5")
|
|
|
|
|
|
|
| 393 |
```
|
| 394 |
|
| 395 |
+
### Direct parquet access
|
| 396 |
+
|
| 397 |
+
The repository contains more data than what is exposed through the collection
|
| 398 |
+
configuration. Use `DataCard.info()` to inspect available files, then download
|
| 399 |
+
and query with DuckDB.
|
| 400 |
+
|
| 401 |
+
Most files in this repository are single parquet files and can be read directly:
|
| 402 |
|
| 403 |
```python
|
| 404 |
from huggingface_hub import snapshot_download
|
| 405 |
import duckdb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 406 |
|
|
|
|
|
|
|
| 407 |
repo_path = snapshot_download(
|
| 408 |
repo_id="BrentLab/rossi_2021",
|
| 409 |
repo_type="dataset",
|
| 410 |
+
allow_patterns="rossi_2021_af_combined.parquet",
|
| 411 |
)
|
| 412 |
+
conn = duckdb.connect()
|
| 413 |
+
# returns a pandas DataFrame with the first 5 rows
|
| 414 |
+
conn.execute(
|
| 415 |
+
"SELECT * FROM read_parquet(?) LIMIT 5",
|
| 416 |
+
[f"{repo_path}/rossi_2021_af_combined.parquet"],
|
| 417 |
+
).df()
|
| 418 |
```
|
| 419 |
|
| 420 |
+
### Accessing using R
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
+
Clone the repository and read parquet files directly with
|
| 423 |
+
[arrow](https://arrow.apache.org/docs/r/):
|
| 424 |
|
| 425 |
+
```r
|
| 426 |
+
# install.packages("arrow")
|
| 427 |
+
arrow::read_parquet("rossi_2021_af_combined.parquet")
|
| 428 |
```
|
rossi_2021_af_combined_mindel.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de3ccc331bb962d8d740487edccfcd5106a41c48633a8c12d241918272cf22e9
|
| 3 |
+
size 1360370384
|
rossi_2021_af_replicates_mindel.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21e4bf08ec88ca283ec575f9058d9865fea9da07c629b71093ae348cddcaa1a2
|
| 3 |
+
size 2064717545
|
rossi_2021_metadata.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:0090a3d1543922c6001d65785e6babbd88c2a7f89dec242443a7d41a0447d2f4
|
| 3 |
+
size 33637
|
scripts/genomecov_to_annotated_features.R
CHANGED
|
@@ -508,6 +508,8 @@ enrichment_analysis <- function(sample_set_id,
|
|
| 508 |
# Main analysis workflow
|
| 509 |
# ============================================================================
|
| 510 |
|
|
|
|
|
|
|
| 511 |
# Load data
|
| 512 |
genomic_features <- arrow::read_parquet(
|
| 513 |
"~/code/hf/yeast_genome_resources/brentlab_features.parquet")
|
|
@@ -529,10 +531,19 @@ sample_id_list <- genomecov$tagged$meta %>%
|
|
| 529 |
unique()
|
| 530 |
|
| 531 |
# Load regions
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 536 |
|
| 537 |
# Process control samples
|
| 538 |
rossi_2021_control <- combine_control_af(genomecov$control, regions_gr)
|
|
@@ -555,72 +566,141 @@ annotated_feature_quants <- map(sample_id_list, ~{
|
|
| 555 |
})
|
| 556 |
names(annotated_feature_quants) <- sample_id_list
|
| 557 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
# Extract and format replicate-level results
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
#
|
| 579 |
-
#
|
| 580 |
-
#
|
| 581 |
-
#
|
| 582 |
-
#
|
| 583 |
-
#
|
| 584 |
-
#
|
| 585 |
-
#
|
| 586 |
-
#
|
| 587 |
-
#
|
| 588 |
-
#
|
| 589 |
-
#
|
| 590 |
-
#
|
| 591 |
-
#
|
| 592 |
-
#
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
#
|
| 612 |
-
#
|
| 613 |
-
#
|
| 614 |
-
# "
|
| 615 |
-
#
|
| 616 |
-
#
|
| 617 |
-
#
|
| 618 |
-
#
|
| 619 |
-
#
|
| 620 |
-
#
|
| 621 |
-
#
|
| 622 |
-
#
|
| 623 |
-
#
|
| 624 |
-
#
|
| 625 |
-
#
|
| 626 |
-
|
|
|
|
|
|
| 508 |
# Main analysis workflow
|
| 509 |
# ============================================================================
|
| 510 |
|
| 511 |
+
PROMOTERS = "mindel"
|
| 512 |
+
|
| 513 |
# Load data
|
| 514 |
genomic_features <- arrow::read_parquet(
|
| 515 |
"~/code/hf/yeast_genome_resources/brentlab_features.parquet")
|
|
|
|
| 531 |
unique()
|
| 532 |
|
| 533 |
# Load regions
|
| 534 |
+
regions_list = list(
|
| 535 |
+
yiming = read_tsv(
|
| 536 |
+
"~/code/hf/yeast_genome_resources/yiming_promoters.bed",
|
| 537 |
+
col_names = c('chr', 'start', 'end', 'locus_tag', 'score', 'strand')) %>%
|
| 538 |
+
bed_to_granges(),
|
| 539 |
+
mindel = arrow::read_parquet("~/code/hf/yeast_genome_resources/mindel_promoters.parquet") |>
|
| 540 |
+
bed_to_granges()
|
| 541 |
+
)
|
| 542 |
+
|
| 543 |
+
regions_gr <- regions_list[[PROMOTERS]]
|
| 544 |
+
|
| 545 |
+
# removes AAD6 and AAD16 from mindel. pseudogene no longer in annotations
|
| 546 |
+
regions_gr = regions_gr[!is.na(regions_gr$target_locus_tag)]
|
| 547 |
|
| 548 |
# Process control samples
|
| 549 |
rossi_2021_control <- combine_control_af(genomecov$control, regions_gr)
|
|
|
|
| 566 |
})
|
| 567 |
names(annotated_feature_quants) <- sample_id_list
|
| 568 |
|
| 569 |
+
if(PROMOTERS == "yiming"){
|
| 570 |
+
annotated_features_quants_replicates <- map(annotated_feature_quants, ~{
|
| 571 |
+
map(.x$replicates, as_tibble) %>%
|
| 572 |
+
list_rbind(names_to = "run_accession")}) %>%
|
| 573 |
+
list_rbind(names_to = "sample_id") %>%
|
| 574 |
+
mutate(sample_id = as.integer(sample_id)) %>%
|
| 575 |
+
left_join(
|
| 576 |
+
genomecov$tagged$meta %>%
|
| 577 |
+
ungroup() %>%
|
| 578 |
+
select(sample_id, regulator_locus_tag, regulator_symbol, run_accession) %>%
|
| 579 |
+
distinct(),
|
| 580 |
+
by = c("sample_id", "run_accession")) %>%
|
| 581 |
+
left_join(select(genomic_features, locus_tag, symbol)) %>%
|
| 582 |
+
dplyr::rename(target_locus_tag = locus_tag, target_symbol = symbol) %>%
|
| 583 |
+
dplyr::relocate(sample_id, run_accession, regulator_locus_tag, regulator_symbol,
|
| 584 |
+
target_locus_tag, target_symbol) %>%
|
| 585 |
+
select(-c(score, width, strand))
|
| 586 |
+
|
| 587 |
+
# annotated_features_quants_replicates %>%
|
| 588 |
+
# write_parquet(
|
| 589 |
+
# "~/code/hf/rossi_2021/rossi_2021_af_replicates.parquet",
|
| 590 |
+
# compression = "zstd",
|
| 591 |
+
# write_statistics = TRUE,
|
| 592 |
+
# chunk_size = 6708,
|
| 593 |
+
# use_dictionary = c(
|
| 594 |
+
# sample_id = TRUE,
|
| 595 |
+
# run_accession = TRUE,
|
| 596 |
+
# regulator_locus_tag = TRUE,
|
| 597 |
+
# regulator_symbol = TRUE,
|
| 598 |
+
# seqnames = TRUE,
|
| 599 |
+
# target_locus_tag = TRUE,
|
| 600 |
+
# target_symbol = TRUE
|
| 601 |
+
# )
|
| 602 |
+
# )
|
| 603 |
+
|
| 604 |
+
} else if (PROMOTERS == "mindel") {
|
| 605 |
+
annotated_features_quants_replicates <- map(annotated_feature_quants, ~{
|
| 606 |
+
map(.x$replicates, as_tibble) %>%
|
| 607 |
+
list_rbind(names_to = "run_accession")}) %>%
|
| 608 |
+
list_rbind(names_to = "sample_id") %>%
|
| 609 |
+
mutate(sample_id = as.integer(sample_id)) %>%
|
| 610 |
+
left_join(
|
| 611 |
+
genomecov$tagged$meta %>%
|
| 612 |
+
ungroup() %>%
|
| 613 |
+
select(sample_id, regulator_locus_tag, regulator_symbol, run_accession) %>%
|
| 614 |
+
distinct(),
|
| 615 |
+
by = c("sample_id", "run_accession")) %>%
|
| 616 |
+
dplyr::relocate(sample_id, run_accession, regulator_locus_tag, regulator_symbol,
|
| 617 |
+
target_locus_tag, target_symbol)
|
| 618 |
+
|
| 619 |
+
# annotated_features_quants_replicates %>%
|
| 620 |
+
# write_parquet(
|
| 621 |
+
# "~/code/hf/rossi_2021/rossi_2021_af_replicates_mindel.parquet",
|
| 622 |
+
# compression = "zstd",
|
| 623 |
+
# write_statistics = TRUE,
|
| 624 |
+
# chunk_size = 5358,
|
| 625 |
+
# use_dictionary = c(
|
| 626 |
+
# sample_id = TRUE,
|
| 627 |
+
# run_accession = TRUE,
|
| 628 |
+
# regulator_locus_tag = TRUE,
|
| 629 |
+
# regulator_symbol = TRUE,
|
| 630 |
+
# seqnames = TRUE,
|
| 631 |
+
# target_locus_tag = TRUE,
|
| 632 |
+
# target_symbol = TRUE
|
| 633 |
+
# )
|
| 634 |
+
# )
|
| 635 |
+
}
|
| 636 |
+
|
| 637 |
# Extract and format replicate-level results
|
| 638 |
+
|
| 639 |
+
if(PROMOTERS == 'yiming'){
|
| 640 |
+
# Extract and format combined results
|
| 641 |
+
annotated_feature_quants_combined <- map(annotated_feature_quants, ~{
|
| 642 |
+
as_tibble(.x$combined)}) %>%
|
| 643 |
+
list_rbind(names_to = "sample_id") %>%
|
| 644 |
+
mutate(sample_id = as.integer(sample_id)) %>%
|
| 645 |
+
left_join(
|
| 646 |
+
genomecov$tagged$meta %>%
|
| 647 |
+
ungroup() %>%
|
| 648 |
+
select(sample_id, regulator_locus_tag, regulator_symbol) %>%
|
| 649 |
+
distinct(),
|
| 650 |
+
by = "sample_id") %>%
|
| 651 |
+
left_join(select(genomic_features, locus_tag, symbol)) %>%
|
| 652 |
+
dplyr::rename(target_locus_tag = locus_tag, target_symbol = symbol) %>%
|
| 653 |
+
dplyr::relocate(sample_id, regulator_locus_tag, regulator_symbol,
|
| 654 |
+
target_locus_tag, target_symbol) %>%
|
| 655 |
+
select(-c(score, width, strand))
|
| 656 |
+
|
| 657 |
+
# Write combined results
|
| 658 |
+
# annotated_feature_quants_combined %>%
|
| 659 |
+
# write_parquet(
|
| 660 |
+
# "~/code/hf/rossi_2021/rossi_2021_af_mindel_combined.parquet",
|
| 661 |
+
# compression = "zstd",
|
| 662 |
+
# write_statistics = TRUE,
|
| 663 |
+
# chunk_size = 6708,
|
| 664 |
+
# use_dictionary = c(
|
| 665 |
+
# sample_id = TRUE,
|
| 666 |
+
# regulator_locus_tag = TRUE,
|
| 667 |
+
# regulator_symbol = TRUE,
|
| 668 |
+
# seqnames = TRUE,
|
| 669 |
+
# target_locus_tag = TRUE,
|
| 670 |
+
# target_symbol = TRUE
|
| 671 |
+
# )
|
| 672 |
+
# )
|
| 673 |
+
|
| 674 |
+
} else if(PROMOTERS == "mindel"){
|
| 675 |
+
# Extract and format combined results
|
| 676 |
+
annotated_feature_quants_combined <- map(annotated_feature_quants, ~{
|
| 677 |
+
as_tibble(.x$combined)}) %>%
|
| 678 |
+
list_rbind(names_to = "sample_id") %>%
|
| 679 |
+
mutate(sample_id = as.integer(sample_id)) %>%
|
| 680 |
+
left_join(
|
| 681 |
+
genomecov$tagged$meta %>%
|
| 682 |
+
ungroup() %>%
|
| 683 |
+
select(sample_id, regulator_locus_tag, regulator_symbol) %>%
|
| 684 |
+
distinct(),
|
| 685 |
+
by = "sample_id") %>%
|
| 686 |
+
dplyr::relocate(sample_id, regulator_locus_tag, regulator_symbol,
|
| 687 |
+
target_locus_tag, target_symbol)
|
| 688 |
+
|
| 689 |
+
# Write combined results
|
| 690 |
+
# annotated_feature_quants_combined %>%
|
| 691 |
+
# write_parquet(
|
| 692 |
+
# "~/code/hf/rossi_2021/rossi_2021_af_combined_mindel.parquet",
|
| 693 |
+
# compression = "zstd",
|
| 694 |
+
# write_statistics = TRUE,
|
| 695 |
+
# chunk_size = 5358,
|
| 696 |
+
# use_dictionary = c(
|
| 697 |
+
# sample_id = TRUE,
|
| 698 |
+
# regulator_locus_tag = TRUE,
|
| 699 |
+
# regulator_symbol = TRUE,
|
| 700 |
+
# seqnames = TRUE,
|
| 701 |
+
# target_locus_tag = TRUE,
|
| 702 |
+
# target_symbol = TRUE
|
| 703 |
+
# )
|
| 704 |
+
# )
|
| 705 |
+
|
| 706 |
+
}
|