view flatten_mzIdentML.R @ 75:792056ff8ed5 draft

Uploaded
author bornea
date Fri, 02 Sep 2016 16:32:26 -0400
parents 47aa4f551c53
children
line wrap: on
line source

#! /usr/bin/Rscript
ins_check_run <- function() {
  if ("mzID" %in% rownames(installed.packages())){}
  else {
    source("https://bioconductor.org/biocLite.R")
    biocLite('mzID')
  }
  if ('dplyr' %in% rownames(installed.packages())){}
  else {
    install.packages('dplyr', repos='http://cran.us.r-project.org')
  }
}

ins_check_run()
args <- commandArgs(trailingOnly = TRUE)
#source("https://bioconductor.org/biocLite.R")
#biocLite("mzID")
library(mzID)
library(dplyr)
mzResults <- mzID(args[1])
flatresults <- flatten(mzResults)
write.table(flatresults,"flat_mzIdentML.txt",sep="\t",quote=FALSE,row.names=FALSE)