Choose files from an encode_list_files() table using explicit filters or a
preset. The result keeps the selected files for download or reading.
Usage
encode_select_files(
files,
preset = NULL,
file_format = NULL,
output_type = NULL,
assembly = NULL,
file_accession = NULL,
status = "released",
replicate_policy = c("all", "preferred_processed", "replicate_level", "pooled_only"),
prefer_default = FALSE,
require_href = TRUE,
quiet = FALSE
)Arguments
- files
File metadata from
encode_list_files(), a File search result, a selected-file object, or ENCFF accession(s).- preset
Optional preset name. Use
encode_file_presets()to list the canonical preset names.- file_format
Optional file format filter. If omitted and
presetis set, the preset supplies a format preference.- output_type
Optional output type filter. If omitted and
presetis set, the preset supplies an output-type priority.- assembly
Optional genome assembly filter.
- file_accession
Optional ENCODE file accession(s), such as
"ENCFF260OJQ", to select explicitly before applying other filters.- status
Optional status filter. Defaults to
"released".- replicate_policy
How to handle replicate-related outputs.
"all"keeps all matching files;"preferred_processed"keeps the highest-priority output type per experiment when a preset priority is available;"replicate_level"keeps files with biological replicate labels;"pooled_only"keeps files whose output type indicates pooled or IDR-like processing.- prefer_default
Whether to prefer ENCODE records marked
preferred_default. When no preferred-default rows are present, the filter is skipped and the other explicit criteria are used.- require_href
Whether selected rows must include an ENCODE download path or URL.
- quiet
If
FALSE, print a concise selection message.
Value
An encode_selected_files object with files, the selected
encode_file_table; excluded, a table of non-selected rows and reasons;
criteria, the applied filters and preset settings; query_url; and
retrieved_at.
Details
Use encode_file_presets() to list available presets or inspect one preset.
Examples
files <- data.frame(
file_accession = c("ENCFFONE", "ENCFFTWO"),
file_format = c("tsv", "bed"),
output_type = c("gene quantifications", "peaks"),
assembly = "mm10",
status = "released",
href = c(
"/files/ENCFFONE/@@download/a.tsv",
"/files/ENCFFTWO/@@download/b.bed"
)
)
selected <- encode_select_files(
files,
preset = "rnaseq_gene_quant",
assembly = "mm10",
quiet = TRUE
)
encode_results(selected)
#> ENCODE files
#> - files: 1
#> - experiments: 0
#> Files:
#> file format output assembly status
#> ENCFFONE tsv gene quantifications mm10 released