knitr::opts_chunk$set(fig.cap = NULL, fig.path = params$output_figure)

library(knitr)
library(data.table)
library(ggplot2)
library(ggrepel)
library(GGally)
library(umap)
library(FactoMineR)
library(factoextra)
library(corrplot)
library(viridis)
library(ggpubr)
library(Hmisc)
library(plotly)
library(stringr)
library(bit64)
evidence <- generic_mq_table_reader(upload_folder, 'evidence.txt')
dt <- copy(evidence)

dt <- dt[, .(percent = .N), by = .(`missed cleavages`, `raw file`)]

dt[, `missed cleavages` := as.factor(`missed cleavages`)]
p <- ggplot(dt, aes(x = `raw file`, y = percent,  fill=`missed cleavages`, label=`raw file`)) +
  geom_bar(stat="identity", position=position_fill(reverse = TRUE)) +
  theme_minimal() +
  scale_y_continuous("% missed c leavages", labels = scales::percent) +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.2),
        panel.grid.major.y = element_blank(),
        panel.border = element_blank(),
        axis.ticks.y = element_blank(),
        legend.position = "top"
  ) +
  labs(fill = "Missed\nCleavages") +
  ggtitle("Digestion efficiency")

  ggplotly(p, tooltip = c("y")) %>% config(displayModeBar = T, 
                                           modeBarButtons = list(list('toImage')),
                                           displaylogo = F)


MassDynamics/lfq_processing documentation built on May 4, 2023, 11:20 p.m.