col.interactions.types for gviz InteractionTrack from the GenomicInteractions
2
0
Entering edit mode
@marco-blanchette-17000
Last seen 7 months ago
US/Santa Cruz/Dovetail Genomics

Dear all, I'm trying to figure out how to use the col.interactions.types parameters from the GenomicInteractions package to specifically color annotated interactions in the gviz plots. Here' s a little snippet showing how I annotate the interactions.

annotateInteractions(interactions,list(promoter=proms,enhancer=SE))
interaction_track <- InteractionTrack(interactions,name='HiC',chromosome = chr)
displayPars(interaction_track)  <- list(col.interactions="lightblue",
                                        col.interactions.types=c('promoter-distal'='red'))

I tryied to use

displayPars(interaction_track)  <- list(col.interactions="lightblue",
                                        col.interactions.types=c(pd='red'))

or

displayPars(interaction_track)  <- list(col.interactions="lightblue",
                                        col.interactions.types=c(is.pd='red'))

with not success. I'm not sure what names in the named vector are recognized. Any help would be appreciated.

thanks

GenomicInteractions gviz • 1.4k views
ADD COMMENT
0
Entering edit mode
@lizingsimmons-6935
Last seen 4.1 years ago
Germany

Hi Marco,

There is a typo in the name of the display parameter you're setting - it should be col.interaction.types. If this is present in the documentation or vignettes, let me know and I will fix it!

This uses the interaction types as shown by categoriseInteractions(), so you can always use that function to check what the interaction types are called. You can also use GenomicInteractions::availableDisplayPars to check which other displayPars you can set.

Hope you're finding the package helpful!

ADD COMMENT
0
Entering edit mode
@lizingsimmons-6935
Last seen 4.1 years ago
Germany

Hi Marco,

There is a typo in the name of the display parameter you're setting - it should be col.interaction.types. If this is present in the documentation or vignettes, let me know and I will fix it!

This uses the interaction types as shown by categoriseInteractions(), so you can always use that function to check what the interaction types are called. You can also use GenomicInteractions::availableDisplayPars to check which other displayPars you can set.

Hope you're finding the package helpful!

ADD COMMENT
0
Entering edit mode

Cool! Working now!! Yes, there's a typo in the InteractionTrack-class package documentation and the online PDF. Any chance the interaction specified in col.interaction.types could be plotted first? in the example below, the reds on top of the light blues.

enter image description here

ADD REPLY
0
Entering edit mode

Alright, the typo should now be fixed both in release and devel, although it'll take a day or two for the changes to propagate. Sorry about that and thanks for noticing it!

The interactions are plotted in order of their start coordinate. To be honest I didn't write this part of the code and I'm not sure if it'd be possible to change the order in which they are plotted. I don't think there's a quick fix to this, but we will bear it in mind for future development.

ADD REPLY

Login before adding your answer.

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