annotate minfi_dmr.xml @ 60:b0b694934751 draft

Uploaded
author kpbioteam
date Fri, 22 Feb 2019 11:17:35 -0500
parents 491cf4ada3a3
children 2ee6ac5227f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
1 <tool id="minfi_dmr" name="Minfi DMR" version="@MINFI_VERSION@">
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
2 <description>to find differentially methylated regions</description>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
3 <macros>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
4 <import>macros.xml</import>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
5 </macros>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
6 <expand macro="requirements" />
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
7 <command detect_errors="exit_code">
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
8 <![CDATA[
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
9 Rscript '$minfi_dmr_script'
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
10 ]]>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
11 </command>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
12 <configfiles>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
13 <configfile name="minfi_dmr_script">
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
14 <![CDATA[
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
15 require("minfi", quietly = TRUE)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
16 options(warn = -1)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
17
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
18 GRSet <- get(load('$grset'))
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
19
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
20 pheno <- read.table('$phenotype_table',skip = 1)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
21
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
22 group <- pheno\$V2
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
23
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
24 pair <- factor(pheno\$V3)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
25
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
26 design.matrix <- model.matrix(~ group + pair)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
27
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
28 maxGap <- as.numeric('$maxgap_size')
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
29
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
30 if(is.null(GRSet\$cluster)){
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
31 cluster = NULL
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
32 maxGap = maxGap
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
33 } else {
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
34 cluster = GRSet\$cluster
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
35 maxGap = NULL
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
36 }
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
37
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
38 cutoff <- as.numeric('$cutoff_size')
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
39 B <- as.numeric('$number_of_resamples')
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
40 nullMethod <- '$null_method'
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
41 coef <- 2
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
42
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
43 dmrs <- bumphunter(GRSet,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
44 design = design.matrix,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
45 cluster = cluster,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
46 maxGap = maxGap,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
47 cutoff = cutoff,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
48 nullMethod = nullMethod,
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
49 B = B)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
50
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
51 dmrGR <- with(dmrs\$table,GRanges(chr,IRanges(start,end),area=area,value=value))
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
52
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
53 dmrGR <- as.data.frame(dmrGR)
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
54
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
55 colnames(dmrGR) <- c("seqnames","start","end","width","strand","area","value")
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
56
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
57 dmrGR\$strand <- NULL
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
58
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
59 dmrGR\$area <- NULL
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
60
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
61 write.table(dmrGR, file= '$dmr', quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t")
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
62 ]]>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
63 </configfile>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
64 </configfiles>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
65 <inputs>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
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
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
67 location." />
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
68 <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table"
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
69 help="Phenotype Table must include the following information: sampleID, phenotype and paird or unpaired samples column"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
70 <param name="maxgap_size" type="integer" value="250" label="maxGap Size"
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
71 help="If cluster is not provided this maximum location gap will be used to define cluster"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
72 <param name="cutoff_size" type="float" value="0.1" label="Cutoff Size"
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
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."/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
74 <param name="number_of_resamples" type="integer" value="0" label="Number of Resamples"
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
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."/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
76 <param name="null_method" type="select" label="null Method" help="Method used to generate null candidate regions.">
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
77 <option value="permutation" selected="True">permutation</option>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
78 <option value="bootstrap">bootstrap</option>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
79 </param>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
80 </inputs>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
81 <outputs>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
82 <data name="dmr" format="interval" label="Differentially Methylated Regions"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
83 </outputs>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
84 <tests>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
85 <test>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
86 <param name="grset" value="GRSet_without_SNPs.rdata"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
87 <param name="phenotype_table" value="phenotypeTable.txt"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
88 <param name="maxgap_size" value="250"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
89 <param name="cutoff_size" value="0.1"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
90 <param name="number_of_resamples" value="0"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
91 <param name="null_method" value="permutation"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
92 <output name="dmr" file="Differentially_Methylated_Regions.interval"/>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
93 </test>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
94 </tests>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
95 <help><![CDATA[
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
96 Genomic Ratio Set should contain 450k arrays reads for each sample listed in Phenotype Table: sampleID phenotype paired e.g. GSM1588708 sensitive 1
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
97
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
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.
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
99
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
100 The output is an interval file with the following columns:
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
101
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
102 - seqnames
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
103 - start
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
104 - end
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
105 - width
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
106 - area
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
107 - value
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
108
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
109 ]]></help>
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
110 <expand macro="citations" />
491cf4ada3a3 Uploaded
kpbioteam
parents:
diff changeset
111 </tool>