cmatkhan commited on
Commit
decea3a
·
verified ·
1 Parent(s): 2aff5da

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -19
README.md CHANGED
@@ -285,39 +285,36 @@ Output:
285
  'levels': [
286
  'YPD',
287
  'SM',
288
- 'RAPA',
289
- 'H2O2Hi',
290
- 'H2O2Lo',
291
- 'Acid',
292
- 'Alpha',
293
- 'BUT14',
294
- 'BUT90',
295
- 'Thi-',
296
- 'GAL',
297
- 'HEAT',
298
- 'Pi-',
299
- 'RAFF']},
300
- {'name': 'regulator_symbol',
301
  'dtype': 'string',
302
  'levels': [
303
  'YSC0017',
304
  'YKL112W',
305
  'YNR054C',
306
  'YER045C',
307
- ... (there are 204 regulators)
308
  ```
309
 
310
  You can use this information to pull only the partition you're interested in, eg
311
 
312
  ```python
313
- from huggingface_hub import hf_hub_download
 
 
314
 
315
- # Download a single partition file and store it in the local cache
316
- local_file = hf_hub_download(
317
- repo_id="BrentLab/harbison_2004",
318
  repo_type="dataset",
319
- filename="data/condition=YPD/regulator_locus_tag=YER045C/part-0.parquet"
 
 
320
  )
 
 
 
 
321
  ```
322
 
323
  <details>
 
285
  'levels': [
286
  'YPD',
287
  'SM',
288
+ ...]},
289
+ {'name': 'regulator_locus_tag',
 
 
 
 
 
 
 
 
 
 
 
290
  'dtype': 'string',
291
  'levels': [
292
  'YSC0017',
293
  'YKL112W',
294
  'YNR054C',
295
  'YER045C',
296
+ ...
297
  ```
298
 
299
  You can use this information to pull only the partition you're interested in, eg
300
 
301
  ```python
302
+ from pathlib import Path
303
+ from huggingface_hub import snapshot_download
304
+ import pyarrow.dataset as ds
305
 
306
+ # pull all data for regulator `YAL051W`
307
+ root = snapshot_download(
308
+ repo_id="BrentLab/hackett_2020",
309
  repo_type="dataset",
310
+ allow_patterns=[
311
+ "data/*/regulator_locus_tag=YSC0017/part-0.parquet"
312
+ ],
313
  )
314
+
315
+ base = Path(root) / "data" # the dataset root directory
316
+ dataset = ds.dataset(base, format="parquet", partitioning="hive")
317
+ print(dataset.schema)
318
  ```
319
 
320
  <details>