-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancements: seq breaks symbols and scale #85
Comments
Definitely good ideas! Challenge accepted ;) I'm still playing around with some ideas. Would be curious about your thoughts on the following: gggenomes(emale_genes, emale_seqs) %>% focus(name=="MCP") +
geom_seq() + geom_gene() + geom_gene_tag(aes(label=name)) +
geom_break() + # add // add ends of truncated seqs (alternatively: geom_seq(breaks=TRUE))
geom_scale_bar() + no_x_axis() # add a scale bar |
Looks good! I'm not sure about the Regarding the scale bar, it also looks very good! Here I link the Thank you for your interest! |
You don't necessarily need
gggenomes also uses a custom theme (
Suppressing the axis could be made part of |
Ah I see, now makes sense to me to have Regarding the scale bar, my two cents: ... +
theme_gggenomes_scalebar() ? |
Thank you for taking the time to give feedback! Really appreciated. The theme option sounds good! I'll try to add this to the next release. |
I assume the following feature request is not trivial at all, but have you considered library(gggenomes)
s0 <- tibble(
gene_id = letters[1:6],
bin_id = c("A", "A", "B", "B", "B", "B"),
seq_id = factor(c("A1", "A1", "B1", "B1", "B2", "B2"), levels = c("A1", "B2", "B1")), # set factor to order contigs
feat_id = c("a1","a2","b3", "b4", "b1", "b2"),
start = c(1, 20, 1, 50, 1, 20),
end = c(10, 30, 40, 70, 10, 30),
strand = c(1, 1, 1, 1, 1, 1),
length = c(1000, 1000, 1000, 1000, 1000, 1000)
)
gggenomes(s0) +
geom_seq() +
gggenomes:::geom_gene2() +
coord_polar() # +
# facet_wrap(~bin_id) but I guess is experimental and there's a lot to work with to make it stable and user friendly, isn't it? |
I've opened this as a separate issue so I can easier keep track |
Hi again!
Not reporting a bug, just to suggest a couple of enhancements for future releases.
To be able to add seq breaks symbols as in this comment (two parallel lines ~45 degrees at the beginning/end of each break).
To be able to draw a scale but not the whole x axis. This is specially useful when using
focus()
since it doesn't make sense to draw an axis for truncated contigs. Instead, using a small scale to compare relative sizes as usually done in phylogeny figures would be nice. For example seeggtree::geom_treescale
. It is probably possible using ggplot2 magic, but it would be nice to have an example in the documentation.Sorry for the spam :P
Bests!
The text was updated successfully, but these errors were encountered: