buildConsensusPeaks {ENCODExplorer} | R Documentation |
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.
buildConsensusPeaks(query_results, split_by = NULL, consensus_threshold = 1, simplify = FALSE, temp_dir = ".", force = FALSE, consensus_threshold_n = NULL)
query_results |
A data.table returned by |
split_by |
A vector of column names from query_results that will be used
to split the consensus binding sites according to condition.
If |
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. |
An object of class ENCODEBindingConsensus.
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)