#!/usr/bin/env Rscript
library(tidyverse)
args <- commandArgs(trailingOnly = TRUE) # c("results/fasta_stats.tsv", "results/fasta_stats.png")
stats <- read_tsv(args[1])
p <- ggplot(stats, aes(x = file, y = gc_percent)) +
geom_col() +
labs(x = NULL, y = "GC content (%)") +
theme_minimal()
ggsave(args[2], p, width = 8, height = 4)
cat("Wrote", args[2], "\n")