ATGC count vs Frequency

PHOTO EMBED

Wed Jan 29 2025 21:06:34 GMT+0000 (Coordinated Universal Time)

Saved by @raiyan

# Check the structure of nucByCycle
glimpse(nucByCycle)

# Create a line plot of cycle vs. count
nucByCycle %>% 
  # Gather the nucleotide letters in alphabet and get a new count column
  pivot_longer(-cycle, names_to = "alphabet", values_to = "count") %>% 
  ggplot(aes(x = cycle, y = count, color = alphabet)) +  # Fill in missing values
  geom_line(size = 0.5 ) +
  labs(y = "Frequency") +
  theme_bw() +
  theme(panel.grid.major.x = element_blank())
content_copyCOPY