view minfi_dmp.xml @ 20:5aaf04dbc8bc draft

Deleted selected files
author kpbioteam
date Fri, 22 Feb 2019 08:24:52 -0500
parents cffa2871fe8b
children 3d083550977f
line wrap: on
line source

<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] 

colnames(tab) <- c("seqname","source","feature","start","end","score","strand", "frame","attributes", "names")

tab[,"source"] <- NULL

tab[,"frame"] <- NULL

tab[,"attributes"] <- NULL

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("seqname","start","end","names","score","strand", "feature","intercept", "f", "pval","qval")]

write.table(data, file= '$dmp', quote = FALSE,col.names = FALSE, row.names = FALSE, sep = "\t")
    ]]>
        </configfile>
    </configfiles> 
    <inputs>
        <param type="data" name="grset" format="rdata" label="Input Set" 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="integer" 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:

    - seqnames
    - start
    - end
    - cpg
    - names
    - score
    - strand
    - feature
    - intercept
    - f pval
    - qval

 ]]></help>
    <expand macro="citations" />
</tool>