Question: Change the color of the link between 2 features belonging to the same group depending on the type of the link
3
0
Entering edit mode
@tiphaine-martin-6416
Last seen 6.1 years ago
France

Dear Florian,

 

I would like to visualise the link to 2 features. Each feature has color related to their type and the link has the color related to its type.

For example from eQTL:

SNP  has its color 

exon has its color depending on its type, but it can be 5UTR exon, or coding exon, 3UTRexon

the link between SNP and Exon can be for example 2 type cis-eQTL or trans-eQTL.

So I would like to visualise with AnnotationTrack the link between SNP and exon with their specific color for each feature and the color of the link depending on the type

Example of data: chromsosome, start, end, strand, feature, group

chr2 56369 56369 . SNP SNP-exon1
chr2 56450 56526 - exon SNP-exon1
chr2 5639 56450 . cis-EQTL SNP-exon1
chr2 56369 56369 . SNP SNP-5UTR1
chr2 56525 56540 5UTR SNP-5UTR1
chr2 5639 56525 . trans-EQTL SNP-5UTR1

For color:

SNP red
exon orange
5UTR lightorange
cis-EQTL green
trans-EQTL purple

I can create my link between 2 features like a new feature and change this color and size, but maybe it is better way to do that!

How to change the color of link  between 2 features (for example between SNP and exon) depending on their type (fro example cis-eQTL or trans-eQTL)? how to change the size of features as you did for 5UTR from Ensembl data ? is it possible to have different shape depending on the type of feature in the same annotationTrack?

Regards,

Tiphaine

annotationTrack Gviz • 1.3k views
ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

Hi Tiphaine,

you do not really get that much control over the colors of the track items and the lines that connect them. Essentially the package assumes the the connecting lines are either all of the same color, or it automatically derives the color from the first track item. The results of this can be rather erratic sometimes. I do not see a simple solution to expose that level of granularity in the UI. While there is a clear mapping between a track element and its color, things are not that obvious for item group membership, which is the driver for drawing the connecting lines. 

Florian

ADD COMMENT
0
Entering edit mode
@tiphaine-martin-6416
Last seen 6.1 years ago
France

Hi Florian,

I can understand it can be tricky to have simple solution to expose that level of granularity in the UI.

Consequently, I can bypass the group level in considering that the link between 2 objets is a new object with different type. In this case, I can put the color that I would like but I would like to reduce the height of feature as you did for 5UTR and 3UTR in GeneRegionTrack. Of course, I would like to reduce more to see this object more like a line and not a normal object.

Can we change the value of height of object depending on their features as we did for their colors?

I hope that you have a simple solution for this :)

Regards,

Tiphaine

ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
Switzerland

This sound like you may want to consider writing your own plotting logic in a GenericTrack object. I really do not want to start hard-coding to many things in the AnnotationTrack class to support cases for which it wasn't designed in the first place. 

Florian

ADD COMMENT

Login before adding your answer.

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