TickingClock1992 / RIdeogram

154 stars 23 forks source link

color within the ideogram || ancestry #16

Closed complexgenome closed 3 years ago

complexgenome commented 4 years ago

hi there, thanks for this package.

This is really great. I'm interested to create graphics to display ancestry information, something like https://github.com/jordanlab/tagore

Is this something that can be achieved?

Thanks

TickingClock1992 commented 4 years ago

Yes, of course. For example, you have three kinds of ancestry information types. Set three colors by colorset1 = c("#66c2a5", "#fc8d62", "#8da0cb"), and confer the three ancestry information types with values of "1", "2", and "3" in the overlaid file.

For example:

require(RIdeogram)

gene_density$Value <- sample(1:3, nrow(gene_density), replace = TRUE)
LTR_density$Value <- sample(1:3, nrow(gene_density), replace = TRUE)

ideogram(karyotype = human_karyotype, overlaid = gene_density, label = LTR_density, label_type = "heatmap", colorset1 = c("#66c2a5", "#fc8d62", "#8da0cb"), colorset2 = c("#66c2a5", "#fc8d62", "#8da0cb")) 
convertSVG("chromosome.svg", device = "png")

Then, you can get this: ancestry-information

If you have four types, then set four different colors and "1", "2", "3", and "4".

liufy11 commented 3 years ago

en, I can create graphics to display ancestry information, but how to change the legend ? I want the legend to be one color for one ancestry type ,not in heatmap format.

TickingClock1992 commented 3 years ago

Sorry, there is still no parameter for that in this version. I do suggest you modify the picture in AI or PS.

Best,


Zhaodong Hao

Key Laboratory of Forest Genetics and Biotechnology Ministry of Education of China College of Forestry Nanjing Forestry University Nanjing 210037 China

在 2020年11月5日,下午7:20,liufy11 notifications@github.com 写道:

en, I can create graphics to display ancestry information, but how to change the legend ? I want the legend to be one color for one ancestry type ,not in heatmap format.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/TickingClock1992/RIdeogram/issues/16#issuecomment-722315020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7IR5P2MAYQKHUVVY6DXTLSOKC6JANCNFSM4POGCIQQ.