hackett_2020 / README.md
cmatkhan's picture
Upload README.md with huggingface_hub
4fef197 verified
metadata
license: mit
language:
  - en
tags:
  - genomics
  - yeast
  - transcription
  - perturbation
  - response
  - overexpression
pretty_name: Hackett, 2020 Overexpression
size_categories:
  - 1M<n<10M
experimental_conditions:
  temperature_celsius: 30
  cultivation_method: chemostat
  media:
    name: minimal
    carbon_source:
      - compound: D-glucose
        concentration_percent: 1
configs:
  - config_name: hackett_2020
    description: TF overexpression data from Hackett 2020
    default: true
    dataset_type: annotated_features
    metadata_fields:
      - sample_id
      - regulator_locus_tag
      - regulator_symbol
      - time
      - mechanism
      - restriction
      - date
      - strain
    data_files:
      - split: train
        path: hackett_2020.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, time, mechanism, restriction, date,
            strain) tuple.
        - name: db_id
          dtype: integer
          description: >-
            an old unique identifer, for use internally only. Deprecated and
            will be removed eventually. Do not use in analysis. db_id = 0, for
            GEV and Z3EV, means that those samples are not included in the
            original DB.
        - name: regulator_locus_tag
          dtype: string
          description: >-
            induced transcriptional regulator systematic ID. See
            hf/BrentLab/yeast_genome_resources
          role: regulator_identifier
        - name: regulator_symbol
          dtype: string
          description: >-
            induced transcriptional regulator common name. If no common name
            exists, then the `regulator_locus_tag` is used.
          role: regulator_identifier
        - name: target_locus_tag
          dtype: string
          description: >-
            The systematic ID of the feature to which the effect/pvalue is
            assigned. See hf/BrentLab/yeast_genome_resources
          role: target_identifier
        - name: target_symbol
          dtype: string
          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.
          role: target_identifier
        - name: time
          dtype: float
          description: time point (minutes)
          role: experimental_condition
        - name: mechanism
          dtype:
            class_label:
              names:
                - GEV
                - ZEV
          description: Synthetic TF induction system (GEV or ZEV)
          role: experimental_condition
          definitions:
            GEV:
              perturbation_method:
                type: inducible_overexpression
                system: GEV
                inducer: beta-estradiol
                description: Galactose-inducible estrogen receptor-VP16 fusion system
            ZEV:
              perturbation_method:
                type: inducible_overexpression
                system: ZEV
                inducer: beta-estradiol
                description: >-
                  Z3 (synthetic zinc finger)-estrogen receptor-VP16 fusion
                  system
        - name: restriction
          dtype:
            class_label:
              names:
                - M
                - 'N'
                - P
          description: >-
            nutrient limitation, one of P (phosphate limitation (20 mg/l).), N
            (Nitrogen‐limited cultures were maintained at 40 mg/l ammonium
            sulfate) or M (Not defined in the paper or on the Calico website)
          role: experimental_condition
          definitions:
            P:
              media:
                nitrogen_source:
                  - compound: ammonium_sulfate
                    concentration_percent: 0.5
                phosphate_source:
                  - compound: potassium_phosphate_monobasic
                    concentration_percent: 0.002
            'N':
              media:
                nitrogen_source:
                  - compound: ammonium_sulfate
                    concentration_percent: 0.004
            M:
              description: Not defined in the paper or on the Calico website
        - name: date
          dtype: string
          description: date performed
          role: experimental_condition
        - name: strain
          dtype: string
          description: strain name
          role: experimental_condition
        - name: green_median
          dtype: float
          description: median of green (reference) channel fluorescence
          role: quantitative_measure
        - name: red_median
          dtype: float
          description: median of red (experimental) channel fluorescence
          role: quantitative_measure
        - name: log2_ratio
          dtype: float
          description: log2(red / green) subtracting value at time zero
          role: quantitative_measure
        - name: log2_cleaned_ratio
          dtype: float
          description: Non-specific stress response and prominent outliers removed
          role: quantitative_measure
        - name: log2_noise_model
          dtype: float
          description: estimated noise standard deviation
          role: quantitative_measure
        - name: log2_cleaned_ratio_zth2d
          dtype: float
          description: >-
            cleaned timecourses hard-thresholded based on multiple observations
            (or last observation) passing the noise model
          role: quantitative_measure
        - name: log2_selected_timecourses
          dtype: float
          description: >-
            cleaned timecourses hard-thresholded based on single observations
            passing noise model and impulse evaluation of biological feasibility
          role: quantitative_measure
        - name: log2_shrunken_timecourses
          dtype: float
          description: >-
            selected timecourses with observation-level shrinkage based on local
            FDR (false discovery rate). Most users of the data will want to use
            this column.
          role: quantitative_measure

Hackett 2020

This Dataset is a parsed version of the data provided by Calicolabs under the heading "Raw & processed gene expression data". See scripts/ for more details on the parsing from the data provided by Calico to this Dataset.

Hackett SR, Baltz EA, Coram M, Wranik BJ, Kim G, Baker A, Fan M, Hendrickson DG, Berndl M, McIsaac RS. Learning causal networks using inducible transcription factors and transcriptome-wide time series. Mol Syst Biol. 2020 Mar;16(3):e9174. doi: 10.15252/msb.20199174. PMID: 32181581; PMCID: PMC7076914.

This repo provides 1 dataset:

  • hackett_2020: TF overexpression data from Hackett 2020.

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, you can adapt this 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/hackett_2020" dataset from Hugging Face Hub.

from huggingface_hub import ModelCard
from pprint import pprint

card = ModelCard.load("BrentLab/hackett_2020", 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. 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:

from huggingface_hub import snapshot_download
import duckdb
import os

repo_id = "BrentLab/hackett_2020"

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 hackett_2020 parquet file
parquet_path = os.path.join(repo_path, "hackett_2020.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).

# Connect to DuckDB and query the parquet file
conn = duckdb.connect()

query = """
SELECT DISTINCT time, mechanism, restriction, date
FROM read_parquet(?)
WHERE regulator_symbol = 'ACA1'
"""
result = conn.execute(query, [parquet_path]).df()
print(f"Found {result}")