If you merge replicates prior to sequencing, it might be useful to downsample the data to have equal readcounts. Otherwise, the peak calling is dominated by the sample with the highest counts. See this post on BioC for details.
Also @ZZzzzzhong, if you copy statements from a website (the first sentence of your answer), please indicate it by using the Blockquote option in the formatting bar and putting in a link to the reference directly behind it.
I'd perform peak calling on individual samples and then use
bedtools intersectormergePeaksfromHomerpackage to assess the overlap among replicates.I have used that approach before for ATACseq. So first call peaks for all bam files at once, and then quantify how many reads were mapped to the peak regions for each sample (bam file) for statistical analysis in edgeR.
" and then quantify how many reads were mapped to the peak regions for each sample (bam file)" how did you take out the count? by using multibamsummary? or