Downloads study annotations from the Gemma REST API.
Fetches in batches of QUERY_LIMIT studies, saves each batch to a
temporary directory, then combines them into a single JSON file with
the structure {batch_index: [study, ...]}.
| Attributes: |
|
|---|
fetch(output_path=GEMMA_RAW, query='sort=-id', max_studies=60000)
¶
Download Gemma annotations and save to a JSON file.
Fetches studies in batches of QUERY_LIMIT, writes each batch to a temporary directory, then combines all non-empty batches into a single JSON file at output_path. The temporary directory is always cleaned up, even on failure.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|