Description Usage Arguments Value Using the locator with mmnetwork Author(s) Examples
Plots all connected scaffolds in a network plot. Scaffolds can then be highlighted and extracted using the locator and selection features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mm |
(required) A dataframe loaded with |
network |
(required) Paired-end or mate-pair connections between scaffolds in long format. The first and second columns must contain all connected scaffold pairs and the third column the number of connections. |
min_connections |
Filter all scaffold pairs with equal to or less than this number of connections. (Default: |
color_by |
Color the scaffolds by a variable in |
color_scale_log10 |
(Logical) Log10-scale the color gradient when |
locator |
(Logical) When |
selection |
A 2-column dataframe with the x and y coordinates of points with which to draw a polygon onto the plot to highlight a selected region. A selection can be obtained by using the locator feature (by |
highlight_labels |
A dataframe or vector of scaffold names whose labels to highlight in the plot (colored by |
highlight_color |
The color with which to highlight the scaffold labels defined by |
links_scale |
A factor to scale the sizes of the links plotted between scaffolds. (Default: |
scaffold_labels |
Add labels with the scaffold names of all scaffolds. |
print_nolinks |
(Logical) Print the names of all scaffolds with no links to other scaffolds to the console. (Default: |
seed |
Network plots are based on Random Number Generation, and this is used to set a specific random seed (with |
A ggplot object. Note that mmgenome2 hides all warnings produced by ggplot objects.
Unlike a plot generated by mmplot
, the coordinates of points in each dimension in a mmnetwork
plot is not contained within the provided dataframe mm
itself. As such mmnetwork
does not have a corresponding extract function like mmextract
is for mmplot
. Instead, a subset of mm
containing all scaffolds within the selection polygon is available in the returned ggplot object with plot$data_in_selection
.
Kasper Skytte Andersen ksa@bio.aau.dk
Soren M. Karst smk@bio.aau.dk
Mads Albertsen MadsAlbertsen85@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(mmgenome2)
data(mmgenome2)
data(paired_ends)
mmgenome2
selection <- data.frame(
cov_C13.11.25 = c(7.2, 16.2, 25.2, 23.3, 10.1),
cov_C14.01.09 = c(47, 77, 52.8, 29.5, 22.1)
)
mmgenome2_extraction <- mmextract(mmgenome2, selection = selection)
mmgenome2_extraction
p <- mmnetwork(mmgenome2_extraction,
network = paired_ends,
min_connections = 1,
color_by = "taxonomy"
)
p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.