Strand colour from BED file in IGV
1
0
Entering edit mode
5.3 years ago

Anyone know how I can change the feature colour of a track (BED file) based on strand orientation?

Example: chr 1 100 feature1 0 + chr 1 100 feature1 0 -

I want to colour the "+" feature RED and the "-" feature BLUE

Thanks a lot!

sequence • 3.7k views
ADD COMMENT
0
Entering edit mode

This is a question, not a forum discussion. I'll make the appropriate changes, but please be more careful in the future.

ADD REPLY
0
Entering edit mode

Thank you! and sorry!

ADD REPLY
0
Entering edit mode
5.3 years ago
Dan D 7.3k

Look here at the third example. You can set a line in the header of your BED file to automatically color by strand. IGV should pick that up IIRC.

ADD COMMENT
1
Entering edit mode

Thank you very much! The head of example 3 didn't function for me (I think that work only for Genome Browser), but with your information I could found that is possible to create a BED 9 file in where the last column have the colour in RGB. I only put as head the next: "track itemRgb=On"

     example
     track itemRgb=On
     chr    1000    2000    neg 0   -   1000    2000    "167,203,104"

So, I have the colour (of my option) for each strand (or each feature of BED file)

Grettings!

ADD REPLY
0
Entering edit mode

This was very helpful, thank you!

For anyone else who finds this - just delete the first line that says "example", and change the "chr" to an actual chromosome record name and this example will work.

Also, note that for this to work with your own data, you do need to have values in columns 7 & 8 (thickStart and thickEnd, respectively - see the BED format specification).

ADD REPLY

Login before adding your answer.

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