hughes_2006 / README.md
cmatkhan's picture
Upload README.md with huggingface_hub
80b0f9e verified
---
license: mit
language:
- en
tags:
- biology
- genomics
- yeast
- transcription-factors
- gene-expression
- perturbation-screen
- overexpression
- knockout
- microarray
- functional-genomics
pretty_name: "Hughes 2006 Yeast Transcription Factor Perturbation Dataset"
size_categories:
- 100K<n<1M
configs:
- config_name: metadata
description: Transcription factor metadata including essentiality and QC status
dataset_type: metadata
default: true
applies_to: ["overexpression", "knockout"]
data_files:
- split: train
path: metadata.parquet
dataset_info:
features:
- name: sample_id
dtype: integer
description: >-
unique identifier for a specific sample. The sample ID identifies
a unique regulator_locus_tag and can be used to join to the
other datasets in this repo, including the metadata
- name: regulator_locus_tag
dtype: string
role: identifier
description: >-
Systematic gene name (ORF identifier) of the
transcription factor
- name: regulator_symbol
dtype: string
description: Standard gene symbol of the transcription factor
- name: found_domain
dtype: string
description: >-
Identified DNA-binding domain(s) or protein family classification
- name: sgd_description
dtype: string
description: >-
Functional description from Saccharomyces Genome Database (SGD)
- name: essential
dtype: bool
description: >-
Boolean indicating whether the gene is essential for viability
- name: oe_passed_qc
dtype: bool
description: >-
Boolean indicating whether overexpression experiments passed
quality control
- name: del_passed_qc
dtype: bool
description: >-
Boolean indicating whether deletion experiments passed
quality control
- config_name: overexpression
description: Overexpression perturbation normalized log2 fold changes
dataset_type: annotated_features
data_files:
- split: train
path: overexpression.parquet
experimental_conditions:
temperature_celsius: unspecified
cultivation_method: unspecified
media:
# Hughes et al 2006: "selective medium supplemented with 2% raffinose"
name: selective_medium
carbon_source:
- compound: D-raffinose
# Hughes et al 2006: 2% raffinose
concentration_percent: 2
nitrogen_source: unspecified
induction:
# Hughes et al 2006: "induction with 2% galactose for 3 h"
inducer:
compound: D-galactose
concentration_percent: 2
duration_hours: 3
dataset_info:
features:
- name: sample_id
dtype: integer
description: >-
unique identifier for a specific sample. The sample ID identifies
a unique regulator_locus_tag and can be used to join to the
other datasets in this repo, including the metadata
- name: regulator_locus_tag
dtype: string
description: >-
Systematic gene name (ORF identifier) of the
perturbed transcription factor
role: regulator_identifier
- name: regulator_symbol
dtype: string
description: Standard gene symbol of the perturbed transcription factor
- name: target_locus_tag
dtype: string
description: >-
Systematic gene name (ORF identifier) of the
target gene measured
role: target_identifier
- name: target_symbol
dtype: string
description: Standard gene symbol of the target gene measured
role: target_identifier
- name: dye_plus
dtype: float64
role: quantitative_measure
description: >-
Normalized log2 fold change for positive (+) dye orientation.
Positive values indicate upregulation in response to overexpression.
- name: dye_minus
dtype: float64
role: quantitative_measure
description: >-
Normalized log2 fold change for negative (-) dye orientation.
Positive values indicate upregulation in response to overexpression.
- name: mean_norm_log2fc
dtype: float64
role: quantitative_measure
description: >-
Average log2 fold change across dye orientations,
providing a dye-independent estimate of gene expression
change upon transcription factor overexpression.
- config_name: knockout
description: Deletion/knockout perturbation normalized log2 fold changes
dataset_type: annotated_features
data_files:
- split: train
path: knockout.parquet
experimental_conditions:
temperature_celsius: unspecified
cultivation_method: unspecified
media:
# Hughes et al 2006: "synthetic medium supplemented with 2% dextrose"
name: synthetic_medium
carbon_source:
- compound: D-glucose
# Hughes et al 2006: 2% dextrose
concentration_percent: 2
nitrogen_source: unspecified
dataset_info:
features:
- name: sample_id
dtype: integer
description: >-
unique identifier for a specific sample. The sample ID identifies
a unique regulator_locus_tag and can be used to join to the
other datasets in this repo, including the metadata
- name: regulator_locus_tag
dtype: string
description: >-
Systematic gene name (ORF identifier) of the perturbed
transcription factor
role: regulator_identifier
- name: regulator_symbol
dtype: string
description: Standard gene symbol of the perturbed transcription factor
role: regulator_identifier
- name: target_locus_tag
dtype: string
description: >-
Systematic gene name (ORF identifier) of the
target gene measured
role: target_identifier
- name: target_symbol
dtype: string
description: Standard gene symbol of the target gene measured
role: target_identifier
- name: dye_plus
dtype: float64
description: >-
Normalized log2 fold change for positive (+) dye orientation.
Positive values indicate upregulation in response to deletion.
role: quantitative_measure
- name: dye_minus
dtype: float64
description: >-
Normalized log2 fold change for negative (-) dye orientation.
Positive values indicate upregulation in response to deletion.
role: quantitative_measure
- name: mean_norm_log2fc
dtype: float64
description: >-
Average log2 fold change across dye orientations, providing a
dye-independent estimate of gene expression change upon
transcription factor deletion.
role: quantitative_measure
---
# Hughes 2006
This data is parsed from data presented in
[G. Chua, Q.D. Morris, R. Sopko, M.D. Robinson, O. Ryan, E.T. Chan, B.J. Frey, B.J.
Andrews, C. Boone, & T.R. Hughes, Identifying transcription factor functions and targets
by phenotypic activation, Proc. Natl. Acad. Sci. U.S.A. 103 (32) 12045-12050,
https://doi.org/10.1073/pnas.0605140103
(2006).](https://doi.org/10.1073/pnas.0605140103)
The data is made [available by the
author](https://hugheslab.ccbr.utoronto.ca/supplementary-data/yeastTF/) and on NCBI with
accession [GSE5499](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE5499). I used
the data provided by the author.
Details on my parsing can be found in `scripts/`. The gene features are from
BrentLab/yeast_genome_resources.
This repo provides 3 datasets:
- **knockout**: Deletion/knockout perturbation normalized log2 fold changes.
- **metadata**: Transcription factor metadata including essentiality and QC status.
- **overexpression**: Overexpression perturbation normalized log2 fold changes.
## Usage
The python package `tfbpapi` provides an interface to this data which eases
examining the datasets, field definitions and other operations. You may also
download the parquet datasets directly from hugging face by clicking on
"Files and Versions", or by using the huggingface_cli and duckdb directly.
In both cases, this provides a method of retrieving dataset and field definitions.
### `tfbpapi`
After [installing
tfbpapi](https://github.com/BrentLab/tfbpapi/?tab=readme-ov-file#installation), you can
adapt this [tutorial](https://brentlab.github.io/tfbpapi/tutorials/hfqueryapi_tutorial/)
in order to explore the contents of this repository.
### huggingface_cli/duckdb
You can retrieves and displays the file paths for each configuration of
the "BrentLab/hughes_2006" dataset from Hugging Face Hub.
```python
from huggingface_hub import ModelCard
from pprint import pprint
card = ModelCard.load("BrentLab/hughes_2006", repo_type="dataset")
# cast to dict
card_dict = card.data.to_dict()
# Get partition information
dataset_paths_dict = {d.get("config_name"): d.get("data_files")[0].get("path") for d in card_dict.get("configs")}
pprint(dataset_paths_dict)
```
If you wish to pull the entire repo, due to its size you may need to use an
[authentication token](https://huggingface.co/docs/hub/en/security-tokens).
If you do not have one, try omitting the token related code below and see if
it works. Else, create a token and provide it like so:
```python
from huggingface_hub import snapshot_download
import duckdb
import os
repo_id = "BrentLab/hughes_2006"
hf_token = os.getenv("HF_TOKEN")
# Download entire repo to local directory
repo_path = snapshot_download(
repo_id=repo_id,
repo_type="dataset",
token=hf_token
)
print(f"\n✓ Repository downloaded to: {repo_path}")
# Construct path to the knockout parquet file
parquet_path = os.path.join(repo_path, "knockout.parquet")
print(f"✓ Parquet file at: {parquet_path}")
```
Use your favorite method of interacting with `parquet` files (eg duckDB, but you could
use dplyr in R or pandas, too).
```python
# Connect to DuckDB and query the parquet file
conn = duckdb.connect()
query = """
SELECT *
FROM read_parquet(?)
WHERE regulator_locus_tag = 'CST6'
"""
result = conn.execute(query, [parquet_path]).fetchall()
print(f"Found {len(result)} rows for CST6")
```