R/ROADMAP_query.R
ROADMAP_query.Rd
Query Roadmap
Query Roadmap annotations using a set of genomic coordinates.
ROADMAP_query(
query_dat,
keyword_query = NULL,
limit_files = NULL,
chrom_states = NULL,
n_top = NULL,
min_hits = 1,
save_dir = file.path(tempdir(), paste(paste0("roadmap_query--", paste(keyword_query,
collapse = "-")), paste0("n_top--", n_top), paste0("limit_files--", limit_files),
paste(chrom_states, collapse = "-"), sep = ".")),
force_new = FALSE,
return_paths = FALSE,
merge_and_process = FALSE,
conda_env = "echoR_mini",
nThread = 1,
verbose = TRUE
)
Variant-level summary statistics.
Search all columns in the Roadmap annotations metadata
and only query annotations that contain your keywords.
Can provide multiple keywords in list form:
c("placenta","liver","monocytes")
.
Limit the number of annotation files queried (for faster testing).
Filter results by chromatin states.
The number of top annotation sources (e.g. tissues) to include, sorted by greatest number of rows (i.e. the number of genomic ranges within the window).
Minimum number of hits
(regions overlapping with query_dat
)
required to include a given annotation.
Directory to store query results in.
Overwrite any existing files of the same name.
Return list of paths instead of a GRangesList.
Perform filtering and merging of GRangesList items.
Conda environment to search for tabix in.
Number of threads to parallelise queries over.
Print messages.
Other ROADMAP:
ROADMAP_construct_reference()
,
ROADMAP_merge_and_process()
,
ROADMAP_tabix()
query_dat <- echodata::BST1
grl <- ROADMAP_query(
query_dat = query_dat,
keyword_query = "monocyte")
#> + ROADMAP:: 2 annotation(s) identified that match: monocyte
#> Constructing GRanges query using min/max ranges across one or more chromosomes.
#> + as_blocks=TRUE: Will query a single range per chromosome that covers all regions requested (plus anything in between).
#> Downloading Roadmap Chromatin Marks: E124
#> Converting dat to GRanges object.
#> Saving query ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./ROADMAP_query.E124.rds
#> Converting 1 GRanges object to separate BED files.
#> Saving BED file ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./E124.bed.txt.gz
#> BED subset downloaded in 6.568 seconds
#> Constructing GRanges query using min/max ranges across one or more chromosomes.
#> + as_blocks=TRUE: Will query a single range per chromosome that covers all regions requested (plus anything in between).
#> Downloading Roadmap Chromatin Marks: E029
#> Converting dat to GRanges object.
#> Saving query ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./ROADMAP_query.E029.rds
#> Converting 1 GRanges object to separate BED files.
#> Saving BED file ==> /tmp/Rtmp3k34Cf/roadmap_query--monocyte.n_top--.limit_files--./E029.bed.txt.gz
#> BED subset downloaded in 7.163 seconds
#> ROADMAP:: Annotating GRangesList.
#> Annotating chromatin states.
#> ROADMAP:: Done in 0.26 min.