Batch Search and Download
encode_batch_downloadSearch ENCODE files by filters (format, assay, organism) and batch download matches to a local folder, with dry-run preview and MD5 verification.
Instructions
Search for files and download them all in batch.
First searches for files matching the criteria, then downloads them. By default runs in dry_run mode to preview what would be downloaded. Set dry_run=False to actually download.
WHEN TO USE: Use for searching and downloading files in one step. Always use dry_run=True first to preview. For specific file accessions, use encode_download_files. RELATED TOOLS: encode_download_files, encode_search_files
Examples:
Download all BED files from human pancreas ChIP-seq: file_format="bed", assay_title="Histone ChIP-seq", organ="pancreas", download_dir="/data/encode", dry_run=False
Preview FASTQ downloads for mouse brain RNA-seq: file_format="fastq", assay_title="total RNA-seq", organ="brain", organism="Mus musculus", download_dir="/data/encode"
Download IDR peaks for H3K27me3 in GRCh38: output_type="IDR thresholded peaks", target="H3K27me3", assembly="GRCh38", download_dir="/data/encode", dry_run=False
Args: download_dir: Local directory to save files file_format: File format filter ("fastq", "bam", "bed", "bigWig", etc.) output_type: Output type filter ("reads", "peaks", "signal", etc.) output_category: Output category ("raw data", "alignment", "annotation", etc.) assembly: Genome assembly ("GRCh38", "mm10", etc.) assay_title: Assay type ("Histone ChIP-seq", "ATAC-seq", "total RNA-seq", etc.) organism: Organism (default: "Homo sapiens") organ: Organ/tissue ("pancreas", "brain", "liver", etc.) biosample_type: Biosample type ("tissue", "cell line", "primary cell", etc.) target: ChIP/CUT&RUN target ("H3K27me3", "CTCF", etc.) preferred_default: If True, only download default/recommended files organize_by: File organization ("flat", "experiment", "format", "experiment_format") verify_md5: Verify downloads with MD5 checksums (default True) limit: Max files to download (default 100, safety limit) dry_run: If True (default), only preview what would be downloaded. Set False to download. offset: Skip the first N matching files; pass the next_offset of the previous reply to continue a search that has more files than limit
Returns: JSON with download preview (dry_run=True) or download results (dry_run=False).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| organ | No | ||
| offset | No | ||
| target | No | ||
| dry_run | No | ||
| assembly | No | ||
| organism | No | Homo sapiens | |
| verify_md5 | No | ||
| assay_title | No | ||
| file_format | No | ||
| organize_by | No | experiment | |
| output_type | No | ||
| download_dir | Yes | ||
| biosample_type | No | ||
| output_category | No | ||
| preferred_default | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |