I'm trying this now, will report back with results!
Hey all,
I imagine this is an easy question, but I haven't been able to find the answer! I have a bed file list of all HG19 genes. I also have BigWig files of MACS2 peak calls from ChIP-seq data. I would like to iterate through my list of genes, and assign the "score" value of the bed file as the signal from the BigWig at the bed file's indicated "start" value.
I have used DeepTools to achieve a similar goal, but the computeMatrix output, "sorted/filtered regions," does not have a true "score".
Thank you!
2 answers
It would have made a bit more sense to use bedtools intersect with the BED file from MACS2 and simply intersect that with the genes BED file.
Convert BigWig to Wig via Kent Tools bigWigToWig and from Wig to BED via BEDOPS wig2bed. Then run BEDOPS bedmap to map scores to genes.
It's fast and you can use Unix pipes to make a clean workflow, once you get out of BigWig world and into BED:
$ wig2bed < in.wig | bedmap --echo --echo-map-score genes.bed - > answer.bed
Log in to answer this question.