Question: A question about Homer ChIP-seq analysis
0
gravatar for mikysyc2016
2.1 years ago by
mikysyc201670
mikysyc201670 wrote:

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!

chip-seq • 1.2k views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by mikysyc201670

Are you asking how to count the number of reads aligned within peak regions? If so, you can do this with Bedtools:

bedtools map -a peaks.bed -b coverage.bedgraph -c 4 -o mean
ADD REPLYlink written 2.1 years ago by James Ashmore3.0k

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?

ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by mikysyc201670

Bedtools expects both files to be sorted in the same order. Sort both files by chromosome and start position:

sort -k1,1 -k2,2n coverage.bedgraph > coverage_sorted.bedgraph
sort -k1,1 -k2,2n peaks.bed > peaks_sorted.bed
ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by James Ashmore3.0k

It works. Thank you.

ADD REPLYlink written 2.1 years ago by mikysyc201670
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1682 users visited in the last hour