comparison minfi_dmr.xml @ 16:491cf4ada3a3 draft

Uploaded
author kpbioteam
date Fri, 22 Feb 2019 08:15:31 -0500
parents
children 2ee6ac5227f1
comparison
equal deleted inserted replaced
15:dcfca35a2ac6 16:491cf4ada3a3
1 <tool id="minfi_dmr" name="Minfi DMR" version="@MINFI_VERSION@">
2 <description>to find differentially methylated regions</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command detect_errors="exit_code">
8 <![CDATA[
9 Rscript '$minfi_dmr_script'
10 ]]>
11 </command>
12 <configfiles>
13 <configfile name="minfi_dmr_script">
14 <![CDATA[
15 require("minfi", quietly = TRUE)
16 options(warn = -1)
17
18 GRSet <- get(load('$grset'))
19
20 pheno <- read.table('$phenotype_table',skip = 1)
21
22 group <- pheno\$V2
23
24 pair <- factor(pheno\$V3)
25
26 design.matrix <- model.matrix(~ group + pair)
27
28 maxGap <- as.numeric('$maxgap_size')
29
30 if(is.null(GRSet\$cluster)){
31 cluster = NULL
32 maxGap = maxGap
33 } else {
34 cluster = GRSet\$cluster
35 maxGap = NULL
36 }
37
38 cutoff <- as.numeric('$cutoff_size')
39 B <- as.numeric('$number_of_resamples')
40 nullMethod <- '$null_method'
41 coef <- 2
42
43 dmrs <- bumphunter(GRSet,
44 design = design.matrix,
45 cluster = cluster,
46 maxGap = maxGap,
47 cutoff = cutoff,
48 nullMethod = nullMethod,
49 B = B)
50
51 dmrGR <- with(dmrs\$table,GRanges(chr,IRanges(start,end),area=area,value=value))
52
53 dmrGR <- as.data.frame(dmrGR)
54
55 colnames(dmrGR) <- c("seqnames","start","end","width","strand","area","value")
56
57 dmrGR\$strand <- NULL
58
59 dmrGR\$area <- NULL
60
61 write.table(dmrGR, file= '$dmr', quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t")
62 ]]>
63 </configfile>
64 </configfiles>
65 <inputs>
66 <param type="data" name="grset" format="rdata" label="Genomic Ratio Set" help="This class holds preprocessed data for Illumina methylation microarrays, mapped to a genomic
67 location." />
68 <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table"
69 help="Phenotype Table must include the following information: sampleID, phenotype and paird or unpaired samples column"/>
70 <param name="maxgap_size" type="integer" value="250" label="maxGap Size"
71 help="If cluster is not provided this maximum location gap will be used to define cluster"/>
72 <param name="cutoff_size" type="float" value="0.1" label="Cutoff Size"
73 help="A numeric value. Values of the estimate of the genomic profile above the cutoff or below the negative of the cutoff will be used as candidate regions. It is possible to give two separate values (upper and lower bounds). If one value is given, the lower bound is minus the value."/>
74 <param name="number_of_resamples" type="integer" value="0" label="Number of Resamples"
75 help="An integer denoting the number of resamples to use when computing null distributions. This defaults to 0. If permutations is supplied that defines the number of permutations/bootstraps and B is ignored."/>
76 <param name="null_method" type="select" label="null Method" help="Method used to generate null candidate regions.">
77 <option value="permutation" selected="True">permutation</option>
78 <option value="bootstrap">bootstrap</option>
79 </param>
80 </inputs>
81 <outputs>
82 <data name="dmr" format="interval" label="Differentially Methylated Regions"/>
83 </outputs>
84 <tests>
85 <test>
86 <param name="grset" value="GRSet_without_SNPs.rdata"/>
87 <param name="phenotype_table" value="phenotypeTable.txt"/>
88 <param name="maxgap_size" value="250"/>
89 <param name="cutoff_size" value="0.1"/>
90 <param name="number_of_resamples" value="0"/>
91 <param name="null_method" value="permutation"/>
92 <output name="dmr" file="Differentially_Methylated_Regions.interval"/>
93 </test>
94 </tests>
95 <help><![CDATA[
96 Genomic Ratio Set should contain 450k arrays reads for each sample listed in Phenotype Table: sampleID phenotype paired e.g. GSM1588708 sensitive 1
97
98 This tool is a version of the bump hunting algorithm (Andrew E Jaffe et al. 2012) adapted to the 450k array finding find differentially methylated regions DMR.
99
100 The output is an interval file with the following columns:
101
102 - seqnames
103 - start
104 - end
105 - width
106 - area
107 - value
108
109 ]]></help>
110 <expand macro="citations" />
111 </tool>