Proto is not affiliated with ENCODE DCC and Stanford University. This toolkit is open source and builds on the implementations produced by these organizations. Product names, logos, and trademarks are the property of their respective owners.
Background
The ENCODE Consortium maps functional elements in the human and mouse genomes: transcription factor binding, histone modifications, chromatin accessibility, transcription and 3D genome contacts. The ENCODE Data Coordination Center at Stanford runs the portal, which is described in New developments on the Encyclopedia of DNA Elements (ENCODE) data portal by Luo et al., published in Nucleic Acids Research. Data is organized as experiments (ENCSR... accessions), each with a biosample, an assay and, for ChIP-seq, a target. Each experiment holds files (ENCFF... accessions): raw reads, and the outputs of the uniform processing pipelines such as alignments, signal tracks and peak calls on a given genome assembly. For each output type and assembly, the portal flags one file as the preferred default, for example the replicated IDR thresholded peaks of a TF ChIP-seq experiment.
The tool queries the portal’s REST API, whose search endpoint accepts the same facet filters as the portal’s search pages and returns JSON.
Learning Resources
- ENCODE REST API (ENCODE DCC) - the search endpoint, facet filters and JSON responses.
- Getting started with ENCODE (ENCODE DCC) - experiments, files, biosamples and how to browse them.
- ENCODE file formats (ENCODE DCC) - bed narrowPeak, bigWig, BAM and other processed formats.
- ENCODE pipelines (ENCODE DCC) - the uniform processing pipelines that produce the processed files.
Tools
ENCODE Search (encode-search)
Runs one portal search per query. A query is a mapping of ENCODE facet filters, such as assay_title, target.label, biosample_ontology.term_name, output_type, assembly and file_format, with optional free text. It returns files (default) or experiments with accession, parent experiment, assay, target, biosample, organism, output type, assembly, file format and type, size, MD5 checksum, replicates, preferred-default flag, lab, portal page URL and, for files, the direct download URL. Each result also reports the total match count and the request URL.API Reference
Config: EncodeSearchConfig
Config: EncodeSearchConfig
File, Experimentstatus=released, excluding archived, revoked and in-progress items. Ignored when the query sets its own status filter.preferred_default=true, the portal’s default file per output type (e.g. the default IDR thresholded peaks). Files only.True is coerced to 1 and False to 0.None waits indefinitely.Applications
Searches locate specific processed ENCODE files, such as the default IDR thresholded peaks for a transcription factor in a cell line or the fold-change signal for a histone mark. The download URLs and MD5 checksums can be cited or used to fetch the files for analysis. Experiment searches list the assays available for a target or biosample before choosing files.Usage Tips
- Filter values must match portal terms exactly. Facets match exact, case-sensitive strings, e.g.
"TF ChIP-seq","IDR thresholded peaks","HepG2". Copy terms from the facet lists on the portal search page. - A list matches any of its values.
{"target.label": ["CTCF", "RAD21"]}returns files for either target in one search and one ranked result, and lists combine across filters, e.g. several cell lines for one target. A negated list such as{"assembly!": ["hg19", "GRCh37"]}excludes every value. - Filters that match nothing are reported in
warnings. The portal accepts a misspelled value or unknown facet name without error and simply returns no hits. When a search returns nothing, the tool counts each filter on its own and warns about any that match no item, with suggestions such as'k562'→'K562'ortarget.lable→target.label. A search with no hits and no warning means the filters are valid but no item matches all of them. Negated filters and list values are always checked, since a misspelledkey!silently excludes nothing and a misspelled list value silently adds nothing. - Use
default_onlyfor the canonical file.default_only=Trueaddspreferred_default=true, which usually leaves one file per experiment, output type and assembly. Leave it off to see per-replicate and superseded outputs. released_onlydrops archived and revoked items. It addsstatus=releasedunless the query sets its ownstatusfilter. A key ending in!, e.g."assembly!": "hg19", negates a filter.organismis exact for experiments and inferred for files. Experiments report their biosamples’ species. Files have no organism field, so it comes from the donor (human or mouse) or the assembly (dm6,ce11, …), and isNonewhen neither identifies the species. To restrict files to a species, filter onassembly. For experiments, filter onreplicates.library.biosample.donor.organism.scientific_name.- Free text is fuzzy.
search_termmatches across descriptions and metadata, which helps when facet terms are unknown. Combine it with filters to narrow the hits. - The tool returns metadata, not files. Call
output.download(directory)to fetch the file hits. It verifies each file’s MD5, skips files already downloaded, and refuses before starting when the total exceedsmax_total_bytes(1 GB by default). Peak and quantification files are a few MB. Signal tracks, alignments and reads are often hundreds of MB to several GB. Passaccessionsto fetch only some hits. Results export as JSON (full output) or CSV (one row per hit).
Toolkit Notes
These apply to every ENCODE tool in this toolkit (encode-search).
- Requires network access. The tool calls the live ENCODE portal over HTTPS and runs in the current Python process.
- Results follow the live portal. New releases and reprocessing can add, archive or change default files. Keep the accessions and MD5 checksums with exported results for provenance.

