Jumbo Phages

Published

March 30, 2024

Bacteriophage host

Bacteriophages in the NCBI are associated with 329 different hosts. Most of the bacteriophages are linked to Mycobacterium (3123), followed by Escherichia (2559), Pseudomonas (1644) and Salmonella (1384). Additionally, for a big portion of the phages (3061) the host is unknowm.


Show the code
library(tidyverse)


df <- read_tsv("rawdata/clean_genomes_data.tsv") %>%
    select(host) %>%
    count(host) %>%
    filter(n > 100) %>%
    arrange(n) %>%
    mutate(host = factor(host, host))

df %>%
    ggplot(aes(
        x = n,
        y = host
    )) +
    geom_segment(
        aes(
            x = 0,
            xend = n,
            y = host,
            yend = host
        ),
        color = ifelse(df$host %in% "Mycobacterium", "orange", "black"),
        linewidth = ifelse(df$host %in% "Mycobacterium", 1.3, 0.7)
    ) +
    geom_point(
        size = 3,
        color = ifelse(df$host %in% "Mycobacterium", "orange", "black")
    ) +
    scale_x_continuous(
        expand = c(0, 0),
        limits = c(0, 3400),
        breaks = seq(0, 3300, 300)
    ) +
    labs(
        x = "Number of bacteriophages",
        y = "Bacteriophage host"
    ) +
    theme(
        axis.text.y = element_text(
            size = 12,
            face = "italic"
        ),
        axis.text.x = element_text(size = 15),
        axis.title.x = element_text(
            size = 20,
            face = "bold"
        ),
        axis.title.y = element_text(
            size = 20,
            face = "bold"
        ),
        panel.background = element_blank(),
        panel.grid.minor = element_line(
            color = "grey",
            linetype = 2
        ),
        legend.position = "none"
    )