This function creates a circular genome map for a single phage, displaying gene annotations, functional categories, and other genomic features. It automatically extracts topology information and provides flexible parameter customization.
plot_one_phage(
one_phage,
genomad_out_res,
anno_table = NULL,
y_var = "strand",
fill_var = "COG",
label_var = c("annotation_description"),
label_wrap = 20,
palette = "Set3"
)A ggplot object displaying the circular phage genome map.
Character. Phage sequence identifier (e.g., "k141_10408").
List. Output object from pre_genomad function containing virus summary and gene data.
Data frame. Optional annotation table with gene information for left join. Must contain a 'gene' column for merging with genomad gene data.
Character. Variable for y-axis mapping. Default is "strand".
Character. Variable for fill color mapping. Default is "COG".
Character vector. Columns to use for gene description labels.
Integer. Width for wrapping gene description labels. Default is 20.
Character. Color palette for fill categories. Default is "Set3".
The function automatically extracts topology information from the virus summary data and creates a polar coordinate visualization showing:
Gene arrows indicating direction and position
Flexible y-axis and fill color mappings
Genome length and automatically detected topology information
Gene descriptions with intelligent label placement