nvelden / geneviewer

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

Option to allow same scale for all clusters? (Genes of the same length from different clusters appeared the same length on the graph). #12

Open ETaSky opened 6 days ago

ETaSky commented 6 days ago

Hello, thank you for such a great and elegant package for plotting gene clusters. I was wondering if it is possible to allow all clusters have the same scale so that genes of the same length in bp will appear as the same length on the graph. This could be quite helpful when comparing highly similar gene clusters (especially from the same taxa), since genes would be almost identical in such case and it is natural that they would appear identical on the graph.

A side effect that may have to be dealt with is that each cluster may have different total lengths and may be difficult to reasonably place them on the graph. But I believe GC_align already have mechanism to deal with this situation?

Thanks!

Jincheng

nvelden commented 5 days ago

Does setting axis_type to "range" achieve the result you are looking for?

GC_chart(
  ophA_clusters, 
  cluster = "cluster",
  group = "class",
  height = "180px"
  ) %>%
  GC_scale(
    axis_type = "range"
  ) %>%
  GC_legend(FALSE)

graph (14)