Motif match chip-seq peaks
1
0
Entering edit mode
4.8 years ago
ta_awwad ▴ 350

Dear All, I have ChIP-seq peaks for a given transcription factor in a Bed format and I would like to split this bed file based on the consensus of the TF binding into two bed files ,, is there any tools or script that can do this job.

many many thanks TA

ChIP-Seq sequencing • 1.8k views
ADD COMMENT
1
Entering edit mode

Please give a representative output. It is not fully clear (at least to me) what you want to do.

ADD REPLY
0
Entering edit mode

I have a bed file with 20K peaks not all of them have the consensus of my TF of interest .. the question is I wanna filter that bed file into two bed files based on the consensus sequence. All.bed:

chr2    80617236    80658906
chr2    90940382    91019497
chrX    36608314    36645395    
chrX    37091678    37110322    
chr4    59471868    59549364
chr4    91250763    91400785

based on the consensus motif of my TF (NGATAN) i would like to have two bed files:

with_consensus.bed

chr2    80617236    80658906
chrX    36608314    36645395
chr4    91250763    91400785

without_consensus.bed

chr2    90940382    91019497
chrX    37091678    37110322    
chr4    59471868    59549364
ADD REPLY
1
Entering edit mode
4.8 years ago
ATpoint 85k

What you need is probably FIMO from the MEME suite. It is able to match a motif to given sequences in fasta format, returning significant matches. It will return results in GFF3 format so you can use bedtools intersect with and without its -v option to separate your BED file into overlaps with the signicicant matches and those without. See FIMO documentation.

ADD COMMENT
0
Entering edit mode

I used:

seqkit locate -i -d -p AUGGACUN

looks good. one last question? do you know an easy way to extract 50 bp around peak centre from .fa or .bed file?

thanks

ADD REPLY
0
Entering edit mode

If you mean with center the exact middle of an interval you can use bedtools slop like:

cat test.bed 
chr1    100 200

bedtools slop -pct -l -0.5 -r -0.5 -g chromSizes.txt -i test.bed | bedtools slop -b 25 -g chromSizes.txt 
chr1    125 176

and then use bedtools getfasta to make a fasta out of it.

ADD REPLY
0
Entering edit mode

in Bedtools documentation:

bedtools slop will increase the size of each feature in a feature file by a user-defined number of bases.
ADD REPLY
0
Entering edit mode

What is the question?

ADD REPLY
0
Entering edit mode

i need to shorten the grange

ADD REPLY
1
Entering edit mode

That is what the code is doing. The first command resizes the interval to the center position and the second one then extends the center to 25bp each direction, giving a 50bp window around the center.

ADD REPLY
0
Entering edit mode

many many thanks for your help

ADD REPLY
1
Entering edit mode

Sure thing. Feel free to add a comment if there are any problems.

ADD REPLY
0
Entering edit mode

another question :) if i would like to get 100 bp around the max height of the peak what would be the correct way?

ADD REPLY
1
Entering edit mode

If you called peaks with macs2 then it should have the peak summit position in column 10 of the narrowPeak file. So you would add value of column10 to the start coordinate to get the actual peak center with the highest coverage. From there you can again use the code snipped above. If you used other peak callers they might not have this column, so either go with a custom solution to get the actual summit or simply take the peak center (I use peak center since everything else is too tideous and in my experience it does not make too much of a difference, but I never properly benchmarked this).

ADD REPLY
0
Entering edit mode

Thanks much .. is there any way to get this GRange from bigwig files?

ADD REPLY
1
Entering edit mode

I don't understand, what do you mean? Which GRanges?

ADD REPLY
0
Entering edit mode

peak max height ± 50 bp

ADD REPLY

Login before adding your answer.

Traffic: 2649 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