import_peaks_multi: Import peaks: multi

View source: R/import_peaks_multi.R

import_peaks_multiR Documentation

Import peaks: multi

Description

Automatically import peaks in different file formats. If the file is in bigWig or bedGraph format, peaks wil be called first.

Usage

import_peaks_multi(
  links,
  id = basename(tempfile()),
  build = "hg19",
  query_granges = NULL,
  query_granges_build = NULL,
  split_chromosomes = FALSE,
  condense_queries = TRUE,
  method = "MACSr",
  cutoff = NULL,
  searches = construct_searches(),
  peaks_dir = tempdir(),
  merge_list = TRUE,
  nThread = 1,
  verbose = TRUE
)

Arguments

query_granges

[Optional] GRanges object indicating which genomic regions to extract from each sample.

query_granges_build

[Optional] Genome build that query_granges is aligned to.

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 nThread argument.

condense_queries

Condense query_granges by taking the min/max position per chromosome (default: TRUE). This helps to reduce the total number of queries, which can cause memory allocation problems due to repeated calls to the underlying C libraries.

method

Method to call peaks with:

  • "MACSr" : Uses MACS3 via bdgpeakcall.

  • "SEACR" : Uses SEACR via find_packages.

cutoff
  • when method="MACSr" : Passed to cutoff argument. Cutoff depends on which method you used for score track. If the file contains pvalue scores from MACS3, score 5 means pvalue 1e-5. If NULL, a reasonable cutoff value will be inferred through a cutoff_analysis.

  • when method="SEACR" : Passed to control argument. Control (IgG) data bedgraph file to generate an empirical threshold for peak calling. Alternatively, a numeric threshold n between 0 and 1 returns the top n fraction of peaks based on total signal within peaks (default: 0.05).

searches

Named list of regex queries.

peaks_dir

Directory to save peaks to (only used when calling peaks from bedGraph files).

nThread

When nThread>1, accelerates file importing and peak calling using multi-core parallelisation.

verbose

Print messages.

Value

GRanges


neurogenomics/PeakyFinders documentation built on Oct. 14, 2024, 3:09 p.m.