igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
644 stars 387 forks source link

Color GFF features by type (was: GFF feature rendering improvements) #1243

Open rosema62 opened 2 years ago

rosema62 commented 2 years ago

It would be good if desktop IGV could render features in a GFF file in specified colors depending on the feature type. It would also be good if a feature label could be directly visible on the feature without having to click on it.

Thanks

jrobinso commented 2 years ago

To see a feature label set a "Name" property in column 9.

rosema62 commented 2 years ago

Ahh. My GFF's ids are labeled "label" not "Name". Thanks, that did the trick.

jrobinso commented 2 years ago

Good, glad that worked, its part of the GFF specification

**Name A**   display name for the feature
jrobinso commented 2 years ago

I'm going to rename this for the color suggestion

malcook commented 2 years ago

Would you consider to generalize it to "Color feature by GFF attribute" (including those possibly encdoded in bed/bigbed Name field using #gffTags )???

jrobinso commented 2 years ago

Yes, I think it could just be "color by attribute" and work like color-by-sam-tag for alignments, you type in the attribute name. Certain standard column names, like "type", maybe "source", could pose a conflict if those attributes were also present in column 9. However it would work reasonably well for most files.