Skip to contents

Capture the query, selected files, download records, ENCODE attribution metadata, and optional R session information. Provide path to save the manifest as JSON.

Usage

encode_manifest(
  x,
  include_attribution = TRUE,
  include_session = TRUE,
  path = NULL,
  pretty = TRUE
)

Arguments

x

ENCODE accession(s), result object, file table, selected files, or download result.

include_attribution

Whether to include ENCODE dataset and file attribution metadata when supported. Result objects and file tables reuse metadata already held by x and issue no further requests. Character ENCSR or ENCFF input first retrieves the required ENCODE metadata. lab, institution, and project describe the record that produced each file. For processed ENCODE files that is the processing pipeline rather than the originating laboratory; use the parent experiment table when citing data producers. Attribution retrieval_date is NA when the input has no recorded retrieval timestamp; manifest created_at remains separate.

include_session

Whether to include utils::sessionInfo().

path

Optional destination JSON path. If supplied, the manifest is also written to disk.

pretty

Whether to pretty-print JSON when path is supplied.

Value

An encode_manifest list. Components include package, retrieval, filters, and object_type. Available request history and file-selection criteria are stored in requests and selection_criteria. Depending on input, the manifest also includes experiments, records, selected or excluded files, downloaded or loaded files, loaded-object classes, matrix dimensions, or accessions. When requested and available, it includes ENCODE attribution and captured R session information. If path is supplied, the same manifest is written as JSON and the path is stored as an attribute.

Examples

files <- data.frame(
    file_accession = "ENCFFLOCAL1",
    local_path = tempfile(fileext = ".tsv")
)

manifest <- encode_manifest(files, include_attribution = FALSE,
                            include_session = FALSE)

names(manifest)
#> [1] "package"     "retrieval"   "filters"     "object_type" "files"