R/process_chip_data.R
add_chip_peak_labels_to_sites.Rd
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 = "./"
)
A data frame containing the candidate sites
ChIP-seq peak file (.bed.gz format)
ENCODE sample ID of ChIP-seq peaks (.bed.gz format)
Directory to save the downloaded ChIP-seq peaks
A data frame of candidate sites and binary ChIP-seq peak labels (bound: 1, unbound: 0).
if (FALSE) {
sites_chip_labels <- add_chip_peak_labels_to_sites(sites, chip_peak_file='ChIPseq.peaks.bed.gz')
}