nvelden / geneviewer

An R package designed for drawing gene arrow maps
https://nvelden.github.io/geneviewer/
Other
19 stars 0 forks source link

Links #8

Open Jessica1080 opened 5 days ago

Jessica1080 commented 5 days ago

Hi,

I'm trying to understand the GC_links( ) function a bit better and it looks like the example charts on the GC_links page don't reflect the changes in code.

When you use the GC_links function with blast results - I understand that it pulls from either the similarity or identity and these are the displayed percentages, but what determines the colors of the link? Some are grey and some are red in the examples...maybe I missed it somewhere, but is there a threshold value that switches the link from red/grey?

Thanks so much!

nvelden commented 4 days ago

The grey color indicates genes that are in the same orientation between clusters. The red color indicates genes that are inverted (in the reverse orientation). If you want to change the color for each, you can use the normal_color and inverted_color variables. These variables can accept hex color codes (e.g., #969696 for grey) as well as normal color names (e.g., "grey").

In the example below, all links are colored grey based on their identity values.

GC_chart(
  erythromycin_BlastP,
  cluster = "cluster"
) %>%
  GC_links(
    "BlastP",
    measure = "identity", # none / similarity
    normal_color = "#969696",
    inverted_color = "#969696",
  )

For all options see the GC_links documentation: