A question about Homer ChIP-seq analysis
0
1
Entering edit mode
5.8 years ago
mikysyc2016 ▴ 120

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 • 2.8k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

It works. Thank you.

ADD REPLY

Login before adding your answer.

Traffic: 2657 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6