R/import_ucsc_bigwigs.R
import_ucsc_bigwigs.RdImport, preprocess, merge, and save data from UCSC Genome Browser tracks.
import_ucsc_bigwigs(
query_dat,
bigwig_metadata,
full_data = TRUE,
xlims = NULL,
save_path = tempfile(),
force_new = FALSE,
nThread = 1,
verbose = TRUE
)data.table or GRanges containing genomic coordinates to query the UCSC tracks with.
Metadata table with at least the following two columns:
Unique name of the file.
URL to UCSC genome browser bigwig file.
Whether to download the full data
(genomic ranges of all sequence reads) as opposed
to a reduced representation of the data as a single vector
(i.e. the aggregated reads "score").
Setting full_data=TRUE is necessary for creating
histograms and density plots.
Min/max positions to filter from data after initial query.
This helps to capture genomic ranges that only partially overlap with
query_dat.
Where to save the processed data.
If a file already exists, download a new one anyway.
Number of threads to parallelise downloads across.
Print messages.
if (FALSE) { # \dontrun{
bigwig_metadata <- echoannot::NOTT2019_bigwig_metadata[1,]
query_dat = echodata::BST1
bw.gr <- echoannot::import_ucsc_bigwigs(query_dat = query_dat,
bigwig_metadata = bigwig_metadata)
} # }