changeset 0:8933ecfb6ab2 default tip

Uploaded
author jiechenable1987
date Fri, 24 Feb 2012 17:42:16 -0500
parents
children
files qcma-55561a945415/.hg_archival.txt qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.R qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.py qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.xml qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.xml~ qcma-55561a945415/HumMeth27QCReport/README.txt
diffstat 6 files changed, 275 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/.hg_archival.txt	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,5 @@
+repo: 55561a945415eba8ee6e8ad81a0d6f68bd91b873
+node: 55561a945415eba8ee6e8ad81a0d6f68bd91b873
+branch: default
+latesttag: null
+latesttagdistance: 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.R	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,48 @@
+#! /soft/general/R-2.13.0/bin/Rscript 
+rm(list=ls(all=TRUE))
+
+########################################################################
+# HumMeth27QCReport.R a parser of the HumMeth27QCReport R package
+# Copyright (C) 2011  Andreu Alibes (aalibes@gmail.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+########################################################################
+
+
+
+##First read in the arguments listed at the command line
+args=(commandArgs(TRUE))
+
+##args is now a list of character vectors
+## First check to see if arguments are passed.
+## Then cycle through each element of the list and evaluate the expressions.
+if(length(args)==0){
+    print("No arguments supplied.")
+    ##supply default values
+    Directory = ""
+    Plat = ""
+    pvalue = ""
+    chrom = ""
+    method = ""
+} else {
+#   print(args)
+    for(i in 1:length(args)){
+         eval(parse(text=args[[i]]))
+    }
+}
+
+library("HumMeth27QCReport")
+Dir <- Directory
+ImportDataR <- ImportData(Dir)
+normMvalues <- HumMeth27QCReport(ImportDataR, platform = Plat, pval = pvalue, ChrX = chrom, ClustMeth=method)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.py	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,86 @@
+# Based on rgQC.py by ross lazarus (Version from 20100914)
+
+########################################################################
+# HumMeth27QCReport.py a parser of the HumMeth27QCReport R package
+# Copyright (C) 2011  Andreu Alibes (aalibes@gmail.com)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+########################################################################
+from optparse import OptionParser
+import os, sys
+
+if __name__ == "__main__":
+    u = """ called in xml as
+   <command interpreter="python">
+        HumMeth27QCReport.py -a '$inputAVE' -c '$inputCTRL' -s '$inputSAMPLE' -d '$inputDISC' -l '$platform' -v '$pval' -m '$ClustMethod' -x '$ChrX' 
+-1 '$oQualityCheck' -2 '$oSample' -3 '$oInternalControl' -4 '$oExplorativeAnalysis' -5 '$oNormalizedMvalues' -6 '$oQC_Analysis' -p '$oQualityCheck.files_path'
+  </command>
+
+    """
+    progname = os.path.basename(sys.argv[0])
+    if len(sys.argv) < 14:
+        print '%s requires at least 14 parameters - got %d = %s' % (progname,len(sys.argv),sys.argv)
+        sys.exit(1)
+    parser = OptionParser(usage=u, version="%prog 0.01")
+    a = parser.add_option
+    a("-a","--avefile",dest="avefile")
+    a("-c","--ctrfile",dest="ctrfile")
+    a("-s","--smplfile",dest="smplfile")
+    a("-d","--discfile",dest="discfile")
+    a("-l","--platf",dest="platf")
+    a("-v","--pval",dest="pval")
+    a("-m","--clustmethd",dest="clustmethd")
+    a("-x","--chrx",dest="chrx")
+    a("-1","--oQualityCheck",dest="oQualityCheck")
+    a("-2","--oSample",dest="oSample")
+    a("-3","--oInternalControl",dest="oInternalControl")
+    a("-4","--oExplorativeAnalysis",dest="oExplorativeAnalysis")
+    a("-5","--oNormalizedMvalues",dest="oNormalizedMvalues")
+    a("-6","--oQC_Analysis",dest="oQC_Analysis")
+    a("-p","--patho",dest="newfpath")        
+
+    (options,args) = parser.parse_args()
+    avefile = options.avefile
+    ctrfile = options.ctrfile
+    smplfile = options.smplfile
+    discfile = options.discfile
+    platf = options.platf
+    pval = options.pval
+    clustmethd = options.clustmethd
+    chrx = options.chrx
+    oQualityCheck = options.oQualityCheck
+    oSample = options.oSample
+    oInternalControl = options.oInternalControl
+    oExplorativeAnalysis = options.oExplorativeAnalysis
+    oNormalizedMvalues = options.oNormalizedMvalues
+    oQC_Analysis = options.oQC_Analysis
+
+    newfpath = options.newfpath
+    newfpath = os.path.realpath(newfpath)
+    try:
+       os.makedirs(newfpath)
+    except:
+       pass
+    try:
+       os.system("cp " + avefile + " " + newfpath+"/AvgBeta.txt")
+       os.system("cp " + ctrfile + " " + newfpath+"/Control.txt")
+       os.system("cp " + smplfile + " " + newfpath+"/Sample.txt")
+       if(discfile != 'None'):
+          os.system("cp " + discfile + " " + newfpath+"/Discard.txt")
+
+       execstring = "/data/apache/galaxy.test.crg/htdocs/galaxy-dist/tools/CRG-Tools/HumMeth27QCReport.R \"Directory=\'"+newfpath+"\'\" \"Plat=\'"+platf+"\'\" \"pvalue=\'"+pval+"\'\" \"chrom=\'"+chrx+"\'\" \"method=\'"+clustmethd+"\'\"" 
+       os.system(execstring + " 2> /dev/null")
+       os.system("cd " + newfpath + "; mv Sample.pdf " + oSample + "; mv InternalControl.pdf " + oInternalControl + ";mv QualityCheck.pdf " + oQualityCheck + ";mv ExplorativeAnalysis.pdf " + oExplorativeAnalysis + ";mv NormalizedMvalues.txt " + oNormalizedMvalues + ";mv  QC_Analysis.xls " + oQC_Analysis )
+    except:
+       pass 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.xml	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,64 @@
+<tool id="qcma" name="HumMeth27QCReport" version="1.0">
+  <description>Quality Control for a methylation array</description>
+   <command  interpreter="python">
+      HumMeth27QCReport.py -a '$inputAVE' -c '$inputCTRL' -s '$inputSAMPLE' -d '$inputDISC' -l '$platform' -v '$pval' -m '$ClustMethod' -x '$ChrX' -1 '$oQualityCheck' -2 '$oSample' -3 '$oInternalControl' -4 '$oExplorativeAnalysis' -5 '$oNormalizedMvalues' -6 '$oQC_Analysis' -p '$oQualityCheck.files_path'
+  </command>
+
+  <inputs>
+
+    <param format="tabular" name="inputAVE" type="data" label="Average Beta file"/>
+    <param format="tabular" name="inputCTRL" type="data" label="Control file"/>
+    <param format="tabular" name="inputSAMPLE" type="data" label="Samples Name file"/>
+    <param format="tabular" name="inputDISC" type="data" label="Discarder file" optional="true" />
+
+    <param name="platform" type="select" format="text" label="Type of Illumina Infinium BeadChip methylation array">
+     <option value="Hum27">Infinium HumanMethylation27 BeadChip</option>
+     <option value="Hum450">Infinium HumanMethylation450 BeadChip</option>
+    </param>
+
+    <param name="pval" type="select" format="text" label="p-value threshold number" help="to define which samples keep for the normalization and the following analysis">
+     <option value="0.01">0.01</option>
+     <option value="0.02">0.02</option>
+     <option value="0.03">0.03</option>
+     <option value="0.04">0.04</option>
+     <option value="0.05">0.05</option>
+     <option value="0.06">0.06</option>
+     <option value="0.07">0.07</option>
+     <option value="0.08">0.08</option>
+     <option value="0.09">0.09</option>
+     <option value="0.10">0.10</option>
+    </param>
+
+    <param name="ClustMethod" type="select" format="text" label="Distance measure to be used for clustering">
+     <option value="euclidean">euclidean</option>
+     <option value="maximum">maximum</option>
+     <option value="manhattan">manhattan</option>
+     <option value="canberra">canberra</option>
+     <option value="binary">binary</option>
+     <option value="pearson">pearson</option>
+     <option value="correlation">correlation</option>
+     <option value="spearman">spearman</option>
+     <option value="kendall">kendall</option>
+    </param>
+    <param name="ChrX" type="select" format="text" label="Delete CpGs from chromosome X?">
+     <option value="FALSE">No</option>
+     <option value="TRUE">Yes</option>
+    </param>
+  </inputs>
+  <outputs>
+       <data format="pdf" name="oQualityCheck" label="QualityCheck"/>
+       <data format="pdf" name="oSample" label="Sample"/>
+       <data format="pdf" name="oInternalControl" label="InternalControl"/>
+       <data format="pdf" name="oExplorativeAnalysis" label="ExplorativeAnalysis"/>
+       <data format="text" name="oNormalizedMvalues" label="NormalizedMvalues"/>
+       <data format="xls" name="oQC_Analysis" label="QC_Analysis"/>
+   </outputs>
+
+
+  <help>
+This tool is a Quality Control for Illumina Infinium methylation arrays. It uses an R package (HumMeth27QCReport) created by 
+Francesco Mancuso and Guglielmo Roma from the Bioinformatics core at the Center for Genomic Regulation in Barcelona.
+Help: http://biocore.crg.cat/wiki/HumMeth27QCReport and francesco.mancuso@crg.eu
+  </help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/HumMeth27QCReport/HumMeth27QCReport.xml~	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,64 @@
+<tool id="qcma" name="HumMeth27QCReport">
+  <description>Quality Control for a methylation array</description>
+   <command  interpreter="python">
+      HumMeth27QCReport.py -a '$inputAVE' -c '$inputCTRL' -s '$inputSAMPLE' -d '$inputDISC' -l '$platform' -v '$pval' -m '$ClustMethod' -x '$ChrX' -1 '$oQualityCheck' -2 '$oSample' -3 '$oInternalControl' -4 '$oExplorativeAnalysis' -5 '$oNormalizedMvalues' -6 '$oQC_Analysis' -p '$oQualityCheck.files_path'
+  </command>
+
+  <inputs>
+
+    <param format="tabular" name="inputAVE" type="data" label="Average Beta file"/>
+    <param format="tabular" name="inputCTRL" type="data" label="Control file"/>
+    <param format="tabular" name="inputSAMPLE" type="data" label="Samples Name file"/>
+    <param format="tabular" name="inputDISC" type="data" label="Discarder file" optional="true" />
+
+    <param name="platform" type="select" format="text" label="Type of Illumina Infinium BeadChip methylation array">
+     <option value="Hum27">Infinium HumanMethylation27 BeadChip</option>
+     <option value="Hum450">Infinium HumanMethylation450 BeadChip</option>
+    </param>
+
+    <param name="pval" type="select" format="text" label="p-value threshold number" help="to define which samples keep for the normalization and the following analysis">
+     <option value="0.01">0.01</option>
+     <option value="0.02">0.02</option>
+     <option value="0.03">0.03</option>
+     <option value="0.04">0.04</option>
+     <option value="0.05">0.05</option>
+     <option value="0.06">0.06</option>
+     <option value="0.07">0.07</option>
+     <option value="0.08">0.08</option>
+     <option value="0.09">0.09</option>
+     <option value="0.10">0.10</option>
+    </param>
+
+    <param name="ClustMethod" type="select" format="text" label="Distance measure to be used for clustering">
+     <option value="euclidean">euclidean</option>
+     <option value="maximum">maximum</option>
+     <option value="manhattan">manhattan</option>
+     <option value="canberra">canberra</option>
+     <option value="binary">binary</option>
+     <option value="pearson">pearson</option>
+     <option value="correlation">correlation</option>
+     <option value="spearman">spearman</option>
+     <option value="kendall">kendall</option>
+    </param>
+    <param name="ChrX" type="select" format="text" label="Delete CpGs from chromosome X?">
+     <option value="FALSE">No</option>
+     <option value="TRUE">Yes</option>
+    </param>
+  </inputs>
+  <outputs>
+       <data format="pdf" name="oQualityCheck" label="QualityCheck"/>
+       <data format="pdf" name="oSample" label="Sample"/>
+       <data format="pdf" name="oInternalControl" label="InternalControl"/>
+       <data format="pdf" name="oExplorativeAnalysis" label="ExplorativeAnalysis"/>
+       <data format="text" name="oNormalizedMvalues" label="NormalizedMvalues"/>
+       <data format="xls" name="oQC_Analysis" label="QC_Analysis"/>
+   </outputs>
+
+
+  <help>
+This tool is a Quality Control for Illumina Infinium methylation arrays. It uses an R package (HumMeth27QCReport) created by 
+Francesco Mancuso and Guglielmo Roma from the Bioinformatics core at the Center for Genomic Regulation in Barcelona.
+Help: http://biocore.crg.cat/wiki/HumMeth27QCReport and francesco.mancuso@crg.eu
+  </help>
+
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qcma-55561a945415/HumMeth27QCReport/README.txt	Fri Feb 24 17:42:16 2012 -0500
@@ -0,0 +1,8 @@
+HumMeth27QCReport is a tool for quality control and preprocessing of Illumina's Infinium BeadChip methylation assays. The automated analysis pipeline comprises data import, normalization, quality diagnostics and data export.
+
+This requires:
+
+* Perl
+* Python 2
+* R (≥ 2.13.0) 
+* The following R packages: methylumi, lumi, IlluminaHumanMethylation27k.db, IlluminaHumanMethylation450k.db, amap, Hmisc, gplots, plotrix, WriteXLS, tcltk2, AnnotationDbi (≥ 0.0.89), Biobase (≥ 1.15.29)