Color-code track features according to score in a BED file

2,252 views
Skip to first unread message

Mathieu Gineste

unread,
Nov 22, 2012, 2:08:25 PM11/22/12
to igv-...@googlegroups.com
Dear colleagues,

I should start saying that I'm a wet-side biologist recently moving to the dry-side of it. My questions/comments/remarks might appear "newbish" to some of you.

I'm displaying a MACS ChIP-Seq peak call output (=bed file) in IGV. The bed file looks like this :

track name="MACS peaks for testK4m1macs1.3"
C100089    6441    6682    MACS_peak_1    58.57
C100255    6103    6286    MACS_peak_2    50.06
C100255    7939    8192    MACS_peak_3    63.91


The bed file display in IGV looks like this :
https://lh6.googleusercontent.com/-FJyBcRdfdtk/UK53eChDzgI/AAAAAAAAAGE/Ys79tOuuyZw/s1600/Capture+d%E2%80%99e%CC%81cran+2012-11-22+a%CC%80+20.04.16.png

I would like to know whether it is possible to color-code each peak segment according to its score (COL5 of the bed file) in IGV, generating a heatmap color gradient from the lowest and highest values of this score. Alternative solutions for a similar result are always welcome.

Thanks for your feedback,
Salutations montpelliéraines,
Mathieu

Jim Robinson

unread,
Nov 30, 2012, 9:58:31 PM11/30/12
to igv-...@googlegroups.com
Yes,  you need to use the "useScore" attribute in the track line, and optionally the "viewLimits" and "color" attributes.  See the our documentation of track line, or UCSC's, for details.  Note that the score column at UCSC is required to range from 0-1000.  IGV will let you override this by setting the viewLimit, in which case the range specified will be used.

There is an alternative,  use .bedgraph instead of .bed.  The format is almost the same,  just drop the "name" column.   The data will be displayed as a bar chart, if you prefer heatmap set the graphType attribute on the track line to "heatmap".

Jim

Mathieu Gineste

unread,
Dec 9, 2012, 8:19:58 AM12/9/12
to igv-...@googlegroups.com
Dear Jim,

Indeed, converting .bed to .bedgraph is much convenient, as IGV appears to autodetect and support this format.

Thanks for your simple but useful feedback.

Mathieu
Reply all
Reply to author
Forward
0 new messages