Update README.md
Browse files
README.md
CHANGED
|
@@ -53,59 +53,137 @@
|
|
| 53 |
---
|
| 54 |
# Harbison 2004
|
| 55 |
|
| 56 |
-
This Dataset is a parsed version of the data provided by Richard A. Young's lab. To cite
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
---
|
| 54 |
# Harbison 2004
|
| 55 |
|
| 56 |
+
This Dataset is a parsed version of the data provided by Richard A. Young's lab. To cite
|
| 57 |
+
this data, please use:
|
| 58 |
+
|
| 59 |
+
[Harbison CT, Gordon DB, Lee TI, Rinaldi NJ, Macisaac KD, Danford TW, Hannett NM, Tagne
|
| 60 |
+
JB, Reynolds DB, Yoo J, et al. 2004. Transcriptional regulatory code of a eukaryotic
|
| 61 |
+
genome. Nature 431:
|
| 62 |
+
99–104.doi:10.1038/nature02800](https://www.nature.com/articles/nature02800)
|
| 63 |
+
|
| 64 |
+
This repo provides 1 dataset:
|
| 65 |
+
|
| 66 |
+
- **harbison_2004**: ChIP-chip transcription factor binding data with environmental
|
| 67 |
+
conditions.
|
| 68 |
+
|
| 69 |
+
### `tfbpapi`
|
| 70 |
+
|
| 71 |
+
After [installing
|
| 72 |
+
tfbpapi](https://github.com/BrentLab/tfbpapi/?tab=readme-ov-file#installation), you can
|
| 73 |
+
adapt this [tutorial](https://brentlab.github.io/tfbpapi/tutorials/hfqueryapi_tutorial/)
|
| 74 |
+
in order to explore the contents of this repository.
|
| 75 |
+
|
| 76 |
+
### huggingface_cli/duckdb
|
| 77 |
+
|
| 78 |
+
You can retrieves and displays the file paths for each configuration of
|
| 79 |
+
the "BrentLab/harbison_2004" dataset from Hugging Face Hub.
|
| 80 |
+
|
| 81 |
+
```python
|
| 82 |
+
from huggingface_hub import ModelCard
|
| 83 |
+
from pprint import pprint
|
| 84 |
+
|
| 85 |
+
card = ModelCard.load("BrentLab/harbison_2004", repo_type="dataset")
|
| 86 |
+
|
| 87 |
+
# cast to dict
|
| 88 |
+
card_dict = card.data.to_dict()
|
| 89 |
+
|
| 90 |
+
# Get partition information
|
| 91 |
+
dataset_paths_dict = {d.get("config_name"): d.get("data_files")[0].get("path") for d in card_dict.get("configs")}
|
| 92 |
+
|
| 93 |
+
pprint(dataset_paths_dict)
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
If you wish to pull the entire repo, due to its size you may need to use an
|
| 97 |
+
[authentication token](https://huggingface.co/docs/hub/en/security-tokens).
|
| 98 |
+
If you do not have one, try omitting the token related code below and see if
|
| 99 |
+
it works. Else, create a token and provide it like so:
|
| 100 |
+
|
| 101 |
+
```python
|
| 102 |
+
from huggingface_hub import snapshot_download
|
| 103 |
+
import os
|
| 104 |
+
|
| 105 |
+
repo_id = "BrentLab/harbison_2004"
|
| 106 |
+
|
| 107 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 108 |
+
|
| 109 |
+
# Download entire repo to local directory
|
| 110 |
+
repo_path = snapshot_download(
|
| 111 |
+
repo_id=repo_id,
|
| 112 |
+
repo_type="dataset",
|
| 113 |
+
token=hf_token
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
print(f"\n✓ Repository downloaded to: {repo_path}")
|
| 117 |
+
|
| 118 |
+
# Construct path to the rossi_annotated_features parquet file
|
| 119 |
+
parquet_path = os.path.join(repo_path, "harbison_2004.parquet")
|
| 120 |
+
print(f"✓ Parquet file at: {parquet_path}")
|
| 121 |
+
➜ ~ cat /home/chase/Downloads/Harbison.2004.md
|
| 122 |
+
# Harbison 2004
|
| 123 |
+
|
| 124 |
+
This Dataset is a parsed version of the data provided by Richard A. Young's lab. To cite
|
| 125 |
+
this data, please use:
|
| 126 |
+
|
| 127 |
+
[Harbison CT, Gordon DB, Lee TI, Rinaldi NJ, Macisaac KD, Danford TW, Hannett NM, Tagne
|
| 128 |
+
JB, Reynolds DB, Yoo J, et al. 2004. Transcriptional regulatory code of a eukaryotic
|
| 129 |
+
genome. Nature 431:
|
| 130 |
+
99–104.doi:10.1038/nature02800](https://www.nature.com/articles/nature02800)
|
| 131 |
+
|
| 132 |
+
This repo provides 1 dataset:
|
| 133 |
+
|
| 134 |
+
- **harbison_2004**: ChIP-chip transcription factor binding data with environmental
|
| 135 |
+
conditions.
|
| 136 |
+
|
| 137 |
+
### `tfbpapi`
|
| 138 |
+
|
| 139 |
+
After [installing
|
| 140 |
+
tfbpapi](https://github.com/BrentLab/tfbpapi/?tab=readme-ov-file#installation), you can
|
| 141 |
+
adapt this [tutorial](https://brentlab.github.io/tfbpapi/tutorials/hfqueryapi_tutorial/)
|
| 142 |
+
in order to explore the contents of this repository.
|
| 143 |
+
|
| 144 |
+
### huggingface_cli/duckdb
|
| 145 |
+
|
| 146 |
+
You can retrieves and displays the file paths for each configuration of
|
| 147 |
+
the "BrentLab/harbison_2004" dataset from Hugging Face Hub.
|
| 148 |
+
|
| 149 |
+
```python
|
| 150 |
+
from huggingface_hub import ModelCard
|
| 151 |
+
from pprint import pprint
|
| 152 |
+
|
| 153 |
+
card = ModelCard.load("BrentLab/harbison_2004", repo_type="dataset")
|
| 154 |
+
|
| 155 |
+
# cast to dict
|
| 156 |
+
card_dict = card.data.to_dict()
|
| 157 |
+
|
| 158 |
+
# Get partition information
|
| 159 |
+
dataset_paths_dict = {d.get("config_name"): d.get("data_files")[0].get("path") for d in card_dict.get("configs")}
|
| 160 |
+
|
| 161 |
+
pprint(dataset_paths_dict)
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
If you wish to pull the entire repo, due to its size you may need to use an
|
| 165 |
+
[authentication token](https://huggingface.co/docs/hub/en/security-tokens).
|
| 166 |
+
If you do not have one, try omitting the token related code below and see if
|
| 167 |
+
it works. Else, create a token and provide it like so:
|
| 168 |
+
|
| 169 |
+
```python
|
| 170 |
+
from huggingface_hub import snapshot_download
|
| 171 |
+
import os
|
| 172 |
+
|
| 173 |
+
repo_id = "BrentLab/harbison_2004"
|
| 174 |
+
|
| 175 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 176 |
+
|
| 177 |
+
# Download entire repo to local directory
|
| 178 |
+
repo_path = snapshot_download(
|
| 179 |
+
repo_id=repo_id,
|
| 180 |
+
repo_type="dataset",
|
| 181 |
+
token=hf_token
|
| 182 |
+
)
|
| 183 |
+
|
| 184 |
+
print(f"\n✓ Repository downloaded to: {repo_path}")
|
| 185 |
+
|
| 186 |
+
# Construct path to the rossi_annotated_features parquet file
|
| 187 |
+
parquet_path = os.path.join(repo_path, "harbison_2004.parquet")
|
| 188 |
+
print(f"✓ Parquet file at: {parquet_path}")
|
| 189 |
+
```
|