annotate HumMeth27QCReport/HumMeth27QCReport.R @ 0:55561a945415 default tip

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