view flatten_mzIdentML.R @ 76:43b9bad147df draft

Uploaded
author bornea
date Fri, 02 Sep 2016 21:41:30 -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)