0
|
1 <tool id="knitrtest" name="testing knitr" version="0.0.1">
|
|
2 Additional info: wrapper compatible with versions .....
|
|
3 <description>
|
|
4 for R scripts plugins.
|
|
5 </description>
|
|
6
|
|
7 <requirements>
|
|
8 <requirement type="package" version="2.12">biocbasics</requirement>
|
|
9 <requirement type="package" version="3.0.1">package_r3</requirement>
|
|
10 </requirements>
|
|
11
|
|
12 <command interpreter="sh">
|
|
13 /usr/local/bin/R CMD BATCH ${runme}
|
|
14 </command>
|
|
15
|
|
16 <inputs>
|
|
17 <param format="tabular" name="counttable" type="data" label="Count table" help="Count table generated by HTSeq-count" />
|
|
18 <param name="title" type="text" value="edgeR" size="80" label="Title for job outputs" help="Supply a meaningful name here to remind you what the outputs contain">
|
|
19 <sanitizer invalid_char="">
|
|
20 <valid initial="string.letters,string.digits"><add value="_" /> </valid>
|
|
21 </sanitizer>
|
|
22 </param>
|
|
23 <param name="treatment_name" type="text" value="Treatment" size="50" label="Treatment Name"/>
|
|
24 <param name="Treat_cols" label="Select columns containing treatment." type="data_column" data_ref="counttable" numerical="True"
|
|
25 multiple="true" use_header_names="true" size="120" display="checkboxes">
|
|
26 <validator type="no_options" message="Please select at least one column."/>
|
|
27 </param>
|
|
28 <param name="control_name" type="text" value="Control" size="50" label="Control Name"/>
|
|
29 <param name="Control_cols" label="Select columns containing control." type="data_column" data_ref="counttable" numerical="True"
|
|
30 multiple="true" use_header_names="true" size="120" display="checkboxes" optional="true">
|
|
31 </param>
|
|
32 <param name="subjectids" type="text" optional="true" size="120" value = ""
|
|
33 label="IF SUBJECTS NOT ALL INDEPENDENT! Enter integers to indicate sample pairing for every column in count table"
|
|
34 help="Leave blank if no pairing, but eg if data from sample id A99 is in columns 2,4 and id C21 is in 3,5 then enter '1,2,1,2'">
|
|
35 <sanitizer>
|
|
36 <valid initial="string.digits"><add value="," /> </valid>
|
|
37 </sanitizer>
|
|
38 </param>
|
|
39 <param name="fQ" type="float" value="0.3" size="5" label="Non-differential contig count quantile threshold - zero to analyze all non-zero read count contigs"
|
|
40 help="May be a good or a bad idea depending on the biology and the question. EG 0.3 = sparsest 30% of contigs with at least one read are removed before analysis"/>
|
|
41 <param name="useNDF" type="boolean" truevalue="T" checked='false' falsevalue="" size="1" label="Non differential filter - remove contigs below a threshold (1 per million) for half or more samples"
|
|
42 help="May be a good or a bad idea depending on the biology and the question. This was the old default. Quantile based is available as an alternative"/>
|
|
43 <param name="priordf" type="integer" value="20" size="3" label="prior.df for tagwise dispersion - lower value = more emphasis on each tag's variance. Replaces prior.n and prior.df = prior.n * residual.df"
|
|
44 help="Zero = Use edgeR default. Use a small value to 'smooth' small samples. See edgeR docs and note below"/>
|
|
45 <param name="fdrthresh" type="float" value="0.05" size="5" label="P value threshold for FDR filtering for amily wise error rate control"
|
|
46 help="Conventional default value of 0.05 recommended"/>
|
|
47 <param name="fdrtype" type="select" label="FDR (Type II error) control method"
|
|
48 help="Use fdr or bh typically to control for the number of tests in a reliable way">
|
|
49 <option value="fdr" selected="true">fdr</option>
|
|
50 <option value="BH">Benjamini Hochberg</option>
|
|
51 <option value="BY">Benjamini Yukateli</option>
|
|
52 <option value="bonferroni">Bonferroni</option>
|
|
53 <option value="hochberg">Hochberg</option>
|
|
54 <option value="holm">Holm</option>
|
|
55 <option value="hommel">Hommel</option>
|
|
56 <option value="none">no control for multiple tests</option>
|
|
57 </param>
|
|
58 </inputs>
|
|
59
|
|
60 <outputs>
|
|
61 <data format="tabular" name="outtab" label="${title}.xls"/>
|
|
62 <data format="html" name="html_file" label="${title}.html"/>
|
|
63 </outputs>
|
|
64
|
|
65 <configfiles>
|
|
66 <configfile name="inputscript">
|
|
67 Differential expression analysis
|
|
68 ================================
|
|
69
|
|
70 Loading the R environment
|
|
71 ```{r}
|
|
72 # Original edgeR code by: S.Lunke and A.Kaspi
|
|
73 reallybig = log10(.Machine\$double.xmax)
|
|
74 reallysmall = log10(.Machine\$double.xmin)
|
|
75 library('stringr')
|
|
76 library('gplots')
|
|
77 library('DESeq')
|
|
78 library('edgeR')
|
|
79 ```
|
|
80
|
|
81 Reading count table from parameters
|
|
82 ```{r}
|
|
83 filename="$counttable"
|
|
84 raw_counts = read.csv(filename, header=TRUE, stringsAsFactors=F)
|
|
85 ```
|
|
86
|
|
87 And printing the count table
|
|
88 ```{r}
|
|
89 head(raw_counts)
|
|
90 ```
|
|
91
|
|
92 End of markdown script.
|
|
93 </configfile>
|
|
94 <configfile name="runme">
|
|
95 require(knitr)
|
|
96 require(markdown)
|
|
97 knit("${inputscript}", "test.md")
|
|
98 markdownToHTML("test.md", "${html_file}")
|
|
99 </configfile>
|
|
100 </configfiles>
|
|
101
|
|
102 <tests>
|
|
103 </tests>
|
|
104
|
|
105 <help>
|
|
106 **knitr test**
|
|
107 Testing whether two config files can be nested.
|
|
108 </help>
|
|
109 </tool>
|
|
110
|