bedbaser exposes the bedhost API
and includes convenience functions for common tasks, such as to import a
BED file by id
into a GRanges object and a BEDset by its id
into a
GRangesList.
BEDbase(cache_path, quietly = FALSE)
getCache(x, cache_type = c("bedfiles", "bedsets"))
setCache(x, cache_path, quietly = TRUE)
BEDbase object
BEDbase()
creates a cache similar to that of the
Geniml BBClient's cache.
The convenience functions are as follows
bedbaser::BEDbase()
: API service constructor
bedbaser::getCache()
: Retrieve cache
bedbaser::setCache()
: Set path to cache
bedbaser::bb_stats()
: Retrieve BEDbase statistics
bedbaser::bb_example()
: Retrieve an example BED file or BEDset
bedbaser::bb_metadata()
: Retrieve metadata for a BED file or BEDset
bedbaser::bb_list_beds()
: List all BED files
bedbaser::bb_list_bedsets()
: List all BEDsets
bedbaser::bb_beds_in_bedset()
: List BED files in BEDset
bedbaser::bb_bed_text_search()
: Search BED files by text
bedbaser::bb_to_granges()
: Create a GRanges object from a BED id
bedbaser::bb_to_grangeslist()
: Create a GRangesList from a BEDset id
bedbaser::bb_save()
: Save a BED file to a path.
bedbase <- BEDbase(cache_path = tempdir())
#> 125977 BED files available.
ex_bed <- bb_example(bedbase, "bed")
bb_metadata(bedbase, ex_bed$id)
#> $name
#> [1] "encode_10240"
#>
#> $genome_alias
#> [1] "hg38"
#>
#> $genome_digest
#> [1] "2230c535660fb4774114bfa966a62f823fdb6d21acf138d4"
#>
#> $bed_compliance
#> [1] "bed6+3"
#>
#> $data_format
#> [1] "encode_broadpeak"
#>
#> $compliant_columns
#> [1] 6
#>
#> $non_compliant_columns
#> [1] 3
#>
#> $header
#> NULL
#>
#> $id
#> [1] "afbdec2bd8ff7f22467a39d6146d1714"
#>
#> $description
#> [1] "GM DNase-seq experiment on K562 (Blast phase chronic myelogenous leukemia, BCR-ABL1 positive cell line from pleural effusion)"
#>
#> $submission_date
#> [1] "2025-04-28T23:15:53.132875Z"
#>
#> $last_update_date
#> [1] "2025-07-18T20:52:00.968951Z"
#>
#> $is_universe
#> [1] FALSE
#>
#> $license_id
#> [1] "DUO:0000042"
#>
#> $annotation
#> $annotation$species_name
#> [1] "Homo sapiens"
#>
#> $annotation$species_id
#> [1] "9606"
#>
#> $annotation$genotype
#> [1] ""
#>
#> $annotation$phenotype
#> [1] ""
#>
#> $annotation$description
#> [1] ""
#>
#> $annotation$cell_type
#> [1] ""
#>
#> $annotation$cell_line
#> [1] "K562"
#>
#> $annotation$tissue
#> [1] ""
#>
#> $annotation$library_source
#> [1] "genomic"
#>
#> $annotation$assay
#> [1] "DNase-Hypersensitivity"
#>
#> $annotation$antibody
#> [1] ""
#>
#> $annotation$target
#> [1] ""
#>
#> $annotation$treatment
#> [1] ""
#>
#> $annotation$global_sample_id
#> $annotation$global_sample_id[[1]]
#> [1] "encode:ENCFF708QSW"
#>
#> $annotation$global_sample_id[[2]]
#> [1] "geo:gsm2400267"
#>
#>
#> $annotation$global_experiment_id
#> $annotation$global_experiment_id[[1]]
#> [1] "encode"
#>
#> $annotation$global_experiment_id[[2]]
#> [1] "geo:gse90287"
#>
#>
#> $annotation$original_file_name
#> [1] "GSM2400267_ENCFF708QSW_hotspots_GRCh38.bed.gz"
#>
#>
#> $processed
#> [1] TRUE
#>
#> $stats
#> NULL
#>
#> $plots
#> NULL
#>
#> $files
#> NULL
#>
#> $universe_metadata
#> NULL
#>
#> $raw_metadata
#> NULL
#>
#> $bedsets
#> list()
#>