Color legend for attributes track

130 views
Skip to first unread message

apurva hegde

unread,
Aug 29, 2017, 8:26:52 PM8/29/17
to igv-help
Hi,

I've been using IGV to visualize a bunch of samples with CNA data. I was successfully able to input my custom attributes file containing tumor type information. However, IGV seems to be assigning random colors to each of the tumor types. I was hoping to either 1) get help with figuring out the color legend indicating what color corresponds to what tumor type from my attributes file or 2) help with inserting my own attribute colors file so I can control exactly which tumor type gets what color. I've tried following these instructions: "http://software.broadinstitute.org/software/igv/SampleInformation" (bottom of the page, "Attribute Colors" section), but it doesn't tell me what to do if I have tumor type information for each sample and I want to assign a distinct color to each tumor type. It only gives information about what to do with a range of numerical values, for example. I can't seem to find any other straightforward explanation anywhere.

I've attached an example of what I have right now as a reference.
Any help is much appreciated.
AllTumors_heatmaps.png

Helga Thorvaldsdottir

unread,
Aug 30, 2017, 3:19:11 PM8/30/17
to igv-help
Hi,

(1) To see which color corresponds to which tumor type, mouse over the color in the attribute panel and it will tell you the tumor type it corresponds to. That might be easier to do if you first sort the samples by tumor type (click on the attribute column label at the top).

(2) To control the colors, add the following lines to your attributes file (assuming the tumor type values are strings and not numbers):
#colors
<name of attribute> <attribute value 1> <color 1>
<name of attribute> <attribute value 2> <color 2>

Note that the #colors line is essential.
Colors are defined in the red,green,blue color space where each value is between 0 and 255.

Here's an example file that has two attributes named Subtype and GENDER.  Subtype has 4 different attribute values (Classical, Neural, Proneural, Mesenchymal), GENDER has 2 different attribute values (MALE, FEMALE). 
#sampleTable
Linking_id Subtype GENDER
TCGA-02-0001 Classical FEMALE
TCGA-02-0002 Neural MALE
TCGA-02-0003 Proneural MALE
TCGA-02-0004 Mesenchymal MALE
TCGA-02-0006 Mesenchymal FEMALE
TCGA-02-0010 Neural MALE
TCGA-02-0012 Proneural MALE
#colors
Subtype Classical 255,0,0
Subtype Neural 0,255,0
Subtype Proneural 110,35,180
Subtype Mesenchymal 50,75,120
GENDER MALE 0,0,155
GENDER FEMALE 70,150,70

If that doesn't work for you, feel free to send us your files to igv-team at broadinstitute.org and we can take a look (ignore the auto reply that asks you to contact us at the help forum).

Helga
Reply all
Reply to author
Forward
0 new messages