generate_download_script
Create an executable bash script to download all data files from a study accession, with built-in MD5 verification.
Instructions
Generate executable bash script to download all study data files.
Usage Tips
After identifying interesting studies, generate a download script for the user to execute. Returns script content and optionally saves to file. Script includes MD5 verification commands. Typical workflow: search_rna_studies() → get_study_details() → generate_download_script().
Returns
dict Dictionary containing: - study_accession: Queried study - script_content: Complete bash script ready to execute - file_count: Number of files the script will download - total_size_gb: Total download size in GB - script_path: Save location (if output_path provided) - message: Success message (if saved to file) - error: Error message if any
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| study_accession | Yes | Study accession from search results. Accepts SRP/ERP/DRP or PRJNA/PRJEB/PRJDB formats | |
| output_path | No | File path to save script (e.g., './download.sh'). If None, returns script content without saving. Script will be made executable (chmod 755) | |
| script_type | No | Download tool to use (wget or curl). wget is recommended for resumable downloads with -nc flag | wget |
| file_format | No | File format to download (fastq, submitted, or sra). FASTQ is most common | fastq |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||