--- license: mit tags: - transcription-factor - binding - chipexo - genomics - biology language: - en pretty_name: Rossi ChIP-exo 2021 experimental_conditions: temperature_celsius: 25 cultivation_method: unspecified growth_phase_at_harvest: phase: mid_log od600: 0.8 media: name: yeast_peptone_dextrose carbon_source: - compound: D-glucose concentration_percent: unspecified nitrogen_source: - compound: yeast_extract concentration_percent: unspecified - compound: peptone concentration_percent: unspecified # Heat shock applied only to SAGA strains # note that im not sure which strains this # applies to -- it is a TODO to better # document this heat_shock: induced: true temperature_celsius: 37 duration_minutes: 6 pre_induction_temperature_celsius: 25 method: equal_volume_medium_transfer configs: - config_name: metadata description: Metadata describing the tagged regulator in each experiment dataset_type: metadata data_files: - split: train path: rossi_2021_metadata.parquet dataset_info: features: - name: regulator_locus_tag dtype: string description: Systematic gene name (ORF identifier) of the transcription factor - name: regulator_symbol dtype: string description: Standard gene symbol of the transcription factor - name: run_accession dtype: string description: GEO run accession identifier for the sample - name: yeastepigenome_id dtype: string description: Sample identifier used by yeastepigenome.org - config_name: genome_map description: "ChIP-exo 5' tag coverage data partitioned by sample accession" dataset_type: genome_map data_files: - split: train path: genome_map/*/*.parquet dataset_info: features: - name: chr dtype: string description: Chromosome name (e.g., chrI, chrII, etc.) - name: pos dtype: int32 description: "Genomic position of the 5' tag" - name: pileup dtype: int32 description: "Depth of coverage (number of 5' tags) at this genomic position" - config_name: rossi_2021_metadata description: Replicate-level metadata for ChIP-exo experiments including experimental conditions and sample information dataset_type: metadata applies_to: ["rossi_2021_af_replicates"] data_files: - split: train path: rossi_2021_metadata.parquet dataset_info: features: - name: regulator_locus_tag dtype: string description: Systematic gene identifier for the transcription factor role: regulator_identifier - name: regulator_symbol dtype: string description: Standard gene symbol for the transcription factor role: regulator_identifier - name: run_accession dtype: string description: SRA run accession identifier for this biological replicate - name: yeastepigenome_id dtype: string description: Identifier from the Yeast Epigenome Project - name: treatment dtype: string description: Experimental treatment condition role: experimental_condition - name: growth_media dtype: string description: Growth media composition role: experimental_condition - name: antibody dtype: string description: Antibody used for ChIP-exo immunoprecipitation - name: sample_id dtype: string description: Unique identifier for the biological replicate - config_name: rossi_2021_metadata_sample description: Sample-level metadata for combined ChIP-exo experiments including experimental conditions dataset_type: metadata applies_to: ["rossi_2021_af_combined"] data_files: - split: train path: rossi_2021_metadata_sample.parquet dataset_info: features: - name: regulator_locus_tag dtype: string description: Systematic gene identifier for the transcription factor role: regulator_identifier - name: regulator_symbol dtype: string description: Standard gene symbol for the transcription factor role: regulator_identifier - name: treatment dtype: string description: Experimental treatment condition role: experimental_condition - name: growth_media dtype: string description: Growth media composition role: experimental_condition - name: antibody dtype: string description: Antibody used for ChIP-exo immunoprecipitation - name: sample_id dtype: string description: Unique identifier combining regulator and replicates - config_name: rossi_2021_af_replicates description: ChIP-exo annotated features at biological replicate level with binding peaks and statistical significance metrics dataset_type: annotated_features data_files: - split: train path: rossi_2021_af_replicates.parquet dataset_info: features: - name: sample_id dtype: string description: Unique identifier for the biological replicate role: sample_id - name: run_accession dtype: string description: SRA run accession identifier for this biological replicate - name: regulator_locus_tag dtype: string description: Systematic gene identifier for the transcription factor role: regulator_identifier - name: regulator_symbol dtype: string description: Standard gene symbol for the transcription factor role: regulator_identifier - name: target_locus_tag dtype: string description: Systematic gene identifier for the target gene role: target_identifier - name: target_symbol dtype: string description: Standard gene symbol for the target gene role: target_identifier - name: seqnames dtype: string description: Chromosome identifier (e.g., chrI, chrII, chrXVI) - name: start dtype: int64 description: Promoter region start position (1-based coordinate) - name: end dtype: int64 description: Promoter region end position (1-based, inclusive) - name: background_counts dtype: int64 description: Read counts in the background/control sample for this peak region role: quantitative_measure - name: experiment_counts dtype: int64 description: Read counts in the ChIP-exo experiment sample for this peak region role: quantitative_measure - name: total_background_counts dtype: int64 description: Total read counts across the entire genome in the background sample role: quantitative_measure - name: total_experiment_counts dtype: int64 description: Total read counts across the entire genome in the experiment sample role: quantitative_measure - name: enrichment dtype: float64 description: Enrichment score for the binding peak role: quantitative_measure - name: poisson_pval dtype: float64 description: P-value from Poisson distribution test for peak significance role: quantitative_measure - name: log_poisson_pval dtype: float64 description: Log-transformed Poisson p-value role: quantitative_measure - name: hypergeometric_pval dtype: float64 description: P-value from hypergeometric distribution test for peak significance role: quantitative_measure - name: log_hypergeometric_pval dtype: float64 description: Log-transformed hypergeometric p-value role: quantitative_measure - name: poisson_qval dtype: float64 description: FDR-adjusted q-value from Poisson test (multiple testing correction) role: quantitative_measure - name: hypergeometric_qval dtype: float64 description: FDR-adjusted q-value from hypergeometric test (multiple testing correction) role: quantitative_measure - config_name: rossi_2021_af_combined description: Combined ChIP-exo annotated features with binding peaks and statistical significance metrics aggregated across biological replicates dataset_type: annotated_features data_files: - split: train path: rossi_2021_af_combined.parquet dataset_info: features: - name: sample_id dtype: string description: Unique identifier combining regulator and replicates role: sample_id - name: regulator_locus_tag dtype: string description: Systematic gene identifier for the transcription factor role: regulator_identifier - name: regulator_symbol dtype: string description: Standard gene symbol for the transcription factor role: regulator_identifier - name: target_locus_tag dtype: string description: Systematic gene identifier for the target gene role: target_identifier - name: target_symbol dtype: string description: Standard gene symbol for the target gene role: target_identifier - name: seqnames dtype: string description: Chromosome identifier (e.g., chrI, chrII, chrXVI) - name: start dtype: int64 description: Promoter region start position (1-based coordinate) - name: end dtype: int64 description: Promoter region end position (1-based, inclusive) - name: background_counts dtype: int64 description: Combined read counts in the background/control sample for this peak region role: quantitative_measure - name: experiment_counts dtype: int64 description: Combined read counts in the ChIP-exo experiment sample for this peak region role: quantitative_measure - name: total_background_counts dtype: int64 description: Total read counts across the entire genome in the combined background sample role: quantitative_measure - name: total_experiment_counts dtype: int64 description: Total read counts across the entire genome in the combined experiment sample role: quantitative_measure - name: enrichment dtype: float64 description: Enrichment score for the binding peak calculated from combined replicates role: quantitative_measure - name: poisson_pval dtype: float64 description: P-value from Poisson distribution test for peak significance role: quantitative_measure - name: log_poisson_pval dtype: float64 description: Log-transformed Poisson p-value role: quantitative_measure - name: hypergeometric_pval dtype: float64 description: P-value from hypergeometric distribution test for peak significance role: quantitative_measure - name: log_hypergeometric_pval dtype: float64 description: Log-transformed hypergeometric p-value role: quantitative_measure - name: poisson_qval dtype: float64 description: FDR-adjusted q-value from Poisson test (multiple testing correction) role: quantitative_measure - name: hypergeometric_qval dtype: float64 description: FDR-adjusted q-value from hypergeometric test (multiple testing correction) role: quantitative_measure --- # Rossi 2021 This data is gathered from [yeastepigenome.org](https://yeastepigenome.org/). This work was published in [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) ## 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/rossi_2021" dataset from Hugging Face Hub. ```python from huggingface_hub import ModelCard from pprint import pprint card = ModelCard.load("BrentLab/rossi_2021", 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) ``` The entire repository is large. It may be preferable to only retrieve specific files or partitions. You can use the metadata files to choose which files to pull. ```python from huggingface_hub import snapshot_download import duckdb import os # Download only the metadata first repo_path = snapshot_download( repo_id="BrentLab/rossi_2021", repo_type="dataset", allow_patterns="rossi_2021_metadata.parquet" ) dataset_path = os.path.join(repo_path, "rossi_2021_metadata.parquet") conn = duckdb.connect() meta_res = conn.execute("SELECT * FROM read_parquet(?) LIMIT 10", [dataset_path]).df() print(meta_res) ``` We might choose to take a look at the file with accession SRR11466106: ```python # Download only a specific sample's genome coverage data repo_path = snapshot_download( repo_id="BrentLab/rossi_2021", repo_type="dataset", allow_patterns="genome_map/accession=SRR11466106/*.parquet" ) # Query the specific partition dataset_path = os.path.join(repo_path, "genome_map") result = conn.execute("SELECT * FROM read_parquet(?) LIMIT 10", [f"{dataset_path}/**/*.parquet"]).df() print(result) ``` 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 repo_id = "BrentLab/rossi_2021" 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 rossi_annotated_features parquet file parquet_path = os.path.join(repo_path, "yeastepigenome_annotatedfeatures.parquet") print(f"āœ“ Parquet file at: {parquet_path}") ```