changeset 0:2a3f30c6e8c9 draft

Uploaded
author joachim-jacob
date Tue, 09 Jul 2013 08:05:28 -0400
parents
children 50d271b182d9
files README README~ knitrtest.xml
diffstat 3 files changed, 145 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Tue Jul 09 08:05:28 2013 -0400
@@ -0,0 +1,9 @@
+knitrtest - 1.0.0
+=============================
+<joachim.jacob@vib.be>
+
+SUMMARY
+-------
+This tool is to exemplify the use of knitr
+for generating html document displaying output of
+R code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README~	Tue Jul 09 08:05:28 2013 -0400
@@ -0,0 +1,26 @@
+Tool - 1.0.0
+=============================
+<joachim.jacob@vib.be>
+
+SUMMARY
+-------
+This tool does/allows you/...
+	  
+REQUIREMENTS AND INSTALLATION
+-----------------------------
+Install this tool in your Galaxy via the Toolshed
+
+   ) Third party code installation
+	For installation instructions of these tools, visit:
+	http://www.clcbio.com/index.php?id=1331	  
+
+   ) Integration into Galaxy
+	Add the necessary .loc files and add a tag set according to
+	tool_data_tables.xml. See the two sample files to assist you in 
+	this process.
+
+DETAILS AND ISSUES
+------------------
+   ) First issue to be solved in later release
+   ) Situations in which the tool will not work
+   ) ....
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/knitrtest.xml	Tue Jul 09 08:05:28 2013 -0400
@@ -0,0 +1,110 @@
+<tool id="knitrtest" name="testing knitr" version="0.0.1">
+     Additional info: wrapper compatible with versions ..... 
+    <description>
+		for R scripts plugins.
+    </description>
+    
+	<requirements>
+		<requirement type="package" version="2.12">biocbasics</requirement>
+		<requirement type="package" version="3.0.1">package_r3</requirement>
+	</requirements>
+    
+    <command interpreter="sh">
+		/usr/local/bin/R CMD BATCH ${runme}
+    </command> 
+   
+    <inputs>
+		<param format="tabular" name="counttable" type="data" label="Count table" help="Count table generated by HTSeq-count" /> 
+		<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">
+			<sanitizer invalid_char="">
+				<valid initial="string.letters,string.digits"><add value="_" /> </valid>
+			</sanitizer>
+		</param>
+		<param name="treatment_name" type="text" value="Treatment" size="50" label="Treatment Name"/>
+		<param name="Treat_cols" label="Select columns containing treatment." type="data_column" data_ref="counttable" numerical="True" 
+         multiple="true" use_header_names="true" size="120" display="checkboxes">
+			<validator type="no_options" message="Please select at least one column."/>
+		</param>
+		<param name="control_name" type="text" value="Control" size="50" label="Control Name"/>
+		<param name="Control_cols" label="Select columns containing control." type="data_column" data_ref="counttable" numerical="True" 
+         multiple="true" use_header_names="true" size="120" display="checkboxes" optional="true">
+		</param>
+		<param name="subjectids" type="text" optional="true" size="120" value = ""
+       label="IF SUBJECTS NOT ALL INDEPENDENT! Enter integers to indicate sample pairing for every column in count table"
+       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'">
+			<sanitizer>
+				<valid initial="string.digits"><add value="," /> </valid>
+			</sanitizer>
+		</param>
+		<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"
+			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"/>
+		<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"
+			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"/>
+		<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"
+			help="Zero = Use edgeR default. Use a small value to 'smooth' small samples. See edgeR docs and note below"/>
+		<param name="fdrthresh" type="float" value="0.05" size="5" label="P value threshold for FDR filtering for amily wise error rate control"
+			help="Conventional default value of 0.05 recommended"/>
+		<param name="fdrtype" type="select" label="FDR (Type II error) control method" 
+			help="Use fdr or bh typically to control for the number of tests in a reliable way">
+            <option value="fdr" selected="true">fdr</option>
+            <option value="BH">Benjamini Hochberg</option>
+            <option value="BY">Benjamini Yukateli</option>
+            <option value="bonferroni">Bonferroni</option>
+            <option value="hochberg">Hochberg</option>
+            <option value="holm">Holm</option>
+            <option value="hommel">Hommel</option>
+            <option value="none">no control for multiple tests</option>
+		</param>
+    </inputs>
+
+    <outputs>
+		<data format="tabular" name="outtab" label="${title}.xls"/>
+		<data format="html" name="html_file" label="${title}.html"/>		
+    </outputs>
+
+<configfiles>
+	<configfile name="inputscript">	
+Differential expression analysis
+================================
+
+Loading the R environment
+```{r}
+# Original edgeR code by: S.Lunke and A.Kaspi
+reallybig = log10(.Machine\$double.xmax)
+reallysmall = log10(.Machine\$double.xmin)
+library('stringr')
+library('gplots')
+library('DESeq')
+library('edgeR')
+```
+
+Reading count table from parameters
+```{r}
+filename="$counttable"
+raw_counts = read.csv(filename, header=TRUE, stringsAsFactors=F)
+```
+
+And printing the count table
+```{r}
+head(raw_counts)
+```
+
+End of markdown script.
+	</configfile>
+	<configfile name="runme">
+		require(knitr)
+		require(markdown)
+		knit("${inputscript}", "test.md")
+		markdownToHTML("test.md", "${html_file}")
+	</configfile>
+</configfiles> 
+
+    <tests>
+    </tests>
+
+    <help>
+**knitr test**
+Testing whether two config files can be nested.
+    </help>
+</tool>
+