66
|
1 #! /usr/bin/Rscript
|
74
|
2 ins_check_run <- function() {
|
|
3 if ("mzID" %in% rownames(installed.packages())){}
|
|
4 else {
|
|
5 source("https://bioconductor.org/biocLite.R")
|
|
6 biocLite('mzID')
|
|
7 }
|
|
8 if ('dplyr' %in% rownames(installed.packages())){}
|
|
9 else {
|
|
10 install.packages('dplyr', repos='http://cran.us.r-project.org')
|
|
11 }
|
|
12 }
|
|
13
|
|
14 ins_check_run()
|
66
|
15 args <- commandArgs(trailingOnly = TRUE)
|
|
16 #source("https://bioconductor.org/biocLite.R")
|
|
17 #biocLite("mzID")
|
|
18 library(mzID)
|
|
19 library(dplyr)
|
|
20 mzResults <- mzID(args[1])
|
|
21 flatresults <- flatten(mzResults)
|
|
22 write.table(flatresults,"flat_mzIdentML.txt",sep="\t",quote=FALSE,row.names=FALSE) |