buildConsensusPeaks: Calculates the consensus peaks defined by the results of a...

Description Usage Arguments Value Examples

View source: R/summaryBuilders.R

Description

This function takes the result of a previous call to queryEncode, splits the contained peak files by conditions (as specified by the split_by argument), then builds consensus peaks for each condition.

Usage

1
2
3
4
5
6
7
8
9
buildConsensusPeaks(
  query_results,
  split_by = NULL,
  consensus_threshold = 1,
  simplify = FALSE,
  temp_dir = ".",
  force = FALSE,
  consensus_threshold_n = NULL
)

Arguments

query_results

A data.table returned by queryEncode or queryEncodeGeneric.

split_by

A vector of column names from query_results that will be used to split the consensus binding sites according to condition. If NULL, all elements of query_results are used in the same consensus calculation.

consensus_threshold

A numeric value between 0 and 1, indicating the proportion of peak files in which a peak must appear for it to be included within the consensus.

simplify

If TRUE, non-discriminatory columns are removed from the metadata, and if only one sample group is found, it is renamed "All".

temp_dir

The path to a directory where peak files will be downloaded.

force

A logical indicating whether already present files be redownloaded.

consensus_threshold_n

An integer indicating the number of peak files in which a peak must appear for it to be included within the consensus. IF this argument is provided, it supercedes consensus_threshold.

Value

An object of class ENCODEBindingConsensus.

Examples

1
2
3
4
5
6
7
query_results = queryEncodeGeneric(biosample_name="A549", assembly="GRCh38",
                                  file_format="^bed$", output_type="^peaks$", 
                                  treatment_duration_unit="minute",
                                  treatment_duration="(^5$|^10$)", 
                                  target="NR3C1", fixed=FALSE)
res = buildConsensusPeaks(query_results, split_by=c("treatment_duration"), 
                          consensus_threshold=0.5)

CharlesJB/ENCODExplorer documentation built on Dec. 9, 2019, 10:11 a.m.