Skip to content

Commit

Permalink
updated front page example
Browse files Browse the repository at this point in the history
  • Loading branch information
thackl committed Oct 14, 2023
1 parent a940e7c commit cb4344c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gggenomes
Title: A Grammar of Graphics for Comparative Genomics
Version: 0.9.9.9000
Version: 0.9.10.9000
Authors@R: c(
person("Thomas", "Hackl", email = "[email protected]", role = c("aut", "cre")),
person("Markus J.", "Ankenbrand", email = "[email protected]", role = c("aut")),
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## A grammar of graphics for comparative genomics

gggenomes is a versatile graphics package for comparative genomics. It extends the popular R visualization package[ggplot2](https://ggplot2.tidyverse.org/) by adding dedicated plot functions for genes, syntenic regions, etc. and verbs to manipulate the plot to, for example, quickly zoom in into gene neighborhoods.
gggenomes is a versatile graphics package for comparative genomics. It extends the popular R visualization package [ggplot2](https://ggplot2.tidyverse.org/) by adding dedicated plot functions for genes, syntenic regions, etc. and verbs to manipulate the plot to, for example, quickly zoom in into gene neighborhoods.

## A realistic use case comparing six viral genomes

Expand All @@ -16,25 +16,25 @@ library(gggenomes)
# to inspect the example data shipped with gggenomes
data(package="gggenomes")

gggenomes(emale_genes, emale_seqs, emale_tirs, emale_ava) %>%
add_feats(ngaros=emale_ngaros, gc=emale_gc) %>%
add_sublinks(emale_prot_ava) %>%
flip_by_links() +
gggenomes(
genes = emale_genes, seqs = emale_seqs, links = emale_ava,
feats = list(emale_tirs, ngaros=emale_ngaros, gc=emale_gc)) |>
add_sublinks(emale_prot_ava) |>
sync() + # synchronize genome directions based on links
geom_feat(position="identity", size=6) +
geom_seq() +
geom_link(data=links(2)) +
geom_bin_label() +
geom_gene(aes(fill=name)) +
geom_gene_tag(aes(label=name), nudge_y=0.1, check_overlap = TRUE) +
geom_feat(data=feats(ngaros), alpha=.3, size=10, position="identity") +
geom_feat_note(aes(label="Ngaro-transposon"), feats(ngaros),
geom_feat_note(aes(label="Ngaro-transposon"), data=feats(ngaros),
nudge_y=.1, vjust=0) +
geom_ribbon(aes(x=(x+xend)/2, ymax=y+.24, ymin=y+.38-(.4*score),
group=seq_id, linetype="GC-content"), feats(gc),
fill="lavenderblush4", position=position_nudge(y=-.1)) +
geom_wiggle(aes(z=score, linetype="GC-content"), feats(gc),
fill="lavenderblush4", position=position_nudge(y=-.2), height = .2) +
scale_fill_brewer("Genes", palette="Dark2", na.value="cornsilk3")

ggsave("man/figures/emales.png", width=8, height=4)
ggsave("emales.png", width=8, height=4)
```

For a reproducible recipe describing the full *evolution* of an earlier version of this plot with an older version of gggenomes starting from a mere set of contigs, and including the bioinformatics analysis workflow, have a look at [From a few sequences to a complex map in
Expand Down
Binary file modified man/figures/emales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb4344c

Please sign in to comment.