Hi all, I use macs2 to do peak calling for my ChIP-seq results, and use narrowpeak file to run homer with bedgraph file. Please see below. $ annotatePeaks.pl '/home/Desktop/B6KOg/B6KOg_s_2_ACAGTG_peaks.narrowPeak' mm9 -size 400 -bedGraph '/home/Desktop/B6KOg/B6KOg_s_2_ACAGTG_treat_pileup.bdg' '/home/yachen/Desktop/B6KOg/B6KOg_s_2_ACAGTG_control_lambda.bdg' -raw > Desktop/outputB6KOg.txt Then i get a txt file and last two column show me (B6KOg_s_2_ACAGTG_treat_pileup.bdg bedGraph avg over 400 bp) and (B6KOg_s_2_ACAGTG_control_lambda.bdg bedGraph avg over 400 bp). do they means o get tag count for treat peaks and input peaks? or DO you know how to use macs2 to get tag count for samples directly? Thanks!
Are you asking how to count the number of reads aligned within peak regions? If so, you can do this with Bedtools:
Thanks. I use two file from macs2 analysis (one is file:ko1_2.72_summits.bed, another is ko1_2.72_treat_pileup.bdg) as bed and bedgraph as you mentioned, but i get error as below: ERROR: chromomsome sort ordering for file ko1_0.01_q/ppara_ko1_2.72_treat_pileup.bedgraph is inconsistent with other files. Do you know why this happen?
Bedtools expects both files to be sorted in the same order. Sort both files by chromosome and start position:
It works. Thank you.