Return the names of PeakIntervals
Arguments
- peaks
a PeakIntervals object or misha intervals
- tad_based
whether to name peaks based on TADs. If an intervals set named "intervs.global.tad_names" does not exists - the function will return coordinate based names.
- promoters
are the peaks promoters? When true, the peak names (which are gene names) are returned.
Value
the field called 'peak_name' if exists in peaks
, or a tad based peak name if tad_based=TRUE
and the coordinates in
the form of "chrom:start-end" otherwise.
Examples
if (FALSE) {
misha.ext::gset_genome("hg38")
head(peak_names(atac_sc@peaks)) # return the "peak_name" field
head(peak_names(atac_sc@peaks[, -4])) # return tad based peak names
head(peak_names(atac_sc@peaks[, -4], tad_based = FALSE)) # return coordinate based peak names
}