Skip to content

Data partitioning: parameters and notes

See the tutorial for usage and examples.

Each function includes its purpose, API, inputs, outputs, example code and result description. Prepare any required credentials, local files and optional dependencies; remote results vary with database releases and query time.

ENCODE returns text: mostly JSON, but get_citations can return BibTeX/RIS and export_data can return CSV/TSV. Use json.loads() only for JSON. Tracking and credentials use ~/.dnakit-encode/; persistent credential storage needs dnakit[encode-credentials].

Compare ENCODE experiments for joint analysis compatibility

dnakit.encode.compare_experiments(accession1, accession2, *, verbose=True)

Parameter Type Required / default Description and constraints
accession1 str Required First experiment accession (e.g., "ENCSR133RZO")
accession2 str Required Second experiment accession (e.g., "ENCSR000AKS")
verbose bool True Show DNAKit progress messages without changing results.

Export tracked ENCODE experiments as a table

dnakit.encode.export_data(format='csv', assay_title=None, organism=None, organ=None, *, verbose=True)

Parameter Type Required / default Description and constraints
format Literal['csv', 'tsv', 'json'] 'csv' Output format: - "csv": Comma-separated values (default, for Excel/spreadsheets) - "tsv": Tab-separated values (for R, pandas) - "json": JSON array (for programmatic use)
assay_title str | None None Filter by assay type (partial match)
organism str | None None Filter by organism (partial match)
organ str | None None Filter by organ (partial match)
verbose bool True Show DNAKit progress messages without changing results.

Retrieve publications and citations for tracked experiments

dnakit.encode.get_citations(accession=None, export_format='json', *, verbose=True)

Parameter Type Required / default Description and constraints
accession str | None None Specific experiment accession. If None, returns all publications.
export_format Literal['json', 'bibtex', 'ris'] 'json' Output format: - "json": Structured data (default) - "bibtex": BibTeX format for LaTeX - "ris": RIS format (Endnote, Zotero, Mendeley)
verbose bool True Show DNAKit progress messages without changing results.

Retrieve derived-file provenance

dnakit.encode.get_provenance(file_path=None, source_accession=None, *, verbose=True)

Parameter Type Required / default Description and constraints
file_path str | None None Get provenance for a specific derived file
source_accession str | None None List all files derived from a specific ENCODE accession
verbose bool True Show DNAKit progress messages without changing results.

Retrieve external references linked to experiments

dnakit.encode.get_references(experiment_accession=None, reference_type=None, *, verbose=True)

Parameter Type Required / default Description and constraints
experiment_accession str | None None Filter by specific experiment (optional)
reference_type Literal['pmid', 'doi', 'nct_id', 'preprint_doi', 'geo_accession', 'other'] | None None Filter by reference type (optional): "pmid", "doi", "nct_id", "preprint_doi", "geo_accession", "other"
verbose bool True Show DNAKit progress messages without changing results.

dnakit.encode.link_reference(experiment_accession, reference_type, reference_id, description='', *, verbose=True)

Parameter Type Required / default Description and constraints
experiment_accession str Required ENCODE experiment accession (e.g., "ENCSR133RZO")
reference_type Literal['pmid', 'doi', 'nct_id', 'preprint_doi', 'geo_accession', 'other'] Required Type of external reference: - "pmid": PubMed ID (e.g., "32728249") - "doi": DOI (e.g., "10.1038/s41586-020-2493-4") - "nct_id": ClinicalTrials.gov ID (e.g., "NCT04567890") - "preprint_doi": bioRxiv/medRxiv DOI - "geo_accession": GEO accession (e.g., "GSE123456") - "other": Any other identifier
reference_id str Required The actual identifier value
description str '' Optional description of why this reference is linked
verbose bool True Show DNAKit progress messages without changing results.

List locally tracked ENCODE experiments

dnakit.encode.list_tracked(assay_title=None, organism=None, organ=None, *, verbose=True)

Parameter Type Required / default Description and constraints
assay_title str | None None Filter by assay type (partial match)
organism str | None None Filter by organism (partial match)
organ str | None None Filter by organ (partial match)
verbose bool True Show DNAKit progress messages without changing results.

Record a derived file and its provenance

dnakit.encode.log_derived_file(file_path, source_accessions, description='', file_type='', tool_used='', parameters='', *, verbose=True)

Parameter Type Required / default Description and constraints
file_path str Required Path to the derived file you created
source_accessions list[str] Required List of ENCODE accessions this file was derived from (experiment or file accessions, e.g., ["ENCSR133RZO", "ENCFF635JIA"])
description str '' What this derived file contains
file_type str '' Type of file (e.g., "filtered_peaks", "merged_signal", "differential")
tool_used str '' Tool/software used to create it (e.g., "bedtools intersect", "DESeq2")
parameters str '' Parameters or command used
verbose bool True Show DNAKit progress messages without changing results.

Summarize tracked experiment collections by field

dnakit.encode.summarize_collection(assay_title=None, organism=None, organ=None, *, verbose=True)

Parameter Type Required / default Description and constraints
assay_title str | None None Filter by assay type (partial match)
organism str | None None Filter by organism (partial match)
organ str | None None Filter by organ (partial match)
verbose bool True Show DNAKit progress messages without changing results.

Track an ENCODE experiment and its provenance locally

dnakit.encode.track_experiment(accession, fetch_publications=True, fetch_pipelines=True, notes='', *, verbose=True)

Parameter Type Required / default Description and constraints
accession str Required ENCODE experiment accession (e.g., "ENCSR133RZO")
fetch_publications bool True Also fetch and store publications/citations (default True)
fetch_pipelines bool True Also fetch and store pipeline/analysis info (default True)
notes str '' Optional notes to attach to this experiment
verbose bool True Show DNAKit progress messages without changing results.