path <- system.file("extdata", "virushunter.tsv", package = "Virusparies")
file <- ImportVirusTable(path)
# Basic plot
plot <- VhgIdentityScatterPlot(file,cutoff = 1e-5)
plot(plot$plot)
# Custom plot with additional arguments
custom_plot <- VhgIdentityScatterPlot(file,
cutoff = 1e-5,
theme_choice = "dark",
cut_colour = "blue",
title = "Custom Scatter Plot",
title_size = 18,
title_face = "italic",
title_colour = "darkred",
subtitle = "Custom Subtitle",
subtitle_size = 14,
subtitle_face = "italic",
subtitle_colour = "purple",
xlabel = "Custom X Label",
ylabel = "Custom Y Label",
axis_title_size = 14,
xtext_size = 12,
ytext_size = 12,
legend_title = "Custom Legend",
legend_position = "top",
legend_title_size = 14,
legend_title_face = "italic",
legend_text_size = 12)
plot(custom_plot$plot)
# import gatherer files
path2 <- system.file("extdata", "virusgatherer.tsv", package = "Virusparies")
vg_file <- ImportVirusTable(path2)
# vgplot: virusgatherer plot with ViralRefSeq_taxonomy as custom grouping
vgplot <- VhgIdentityScatterPlot(vg_file,groupby = "ViralRefSeq_taxonomy")
vgplot$plot
# plot as bubble plot with contig length as size
vgplot_con <- VhgIdentityScatterPlot(vg_file,groupby = "ViralRefSeq_taxonomy",
conlen_bubble_plot = TRUE,contiglen_breaks = 4,legend_position = "right")
vgplot_con
Run the code above in your browser using DataLab