Comments (4)
You mean zoom in on the second genome so it becomes larger on the plot? Hm, I can't think of anything that would be very easy.
Of the top of my head I can think of two maybe options:
- What would be possible is to break up the long contig, i.e. only show the regions with some space around that actually align.
focus()
on links can do that automatically (let me know if you want try something like that but don't know how). - Manually scale the coordinates of one of the genomes. Something like multiplying every length, start and end column in for Xtrop_Chr1 in gAll, sAll and tblastx_tibble by 10 or so.
from gggenomes.
Thanks, I think that I will probe the the second solution. But In case I need to do a zoom in some regions, How I can do it?
from gggenomes.
Here's a minimal example that you might be able to adapt for your case.
library(gggenomes)
g0 <- tribble(
~seq_id, ~start, ~end,
"A", 100, 200,
"A", 10000, 10100,
"B", 100, 200,
"B", 300, 500
)
# clusters are just a faster way for manually creating links
c0 <- tribble(
~cluster_id, ~feat_id,
"cls1", "f1",
"cls1", "f3",
"cls2", "f2",
"cls2", "f4")
p1 <- gggenomes(g0) %>%
add_clusters(links=c0) +
geom_seq() +
geom_gene() +
geom_link() +
geom_gene_tag(aes(label=feat_id))
p1
# zoom in on loci with links, group links less than 200 apart, show 200 flank
# you may have to play with those values
p1 %>%
focus(.track_id=links, .max_dist = 200, .expand=200) +
geom_seq_label()
# and add nice locus labels that indicate start/end of regions
p1 %>%
focus(.track_id=links, .max_dist = 200, .expand=200,
.locus_id=str_glue("{seq_id}:{start}-{end}")) +
geom_seq_label()
# scaling up B 25 times - not sure how much sense this representation makes, though...
g_scaled <- g0 %>%
mutate(across(c(start, end), ~ifelse(str_detect(seq_id, "B"), .x * 25, .x)))
gggenomes(g_scaled) %>% add_clusters(c0) + geom_seq() + geom_gene() + geom_link()
from gggenomes.
Thanks a lot!!!
from gggenomes.
Related Issues (20)
- geom_link new error HOT 2
- Strand error when call gggenome()
- Submission for JOSS?
- Errror while installing HOT 1
- ggplot2 error using example data HOT 6
- Installation error HOT 3
- fill and fontface otions for geom_gene_label HOT 4
- Move deps from Depends to Imports? HOT 1
- Adding UTRs in the plot HOT 3
- Genes do not start and end at the expected positions HOT 2
- Setting coordinates to visualise part of the genome HOT 1
- shitf() "unused argument" HOT 2
- geom_gene() doesn't work HOT 5
- Errors when running read_feats command HOT 3
- Change space between seqs within the same bin HOT 5
- Changing gene colours HOT 2
- ! Required column(s) missing: • length HOT 2
- breaks to sequences with geom_break() HOT 1
- Error in read_feats HOT 4
- Draw a combined plot with ggtree and gggenomes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gggenomes.