17
|
1 <tool id="minfi_dmp" name="Minfi DMP" version="@MINFI_VERSION@">
|
|
2 <description>to find differentially methylated positions</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements" />
|
|
7 <command detect_errors="exit_code"><![CDATA[
|
|
8 Rscript '$minfi_dmp_script'
|
|
9 ]]></command>
|
|
10 <configfiles>
|
|
11 <configfile name="minfi_dmp_script"><![CDATA[
|
|
12 require("minfi", quietly = TRUE)
|
|
13
|
|
14 set <- get(load('$grset'))
|
|
15
|
|
16 genomeranges <- as.data.frame(ranges(set))
|
|
17
|
|
18 beta <- getBeta(set)
|
|
19
|
|
20 pheno <- read.table('$phenotype_table',skip=1)
|
|
21
|
|
22 type <- '$phenotype'
|
|
23
|
|
24 qCutoff <- as.numeric('$q_cutoff')
|
|
25
|
|
26 shrinkVar <- '$variance_shrinkage'
|
|
27
|
|
28 tab <- read.table('$ucsc_genome')
|
|
29
|
|
30 tab <- tab[,-(11:14),drop=FALSE]
|
|
31
|
64
|
32 tab <- tab[,c(1,4,5,10)]
|
17
|
33
|
64
|
34 colnames(tab) <- c('chr','start','end','names')
|
17
|
35
|
|
36 dmp <- dmpFinder(beta, pheno[,"V2"], type = type, qCutoff = qCutoff, shrinkVar = shrinkVar)
|
|
37
|
|
38 dmp[,"names"] <- rownames(dmp)
|
|
39
|
|
40 data <- merge(dmp, tab, by="names",sort = TRUE)
|
|
41
|
64
|
42 data <- data[,c(6,7,8,1,4,5)]
|
17
|
43
|
64
|
44 write.table(data, file= '$dmp', quote = FALSE,col.names = TRUE, row.names = FALSE, sep = "\t")
|
|
45 ]]>
|
17
|
46 </configfile>
|
|
47 </configfiles>
|
|
48 <inputs>
|
|
49 <param type="data" name="grset" format="rdata" label="Input Set" help="MethylSet, RatioSet or GenomicRatioSet" />
|
|
50 <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table"/>
|
|
51 <param name="phenotype" type="select" label="Phenotype Type">
|
|
52 <option value="categorical">categorical</option>
|
|
53 <option value="continuous">continuous</option>
|
|
54 </param>
|
64
|
55 <param name="q_cutoff" type="float" value="1" label="qCutoff Size" help="DMPs with an FDR q-value greater than this will not be returned."/>
|
17
|
56 <param name="variance_shrinkage" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Variance Shrinkage"
|
|
57 help="Enable variance shrinkage is recommended when sample sizes are small"/>
|
|
58 <param type="data" name="ucsc_genome" format="gtf" label="Genome Table" help="UCSC genome data Methyl450"/>
|
|
59 </inputs>
|
|
60 <outputs>
|
64
|
61 <data name="dmp" format="interval" label="Differentially Methylated Positions"/>
|
17
|
62 </outputs>
|
|
63 <tests>
|
|
64 <test>
|
|
65 <param name="grset" value="GRSet_without_SNPs.rdata"/>
|
|
66 <param name="phenotype_table" value="phenotypeTable.txt"/>
|
|
67 <param name="phenotype" value="categorical"/>
|
|
68 <param name="q_cutoff" value="1"/>
|
|
69 <param name="variance_shrinkage" value="FALSE"/>
|
|
70 <param name="ucsc_genome" value="ucsc.gtf"/>
|
|
71 <output name="dmp" file="Differentially_Methylated_Positions.interval"/>
|
|
72 </test>
|
|
73 </tests>
|
|
74 <help><![CDATA[
|
|
75 This tool creates differentially methylated positions (DMPs) with respect to a phenotype covariate. The phenotype may be categorical (e.g. cancer vs. normal) or continuous (e.g. blood pressure).
|
|
76
|
|
77 The output is an interval file with the following columns:
|
|
78
|
64
|
79 - chr
|
17
|
80 - start
|
|
81 - end
|
|
82 - names
|
64
|
83 - pvalue
|
|
84 - qval
|
17
|
85
|
|
86 ]]></help>
|
|
87 <expand macro="citations" />
|
|
88 </tool>
|