diff minfi_dmp.xml @ 0:bb6c8d38fad1 draft default tip

planemo upload for repository https://github.com/kpbioteam/ewas_galaxy commit 945cecdba6528d35c6dfa866f785f182c5dd22ed
author kpbioteam
date Fri, 07 Jun 2019 14:14:49 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/minfi_dmp.xml	Fri Jun 07 14:14:49 2019 -0400
@@ -0,0 +1,88 @@
+<tool id="minfi_dmp" name="Minfi DMP" version="@MINFI_VERSION@">
+    <description>to find differentially methylated positions</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript '$minfi_dmp_script'
+    ]]></command>
+    <configfiles>
+        <configfile name="minfi_dmp_script"><![CDATA[
+require("minfi", quietly = TRUE)
+
+set <- get(load('$grset'))
+
+genomeranges <- as.data.frame(ranges(set))
+
+beta <- getBeta(set)
+
+pheno <- read.table('$phenotype_table',skip=1)
+
+type <- '$phenotype'
+
+qCutoff <- as.numeric('$q_cutoff')
+
+shrinkVar <- '$variance_shrinkage'
+
+tab <- read.table('$ucsc_genome')
+
+tab <- tab[,-(11:14),drop=FALSE] 
+
+tab <- tab[,c(1,4,5,10)]
+
+colnames(tab) <- c('chr','start','end','names')
+
+dmp <- dmpFinder(beta, pheno[,"V2"], type = type, qCutoff = qCutoff, shrinkVar = shrinkVar)
+
+dmp[,"names"] <- rownames(dmp)
+
+data <- merge(dmp, tab, by="names",sort = TRUE)
+
+data <- data[,c(6,7,8,1,4,5)]  
+
+write.table(data, file= '$dmp', quote = FALSE,col.names = TRUE, row.names = FALSE, sep = "\t")
+]]>
+        </configfile>
+    </configfiles> 
+    <inputs>
+        <param type="data" name="grset" format="rdata" label="Data Mapped To The Genome" help="MethylSet, RatioSet or GenomicRatioSet" />
+        <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table"/>
+        <param name="phenotype" type="select" label="Phenotype Type">
+            <option value="categorical">categorical</option>
+            <option value="continuous">continuous</option>
+        </param> 
+        <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."/>
+        <param name="variance_shrinkage" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Variance Shrinkage"
+            help="Enable variance shrinkage is recommended when sample sizes are small"/>
+        <param type="data" name="ucsc_genome" format="gtf" label="Genome Table" help="UCSC genome data Methyl450"/>
+    </inputs>
+    <outputs>
+       <data name="dmp" format="interval" label="Differentially Methylated Positions"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="grset" value="GRSet_without_SNPs.rdata"/>
+            <param name="phenotype_table" value="phenotypeTable.txt"/>
+            <param name="phenotype" value="categorical"/>
+            <param name="q_cutoff" value="1"/>
+            <param name="variance_shrinkage" value="FALSE"/>
+            <param name="ucsc_genome" value="ucsc.gtf"/>
+            <output name="dmp" file="Differentially_Methylated_Positions.interval"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+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). 
+
+The output is an interval file with the following columns:
+
+    - chr
+    - start
+    - end
+    - names
+    - pvalue
+    - qval 
+
+ ]]></help>
+    <expand macro="citations" />
+</tool>