R/import_ucsc_bigwigs.R
import_ucsc_bigwigs.Rd
Import, 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:
"name"Unique name of the file.
"data_link"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.
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)
#> Constructing GRanges query using min/max ranges across one or more chromosomes.
#> Downloading data from UCSC.
#> Importing... [1] exvivo_H3K27ac
#> Saving bigwig query ==> /tmp/Rtmp3k34Cf/file5da941675e32