fgcz / rawDiag

Brings Orbitrap mass spectrometry data to life; multi-platform, fast and colorful R package
https://bioconductor.org/packages/rawDiag
36 stars 11 forks source link

ggplots for QCs #44

Open cpanse opened 5 years ago

cpanse commented 5 years ago
    gp <- ggplot(data = df, aes(x = log(abundance,10), y = log(intensity,10), fill=filename)) + 
      geom_point(stat='identity', size = 2, aes_string(group = "filename", colour = "filename")) +
      geom_smooth(method = "lm", se = FALSE, aes_string(group = "filename", colour = "filename")) +
      #geom_text(x = -2, y = 7, label = lm_eqn_promega(df), parse = TRUE, aes_string(group = "filename", colour = "filename")) +
      facet_wrap(~ sequence * filename,  scales = "free", nrow = 6)

and

  gp <- ggplot(data = df, aes(x = rt, y = t, fill=filename)) + 
      xlab("iRT score") + 
      ylab("retention time [minutes]") +
      geom_point(stat='identity', size = 2, ) +
      geom_smooth(method = "lm", se = FALSE, aes_string(group = "filename", colour = "filename")) 

    if (input$plottype == "trellis") {
      gp <- gp + 
        #geom_text(x = 0, y = median(df$t), label = lm_eqn(df), parse = TRUE) +
        #geom_text(x = -2, y = 7, label = lm_eqn(df), parse = TRUE, aes_string(group = "filename", colour = "filename")) +
        facet_wrap(~filename, ncol = 1,  scales = "free")
    }

    gp <- gp + scale_fill_manual(values = cbbPalette) 
cpanse commented 5 years ago

http://fgcz-ms.uzh.ch/~cpanse/autoQC4L.html#32_visualization_of_the_models