This function converts genomic coordinates for a set of peaks to a specified genome assembly.
The SCEGHiC package provides bulk average Hi-C data for the hg38 and mm10 assemblies,
so coordinate conversion is required for other assemblies such as hg19 and mm9.
Value
A data.frame containing peaks after genome coordinate conversion, with updated chromosome, start, and end positions.
Examples
peaks <- c(
"chr2-973888-974755", "chr2-3195868-3196264", "chr2-3242398-3243508", "chr2-6863856-6866834", "chr2-6913141-6914394",
"chr2-6924663-6924972", "chr2-6999095-6999554", "chr2-7007713-7008819", "chr2-7083945-7084032", "chr2-7097148-7098029"
)
split_peaks <- do.call("rbind", strsplit(as.character(peaks), "-", fixed = TRUE))
peakinfo <- liftOverPeaks(split_peaks, "hg19")
head(peakinfo)
#> chr start end peak midpoint
#> 1 chr2 978202 979069 chr2_973888_974755 978635.5
#> 2 chr2 3192097 3192493 chr2_3195868_3196264 3192295.0
#> 3 chr2 3238627 3239737 chr2_3242398_3243508 3239182.0
#> 4 chr2 6723724 6726702 chr2_6863856_6866834 6725213.0
#> 5 chr2 6773010 6774263 chr2_6913141_6914394 6773636.5
#> 6 chr2 6784532 6784841 chr2_6924663_6924972 6784686.5