This is a test version of Biostars. For the public version, visit https://www.biostars.org.
grab signal from wig to bed file

Hello!

I have bed file without the signal intensities and I would like to grab this signal from wig file.

Is there someone who knows how to manage this?

Thank you

chip-seq

1 answer

I am not exactly sure what you are trying to do, but a WIG file is basically a BED file of every position in the genome with coverage in the fourth column. Perhaps you can give some more information. The following link may be of use though:

https://github.com/martijnvermaat/bio-playground/blob/master/coverage-wiggle-to-bed/coverage-wiggle-to-bed.py

Ian

Thank for your answer dear Ian

I want to grab the signal intensities (the wig files) in 35 bins (or 3 for example) for each region given in the bed file to finish with a matrix where each row is a gene ID given in the bed file and the number of columns for that gene is equal to the genomic region / 35. The value of each cell is the total signal intensity (not the average) of those 35 base bins.

This is the beginning of my bed file

chr2L     7678       9484       CG11023      +     NM_001169365
chr2L     9838       18420      l(2)gl       -     NM_078715
chr2L     9838       21226      l(2)gl       -     NM_001258872
chr2L     66733      71390      dbr          +     NM_001258883
chr2L     67192      71081      dbr          +     NM_001258880
chr2L     71906      76211      galectin     +     NM_001258884
chr2L     76497      77783      CG11374      +     NM_134644
chr2L     82983      87237      net          -     NM_001272860
chr2L     94888      102086     Zir          +     NM_134645
chr2L     102529     104142     CG11377      +     NM_001272861
chr2L     103961     106582     Nhe1         -     NM_134647

Here is the beginning of my wig file

1    0
2    0
3    0
4    0
5    0

Thank you once more

Log in to answer this question.