## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

## ----installation, eval=FALSE-------------------------------------------------
# if (!require("BiocManager", quietly = TRUE))
#     install.packages("BiocManager")
# BiocManager::install("PscanRBackgrounds")

## ----load-package-------------------------------------------------------------
library(PscanRBackgrounds)

## ----metadata-----------------------------------------------------------------
metadata <- read.csv(system.file(
    "extdata", "metadata.csv", package = "PscanRBackgrounds"
))
nrow(metadata)
head(metadata[c("Title", "Genome", "Species", "TaxonomyId")])
table(metadata$Genome)

## ----catalog------------------------------------------------------------------
catalog <- read.delim(system.file(
    "extdata", "catalog_v2.tsv", package = "PscanRBackgrounds"
))
table(catalog$assembly, catalog$jaspar_release)
catalog[1, c("artifact", "motif_count", "promoter_count",
    "annotation_source", "pscanr_version")]

## ----access, message=FALSE----------------------------------------------------
library(ExperimentHub)
eh <- ExperimentHub()
backgrounds <- query(eh, "PscanRBackgrounds")
length(backgrounds)
hg38 <- query(backgrounds, c("hg38", "JASPAR2020", "200u_50d"))
hg38
path <- hg38[[1]]
readLines(path, n = 3)

## ----session-info-------------------------------------------------------------
sessionInfo()

