Common Peak example seem not working
Closed this issue · 3 comments
Hi:
Thanks for developing TFregulomeR package.
However, seems I can't get any result from the common Peak example code:
library(TFregulomeR)
my_peak_path <- system.file("extdata", "HCT116_CEBPb_binding_sites.txt", package = "TFregulomeR")
my_peak <- read.delim(my_peak_path, sep = "\t", header = FALSE)
CEBPB_record <- suppressMessages(dataBrowser(tf = "CEBPB"))
commonPeak_output <- suppressMessages(commonPeaks(target_peak_id = "MM1_HSA_K562_CEBPB",
motif_only_for_target_peak = TRUE,
user_target_peak_list = list(my_peak),
user_target_peak_id = c("HCT116_CEBPB"),
compared_peak_id = CEBPB_record$ID,
motif_only_for_compared_peak = TRUE,
methylation_profile_in_narrow_region = TRUE))
commonPeak_result <- suppressMessages(commonPeakResult(commonPeaks = commonPeak_output,
return_common_peak_sites = TRUE,
save_MethMotif_logo = TRUE,
return_methylation_profile = TRUE,
return_summary = TRUE))
However, eventually I get results like:
> commonPeak_result
$common_peak_list
$common_peak_list$MM1_HSA_K562_CEBPB_common_peaks
[1] chr start end id
[5] tag_fold_change
<0 rows> (or 0-length row.names)
$common_peak_list$HCT116_CEBPB_common_peaks
[1] chr start end id
<0 rows> (or 0-length row.names)
$methylation_profile
$methylation_profile$MM1_HSA_K562_CEBPB_common_peaks
[,1]
[1,] NA
$methylation_profile$HCT116_CEBPB_common_peaks
[,1]
[1,] NA
$peak_summary
percentage_in_original_inputs(%)
MM1_HSA_K562_CEBPB_common_peaks 0
HCT116_CEBPB_common_peaks 0
>
Thanks for your answer advance.
Hi,
Thanks for your interest in TFregulomeR package. I'm sorry for my late response.
The common peak function is working as below:
For each peak set in "target" list, the function will get its peak subset that is overlapped across all peak sets in "compared" list.
In your case, you have two peak sets in your "target" list: 1) peak set from TFregulomeR compendium with ID "MM1_HSA_K562_CEBPB" and 2) user peak set. In your "compared" list, you have 38 CEBPB peak sets coming from 38 ChIP-seq experiment across 12 organs/tissues and 2 species. The common peak function will take each peak set from "target" list, and get its subset that is overlapped with all these 38 CEBPB peak sets, which is zero. You can imagine that it's nearly impossible to get a CEBPB peak locus that is shared by all 38 experiments from different organs/tissues and even by two different species (human and mouse).
You may visit the link here for more details about this function.
https://bioinfo-csi.nus.edu.sg/methmotif/API_TFregulomeR/TFregulomeR-Vignettes.html#common-peak-regions
Best,
Quy
Thanks for your answer, I will try it later. I found it's very useful to use TFregulomeR to get peaks of certain TFs on certain cells. Nice work.
Thanks a lot for your positive comments.
Quy