import_peaks | R Documentation |
Import pre-computed peak files, or
compute new peaks from bedGraph/bigWig files.
Can import a subset of ranges specified by query_granges
,
or across the whole genome by setting query_granges=NULL
.
Currently recognizes IDs from:
GEO :
ENCODE :
See peaks_metadata_encode
for example metadata.
ROADMAP :
See peaks_metadata_roadmap
for example metadata.
AnnotationHub :
See peaks_metadata_annotationhub
for example metadata.
Notable features:
Automatically infers which database each accession ID is from and organizes the outputs accordingly.
Automatically infers which function is needed to import which file types.
Automatically calls peaks from any bedGraph/bigWig files.
query_granges
can be a different genome build than
the files being imported, as the query_granges
will
be lifted over to the correct genome build
with liftover_grlist.
When nThread>1
, accelerates file importing
and peak calling using multi-core parallelisation.
import_peaks(
ids,
builds = "hg19",
query_granges = NULL,
query_granges_build = NULL,
split_chromosomes = FALSE,
condense_queries = TRUE,
force_new = FALSE,
method = "MACSr",
cutoff = NULL,
searches = construct_searches(),
peaks_dir = tempdir(),
save_path = tempfile(fileext = "_PeakyFinders_grl.rds"),
nThread = 1,
verbose = TRUE
)
ids |
IDs from one of the supported databases. IDs can be at any level: file, sample, or experiment. |
builds |
Genome build that each sample in |
query_granges |
[Optional] GRanges object indicating which genomic regions to extract from each sample. |
query_granges_build |
[Optional]
Genome build that |
split_chromosomes |
Split single-threaded query
into multi-threaded query across chromosomes.
This is can be helpful especially when calling peaks from
large bigWig/bedGraph files.
The number of threads used is set by the |
condense_queries |
Condense |
force_new |
By default, saved results of the same |
method |
Method to call peaks with: |
cutoff |
|
searches |
Named list of regex queries. |
peaks_dir |
Directory to save peaks to (only used when calling peaks from bedGraph files). |
save_path |
Path to save query results to in .rds format. |
nThread |
When |
verbose |
Print messages. |
A nested named list of peak files in GRanges format.
Nesting structure is as follows:
database -> id -> GRanges object
Each GRanges object contains all the peak
data that was found for that particular id
, merged into one.
You can differentiate the various
source file types by looking at the column "peaktype".
If peaks could not be recovered for a sample,
that element will be set to NULL
.
out_list <- PeakyFinders::import_peaks(
ids = c("GSM945244"),# "ENCSR000AHD"
searches = PeakyFinders::construct_searches(keys = "narrowpeak"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.