comparison qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.R @ 0:8933ecfb6ab2 default tip

Uploaded
author jiechenable1987
date Fri, 24 Feb 2012 17:42:16 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8933ecfb6ab2
1 #! /soft/general/R-2.13.0/bin/Rscript
2 rm(list=ls(all=TRUE))
3
4 ########################################################################
5 # HumMeth27QCReport.R a parser of the HumMeth27QCReport R package
6 # Copyright (C) 2011 Andreu Alibes (aalibes@gmail.com)
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ########################################################################
21
22
23
24 ##First read in the arguments listed at the command line
25 args=(commandArgs(TRUE))
26
27 ##args is now a list of character vectors
28 ## First check to see if arguments are passed.
29 ## Then cycle through each element of the list and evaluate the expressions.
30 if(length(args)==0){
31 print("No arguments supplied.")
32 ##supply default values
33 Directory = ""
34 Plat = ""
35 pvalue = ""
36 chrom = ""
37 method = ""
38 } else {
39 # print(args)
40 for(i in 1:length(args)){
41 eval(parse(text=args[[i]]))
42 }
43 }
44
45 library("HumMeth27QCReport")
46 Dir <- Directory
47 ImportDataR <- ImportData(Dir)
48 normMvalues <- HumMeth27QCReport(ImportDataR, platform = Plat, pval = pvalue, ChrX = chrom, ClustMeth=method)