Adds ChIP-seq peak labels to the candidate sites. It uses ChIP-seq peaks from chip_peak_file if available. If chip_peak_file is not available, it will download the ChIP-seq peaks from ENCODE database (using the sample ID provided in chip_peak_sampleID, and save to the directory chip_peak_dir).

add_chip_peak_labels_to_sites(
  sites,
  chip_peak_file = NULL,
  chip_peak_sampleID = NULL,
  chip_peak_dir = "./"
)

Arguments

sites

A data frame containing the candidate sites

chip_peak_file

ChIP-seq peak file (.bed.gz format)

chip_peak_sampleID

ENCODE sample ID of ChIP-seq peaks (.bed.gz format)

chip_peak_dir

Directory to save the downloaded ChIP-seq peaks

Value

A data frame of candidate sites and binary ChIP-seq peak labels (bound: 1, unbound: 0).

Examples

if (FALSE) {
sites_chip_labels <- add_chip_peak_labels_to_sites(sites, chip_peak_file='ChIPseq.peaks.bed.gz')
}