Mercurial > repos > kpbioteam > ewastools
diff minfi_dmr.xml @ 59:e3932f28bf36 draft
Uploaded
author | kpbioteam |
---|---|
date | Fri, 22 Feb 2019 11:16:50 -0500 |
parents | 491cf4ada3a3 |
children | 2ee6ac5227f1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/minfi_dmr.xml Fri Feb 22 11:16:50 2019 -0500 @@ -0,0 +1,111 @@ +<tool id="minfi_dmr" name="Minfi DMR" version="@MINFI_VERSION@"> + <description>to find differentially methylated regions</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <command detect_errors="exit_code"> + <![CDATA[ + Rscript '$minfi_dmr_script' + ]]> + </command> + <configfiles> + <configfile name="minfi_dmr_script"> + <![CDATA[ +require("minfi", quietly = TRUE) +options(warn = -1) + +GRSet <- get(load('$grset')) + +pheno <- read.table('$phenotype_table',skip = 1) + +group <- pheno\$V2 + +pair <- factor(pheno\$V3) + +design.matrix <- model.matrix(~ group + pair) + +maxGap <- as.numeric('$maxgap_size') + + if(is.null(GRSet\$cluster)){ + cluster = NULL + maxGap = maxGap +} else { + cluster = GRSet\$cluster + maxGap = NULL +} + +cutoff <- as.numeric('$cutoff_size') +B <- as.numeric('$number_of_resamples') +nullMethod <- '$null_method' +coef <- 2 + +dmrs <- bumphunter(GRSet, + design = design.matrix, + cluster = cluster, + maxGap = maxGap, + cutoff = cutoff, + nullMethod = nullMethod, + B = B) + +dmrGR <- with(dmrs\$table,GRanges(chr,IRanges(start,end),area=area,value=value)) + +dmrGR <- as.data.frame(dmrGR) + +colnames(dmrGR) <- c("seqnames","start","end","width","strand","area","value") + +dmrGR\$strand <- NULL + +dmrGR\$area <- NULL + +write.table(dmrGR, file= '$dmr', quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t") + ]]> + </configfile> + </configfiles> + <inputs> + <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 +location." /> + <param type="data" name="phenotype_table" format="tabular" label="Phenotype Table" + help="Phenotype Table must include the following information: sampleID, phenotype and paird or unpaired samples column"/> + <param name="maxgap_size" type="integer" value="250" label="maxGap Size" + help="If cluster is not provided this maximum location gap will be used to define cluster"/> + <param name="cutoff_size" type="float" value="0.1" label="Cutoff Size" + 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."/> + <param name="number_of_resamples" type="integer" value="0" label="Number of Resamples" + 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."/> + <param name="null_method" type="select" label="null Method" help="Method used to generate null candidate regions."> + <option value="permutation" selected="True">permutation</option> + <option value="bootstrap">bootstrap</option> + </param> + </inputs> + <outputs> + <data name="dmr" format="interval" label="Differentially Methylated Regions"/> + </outputs> + <tests> + <test> + <param name="grset" value="GRSet_without_SNPs.rdata"/> + <param name="phenotype_table" value="phenotypeTable.txt"/> + <param name="maxgap_size" value="250"/> + <param name="cutoff_size" value="0.1"/> + <param name="number_of_resamples" value="0"/> + <param name="null_method" value="permutation"/> + <output name="dmr" file="Differentially_Methylated_Regions.interval"/> + </test> + </tests> + <help><![CDATA[ +Genomic Ratio Set should contain 450k arrays reads for each sample listed in Phenotype Table: sampleID phenotype paired e.g. GSM1588708 sensitive 1 + +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. + +The output is an interval file with the following columns: + + - seqnames + - start + - end + - width + - area + - value + + ]]></help> + <expand macro="citations" /> +</tool>