comparison minfi_dmp.xml @ 60:b0b694934751 draft

Uploaded
author kpbioteam
date Fri, 22 Feb 2019 11:17:35 -0500
parents cffa2871fe8b
children 3d083550977f
comparison
equal deleted inserted replaced
59:e3932f28bf36 60:b0b694934751
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
32 colnames(tab) <- c("seqname","source","feature","start","end","score","strand", "frame","attributes", "names")
33
34 tab[,"source"] <- NULL
35
36 tab[,"frame"] <- NULL
37
38 tab[,"attributes"] <- NULL
39
40 dmp <- dmpFinder(beta, pheno[,"V2"], type = type, qCutoff = qCutoff, shrinkVar = shrinkVar)
41
42 dmp[,"names"] <- rownames(dmp)
43
44 data <- merge(dmp, tab, by="names",sort = TRUE)
45
46 data <- data[c("seqname","start","end","names","score","strand", "feature","intercept", "f", "pval","qval")]
47
48 write.table(data, file= '$dmp', quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t")
49 ]]>
50 </configfile>
51 </configfiles>
52 <inputs>
53 <param type="data" name="grset" format="rdata" label="Input Set" help="MethylSet, RatioSet or GenomicRatioSet" />
54 <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table"/>
55 <param name="phenotype" type="select" label="Phenotype Type">
56 <option value="categorical">categorical</option>
57 <option value="continuous">continuous</option>
58 </param>
59 <param name="q_cutoff" type="integer" value="1" label="qCutoff Size" help="DMPs with an FDR q-value greater than this will not be returned."/>
60 <param name="variance_shrinkage" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Variance Shrinkage"
61 help="Enable variance shrinkage is recommended when sample sizes are small"/>
62 <param type="data" name="ucsc_genome" format="gtf" label="Genome Table" help="UCSC genome data Methyl450"/>
63 </inputs>
64 <outputs>
65 <data name="dmp" format="interval" label="Differentially Methylated Positions"/>
66 </outputs>
67 <tests>
68 <test>
69 <param name="grset" value="GRSet_without_SNPs.rdata"/>
70 <param name="phenotype_table" value="phenotypeTable.txt"/>
71 <param name="phenotype" value="categorical"/>
72 <param name="q_cutoff" value="1"/>
73 <param name="variance_shrinkage" value="FALSE"/>
74 <param name="ucsc_genome" value="ucsc.gtf"/>
75 <output name="dmp" file="Differentially_Methylated_Positions.interval"/>
76 </test>
77 </tests>
78 <help><![CDATA[
79 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).
80
81 The output is an interval file with the following columns:
82
83 - seqnames
84 - start
85 - end
86 - cpg
87 - names
88 - score
89 - strand
90 - feature
91 - intercept
92 - f pval
93 - qval
94
95 ]]></help>
96 <expand macro="citations" />
97 </tool>