Guest User

Untitled

a guest
Jul 20th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. foo <- (data.table::fread('./evidence.txt', select = c('Retention time','Modified sequence', 'Charge', 'Experiment')))
  2. foo2 <- data.matrix((tidyr::spread(foo[!isdup], Experiment, `Retention time`))[,3:14])
  3. foo_numnas <- rowSums(!is.na(foo2))
  4. foo2 <- foo2[foo_numnas > 1,]
  5. foo2 <- cbind(foo2-rowMeans((foo2), na.rm = TRUE) ,rowMeans((foo2), na.rm = TRUE))
  6. colnames(foo2)[ncol(foo2)] <- 'MeanRT'
  7. tidyRTs <- (tidyr::gather(as.data.frame(foo2), -MeanRT, key = 'variable', val = 'value'))
  8.  
  9. ggplot2::ggplot(tidyRTs, ggplot2::aes(x = MeanRT, y = value)) +
  10. ggplot2::geom_bin2d() +
  11. ggplot2::facet_wrap(. ~ variable) +
  12. ggplot2::lims(y = c(-3,3))
Add Comment
Please, Sign In to add comment