chr
string | pos
int32 | pileup
int32 |
|---|---|---|
chrI
| 787
| 1
|
chrI
| 791
| 1
|
chrI
| 796
| 1
|
chrI
| 800
| 2
|
chrI
| 803
| 1
|
chrI
| 814
| 1
|
chrI
| 828
| 1
|
chrI
| 830
| 2
|
chrI
| 845
| 2
|
chrI
| 850
| 1
|
chrI
| 852
| 1
|
chrI
| 865
| 1
|
chrI
| 867
| 1
|
chrI
| 873
| 1
|
chrI
| 876
| 1
|
chrI
| 877
| 1
|
chrI
| 884
| 1
|
chrI
| 890
| 1
|
chrI
| 896
| 1
|
chrI
| 901
| 1
|
chrI
| 904
| 3
|
chrI
| 905
| 1
|
chrI
| 925
| 1
|
chrI
| 932
| 1
|
chrI
| 936
| 1
|
chrI
| 941
| 1
|
chrI
| 943
| 1
|
chrI
| 950
| 2
|
chrI
| 952
| 1
|
chrI
| 953
| 3
|
chrI
| 969
| 1
|
chrI
| 970
| 1
|
chrI
| 973
| 2
|
chrI
| 975
| 1
|
chrI
| 988
| 1
|
chrI
| 990
| 1
|
chrI
| 991
| 2
|
chrI
| 993
| 1
|
chrI
| 995
| 1
|
chrI
| 1,002
| 3
|
chrI
| 1,021
| 1
|
chrI
| 1,023
| 1
|
chrI
| 1,031
| 1
|
chrI
| 1,033
| 1
|
chrI
| 1,037
| 1
|
chrI
| 1,038
| 1
|
chrI
| 1,041
| 1
|
chrI
| 1,042
| 1
|
chrI
| 1,046
| 1
|
chrI
| 1,050
| 1
|
chrI
| 1,053
| 1
|
chrI
| 1,061
| 1
|
chrI
| 1,063
| 1
|
chrI
| 1,064
| 1
|
chrI
| 1,068
| 2
|
chrI
| 1,074
| 1
|
chrI
| 1,079
| 1
|
chrI
| 1,085
| 1
|
chrI
| 1,091
| 1
|
chrI
| 1,102
| 1
|
chrI
| 1,103
| 1
|
chrI
| 1,104
| 1
|
chrI
| 1,106
| 1
|
chrI
| 1,114
| 1
|
chrI
| 1,124
| 1
|
chrI
| 1,130
| 1
|
chrI
| 1,131
| 1
|
chrI
| 1,132
| 2
|
chrI
| 1,133
| 2
|
chrI
| 1,135
| 1
|
chrI
| 1,137
| 1
|
chrI
| 1,152
| 1
|
chrI
| 1,157
| 1
|
chrI
| 1,166
| 1
|
chrI
| 1,177
| 1
|
chrI
| 1,180
| 1
|
chrI
| 1,190
| 1
|
chrI
| 1,201
| 1
|
chrI
| 1,206
| 1
|
chrI
| 1,212
| 1
|
chrI
| 1,215
| 2
|
chrI
| 1,228
| 1
|
chrI
| 1,231
| 1
|
chrI
| 1,234
| 1
|
chrI
| 1,247
| 1
|
chrI
| 1,249
| 1
|
chrI
| 1,257
| 1
|
chrI
| 1,264
| 1
|
chrI
| 1,270
| 1
|
chrI
| 1,272
| 1
|
chrI
| 1,273
| 1
|
chrI
| 1,279
| 1
|
chrI
| 1,282
| 1
|
chrI
| 1,283
| 1
|
chrI
| 1,285
| 1
|
chrI
| 1,288
| 1
|
chrI
| 1,296
| 1
|
chrI
| 1,297
| 1
|
chrI
| 1,301
| 1
|
chrI
| 1,302
| 1
|
Rossi 2021
This data is gathered from yeastepigenome.org. This work was published in
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/rossi_2021" dataset from Hugging Face Hub.
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.
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:
# 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. 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:
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}")
- Downloads last month
- 252