changeset 0:63abfc350814

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 10:53:54 -0400
parents
children 62f7b9c20c9b
files compute_q_values.pl compute_q_values.xml test-data/p_q_hists_Q_plots.pdf test-data/p_values.tabular test-data/q_values.tabular tool_dependencies.xml
diffstat 6 files changed, 1359 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compute_q_values.pl	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,95 @@
+# A program to compute the q-values based on the p-values of multiple simultaneous tests. 
+# The q-valules are computed using a specific R package created by John Storey called "qvalue".
+# The input is a TABULAR format file consisting of one column only that represents the p-values 
+# of multiple simultaneous tests, one line for every p-value. 
+# The first output is a TABULAR format file consisting of one column only that represents the q-values 
+# corresponding to p-values, one line for every q-value. 
+# the second output is a TABULAR format file consisting of three pages: the first page represents 
+# the p-values histogram, the second page represents the q-values histogram, and the third page represents 
+# the four Q-plots as introduced in the "qvalue" package manual.
+
+use strict;
+use warnings;
+use IO::Handle;
+use File::Temp qw/ tempfile tempdir /;
+my $tdir = tempdir( CLEANUP => 0 );
+
+# check to make sure having correct input and output files
+my $usage = "usage: compute_q_values.pl [TABULAR.in] [lambda] [pi0_method] [fdr_level] [robust] [TABULAR.out] [PDF.out] \n";
+die $usage unless @ARGV == 7;
+
+#get the input arguments
+my $p_valuesInputFile = $ARGV[0];
+my $lambdaValue =  $ARGV[1];
+my $pi0_method =  $ARGV[2];
+my $fdr_level =  $ARGV[3];
+my $robustValue =  $ARGV[4];
+my $q_valuesOutputFile = $ARGV[5];
+my $p_q_values_histograms_QPlotsFile = $ARGV[6];
+
+if($lambdaValue =~ /sequence/){
+	$lambdaValue = "seq(0, 0.95, 0.05)";
+}
+
+#open the input files
+open (INPUT, "<", $p_valuesInputFile) || die("Could not open file $p_valuesInputFile \n");
+open (OUTPUT1, ">", $q_valuesOutputFile) || die("Could not open file $q_valuesOutputFile \n");
+open (OUTPUT2, ">", $p_q_values_histograms_QPlotsFile) || die("Could not open file $p_q_values_histograms_QPlotsFile \n");
+#open (ERROR,  ">", "error.txt")  or die ("Could not open file error.txt \n");
+
+#save all error messages into the error file $errorFile using the error file handle ERROR
+#STDERR -> fdopen( \*ERROR,  "w" ) or die ("Could not direct errors to the error file error.txt \n");
+
+#warn "Hello Error File \n";
+
+#variable to store the name of the R script file
+my $r_script;
+
+# R script to implement the calcualtion of q-values based on multiple simultaneous tests p-values 	
+# construct an R script file and save it in a temp directory
+chdir $tdir;
+$r_script = "q_values_computation.r";
+
+open(Rcmd,">", $r_script) or die "Cannot open $r_script \n\n"; 
+print Rcmd "
+	#options(show.error.messages = FALSE);
+	
+	#load necessary packages
+	suppressPackageStartupMessages(library(tcltk));
+	library(qvalue);
+	
+	#read the p-values of the multiple simultaneous tests from the input file $p_valuesInputFile
+	p <- scan(\"$p_valuesInputFile\", quiet = TRUE);
+	
+	#compute the q-values that correspond to the p-values of the multiple simultaneous tests
+	qobj <- qvalue(p, pi0.meth = \"$pi0_method\", lambda = $lambdaValue, fdr.level = $fdr_level, robust = $robustValue);
+	#qobj <- qvalue(p, pi0.meth = \"smoother\", lambda = seq(0, 0.95, 0.05), fdr.level = 0.05);
+	#qobj <- qvalue(p, pi0.meth = \"bootstrap\", fdr.level = 0.05);
+	
+	#draw the p-values histogram, the q-values histogram, and the four Q-plots 
+	# and save them on multiple pages of the output file $p_q_values_histograms_QPlotsFile
+	pdf(file = \"$p_q_values_histograms_QPlotsFile\", width = 6.25, height = 6, family = \"Times\", pointsize = 12, onefile = TRUE)
+	hist(qobj\$pvalues);
+	#dev.off();
+	
+	hist(qobj\$qvalues);
+	#dev.off(); 
+	
+	qplot(qobj);  
+	dev.off();
+	
+	#save the q-values in the output file $q_valuesOutputFile
+	qobj\$pi0 <- signif(qobj\$pi0,digits=6)
+	qwrite(qobj, filename=\"$q_valuesOutputFile\"); 
+
+	#options(show.error.messages = TRUE);
+	#eof\n";
+close Rcmd;	
+
+system("R --no-restore --no-save --no-readline < $r_script > $r_script.out");
+
+#close the input and output and error files
+#close(ERROR);
+close(OUTPUT2);
+close(OUTPUT1);
+close(INPUT);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compute_q_values.xml	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,158 @@
+<tool id="compute_q_values" name="Compute q-values" version="1.0.1">
+  <description>based on multiple simultaneous tests p-values</description>
+  <requirements>
+    <requirement type="package" version="2.11.0">R</requirement>
+    <requirement type="package" version="1.34.0">bioc_qvalue</requirement>
+  </requirements>
+  <command interpreter="perl">
+  	compute_q_values.pl $inputFile1 $inputLambda2 $inputPI0_method3 $inputFDR_level4 $inputRobust5 $outputFile1 $outputFile2
+  </command>
+
+  <inputs>
+  	<param format="tabular" name="inputFile1" type="data" label="Select the p-values file"/>
+  	
+  	<param type="text" name="inputLambda2" size="100" value="sequence_from_0_to_0.95_increment_0.05" label="What is the lambda value?" help="Either choose the default sequence or one deciaml value between 0 and 1"/>
+  	
+  	<param name="inputPI0_method3" type="select" label="Choose the PI method:">
+    	<option value="smoother">smoother</option>
+      	<option value="bootstrap">bootstrap</option>
+    </param>
+    
+    <param type="float" name="inputFDR_level4" size="5" value="" label="What is the FDR level?" help="The FDR level must be between 0 and 1"/>
+    
+    <param name="inputRobust5" type="select" label="Do you want to make the estimate more robust:" help="Choose TRUE for small p-values">
+  		<option value="FALSE">FALSE</option>
+    	<option value="TRUE">TRUE</option>
+    </param>
+  </inputs>
+  
+  <outputs>
+    <data format="tabular" name="outputFile1"/>
+    <data format="pdf" name="outputFile2"/>
+  </outputs>
+
+  <tests>
+  	<test>
+  		<param name="inputFile1" value="p_values.tabular" ftype="tabular" />
+    	<param name="inputLambda2" value="sequence_from_0_to_0.95_increment_0.05" />
+    	<param name="inputPI0_method3" value="smoother" />
+    	<param name="inputFDR_level4" value="0.05" />
+    	<param name="inputRobust5" value="FALSE" />
+    	<output name="outputFile1" file="q_values.tabular" />
+    	<output name="outputFile1" file="p_q_hists_Q_plots.pdf" />
+  		</test>
+  </tests>
+  	
+  <help> 
+
+.. class:: infomark
+
+**What it does**
+
+This program computes the q-values based on the p-values of multiple simultaneous tests. The q-values are computed using a specific R package, created by John Storey and Alan Dabney, called "qvalue". The program takes five inputs:
+ 
+- The first input is a TABULAR format file consisting of one column only that represents the p-values of multiple simultaneous tests, one line for every p-value. 
+- The second input is the lambda parameter. The user can choose either the default: seq(0, 0.95, 0.05) or a decimal number between 0.0 and 1.0.
+- The third input is PI method which is either "smoother" or "bootstrap".
+- The fourth input is the FDR (false discovery rate) level which is a decimal number between 0.0 and 1.0.
+- The fifth input is either TRUE or FALSE for the estimate robustness. 
+
+The program gives two outputs:
+
+- The first output is a TABULAR format file consisting of three columns: 
+
+ - the left column represents the p-values of multiple simultaneous tests, one line for every p-value
+ - the middle column represents the q-values corresponding to the p-values
+ - the third column represent the significance values, either 1 for significant or 0 for non-significant 
+
+- The second output is a PDF format file consisting of three pages: 
+
+ - the first page represents the p-values histogram
+ - the second page represents the q-values histogram
+ - the third page represents the four Q-plots as introduced in the "qvalue" package manual.
+  
+
+**Example**
+
+Let us have the first input file of p-values as follows::
+
+	0.140627492
+	0.432249886
+	0.122120877
+	0.142010182
+	0.012909858
+	0.000142807
+	0.039841941
+	0.035173303
+	0.011340057
+	1.01E-05
+	0.212738282
+	0.091256284
+	0.547375415
+	0.189589833
+	6.18E-12
+	0.001235875
+	1.10E-05
+	9.75E-07
+	2.13E-18
+	2.54E-16
+	1.20E-19
+	9.76E-14
+	0.359181534
+	0.03661672
+	0.400459987
+	0.387436466
+	0.342075061
+	0.904129283
+	0.031152635
+
+Running the program will give the following output::
+
+	pi0: 0.140311054	
+
+	FDR level: 0.05
+
+	p-value		q-value		significant
+	0.1406275	0.02889212	1
+	0.4322499	0.06514199	0
+	0.1221209	0.02760624	1
+	0.1420102	0.02889212	1
+	0.01290986	0.00437754	1
+	0.000142807	6.46E-05	1
+	0.03984194	0.01013235	1
+	0.0351733	0.009932946	1
+	0.01134006	0.004194811	1
+	1.01E-05	5.59E-06	1
+	0.2127383	0.03934711	1
+	0.09125628	0.02184257	1
+	0.5473754	0.07954578	0
+	0.1895898	0.03673547	1
+	6.18E-12	5.03E-12	1
+	0.001235875	0.00050288	1
+	1.10E-05	5.59E-06	1
+	9.75E-07	6.61E-07	1
+	2.13E-18	4.33E-18	1
+	2.54E-16	3.45E-16	1
+	1.20E-19	4.88E-19	1
+	9.76E-14	9.93E-14	1
+	0.3591815	0.06089654	0
+	0.03661672	0.009932946	1
+	0.40046	0.0626723	0
+	0.3874365	0.0626723	0
+	0.3420751	0.06051785	0
+	0.9041293	0.1268593	0
+	0.03115264	0.009750824	1
+	
+	
+.. image:: ${static_path}/operation_icons/p_hist.png
+
+
+.. image:: ${static_path}/operation_icons/q_hist.png
+
+
+.. image:: ${static_path}/operation_icons/Q_plots.png
+
+
+  </help>  
+  
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/p_q_hists_Q_plots.pdf	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,884 @@
+%PDF-1.4
+%ρ\r
+1 0 obj
+<<
+/CreationDate (D:20110222115850)
+/ModDate (D:20110222115850)
+/Title (R Graphics Output)
+/Producer (R 2.11.0)
+/Creator (R)
+>>
+endobj
+2 0 obj
+<<
+/Type /Catalog
+/Pages 3 0 R
+>>
+endobj
+5 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 6 0 R
+/Resources 4 0 R
+>>
+endobj
+6 0 obj
+<<
+/Length 7 0 R
+>>
+stream
+1 J 1 j q
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 158.58 397.75 Tm [(Histogram of qobj$pv) 10 (alues)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 207.55 18.72 Tm [(qobj$pv) 25 (alues)] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 197.96 Tm [(Frequenc) 15 (y)] TJ
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+72.40 73.44 m 406.40 73.44 l S
+72.40 73.44 m 72.40 66.24 l S
+139.20 73.44 m 139.20 66.24 l S
+206.00 73.44 m 206.00 66.24 l S
+272.80 73.44 m 272.80 66.24 l S
+339.60 73.44 m 339.60 66.24 l S
+406.40 73.44 m 406.40 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 64.90 47.52 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 131.70 47.52 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 198.50 47.52 Tm (0.4) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 265.30 47.52 Tm (0.6) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 332.10 47.52 Tm (0.8) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 398.90 47.52 Tm (1.0) Tj
+ET
+59.04 84.53 m 59.04 336.65 l S
+59.04 84.53 m 51.84 84.53 l S
+59.04 147.56 m 51.84 147.56 l S
+59.04 210.59 m 51.84 210.59 l S
+59.04 273.62 m 51.84 273.62 l S
+59.04 336.65 m 51.84 336.65 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 81.53 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 141.56 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 204.59 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 267.62 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 330.65 Tm (40) Tj
+ET
+Q q 59.04 73.44 360.72 299.52 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+72.40 84.53 33.40 277.33 re S
+105.80 84.53 33.40 75.64 re S
+139.20 84.53 33.40 88.24 re S
+172.60 84.53 33.40 56.73 re S
+206.00 84.53 33.40 63.03 re S
+239.40 84.53 33.40 18.91 re S
+272.80 84.53 33.40 12.61 re S
+306.20 84.53 33.40 18.91 re S
+339.60 84.53 33.40 25.21 re S
+373.00 84.53 33.40 18.91 re S
+Q
+endstream
+endobj
+7 0 obj
+1847
+endobj
+8 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 9 0 R
+/Resources 4 0 R
+>>
+endobj
+9 0 obj
+<<
+/Length 10 0 R
+>>
+stream
+1 J 1 j q
+Q q 59.04 73.44 360.72 299.52 re W n
+Q q
+BT
+0.000 0.000 0.000 rg
+/F3 1 Tf 14.00 0.00 -0.00 14.00 158.58 397.75 Tm [(Histogram of qobj$qv) 10 (alues)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 207.55 18.72 Tm [(qobj$qv) 25 (alues)] TJ
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 197.96 Tm [(Frequenc) 15 (y)] TJ
+ET
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+72.40 73.44 m 406.40 73.44 l S
+72.40 73.44 m 72.40 66.24 l S
+139.20 73.44 m 139.20 66.24 l S
+206.00 73.44 m 206.00 66.24 l S
+272.80 73.44 m 272.80 66.24 l S
+339.60 73.44 m 339.60 66.24 l S
+406.40 73.44 m 406.40 66.24 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 12.00 0.00 -0.00 12.00 61.90 47.52 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 128.70 47.52 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 195.50 47.52 Tm (0.10) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 262.30 47.52 Tm (0.15) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 329.10 47.52 Tm (0.20) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 395.90 47.52 Tm (0.25) Tj
+ET
+59.04 84.53 m 59.04 361.87 l S
+59.04 84.53 m 51.84 84.53 l S
+59.04 153.87 m 51.84 153.87 l S
+59.04 223.20 m 51.84 223.20 l S
+59.04 292.53 m 51.84 292.53 l S
+59.04 361.87 m 51.84 361.87 l S
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 81.53 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 147.87 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 217.20 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 286.53 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 355.87 Tm (40) Tj
+ET
+Q q 59.04 73.44 360.72 299.52 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+72.40 84.53 66.80 277.33 re S
+139.20 84.53 66.80 152.53 re S
+206.00 84.53 66.80 187.20 re S
+272.80 84.53 66.80 55.47 re S
+339.60 84.53 66.80 48.53 re S
+Q
+endstream
+endobj
+10 0 obj
+1742
+endobj
+11 0 obj
+<<
+/Type /Page
+/Parent 3 0 R
+/Contents 12 0 R
+/Resources 4 0 R
+>>
+endobj
+12 0 obj
+<<
+/Length 13 0 R
+>>
+stream
+1 J 1 j q
+Q q 49.00 276.96 150.90 106.04 re W n
+Q q 49.00 276.96 150.90 106.04 re W n
+0.000 0.000 0.000 rg
+54.29 378.77 0.60 0.60 re f
+61.65 337.18 0.60 0.60 re f
+69.00 335.13 0.60 0.60 re f
+76.35 328.71 0.60 0.60 re f
+83.71 327.34 0.60 0.60 re f
+91.06 322.66 0.60 0.60 re f
+98.42 313.98 0.60 0.60 re f
+105.77 312.95 0.60 0.60 re f
+113.12 305.91 0.60 0.60 re f
+120.48 293.34 0.60 0.60 re f
+127.83 292.27 0.60 0.60 re f
+135.18 290.97 0.60 0.60 re f
+142.54 292.27 0.60 0.60 re f
+149.89 293.94 0.60 0.60 re f
+157.24 296.17 0.60 0.60 re f
+164.60 294.61 0.60 0.60 re f
+171.95 298.12 0.60 0.60 re f
+179.31 296.17 0.60 0.60 re f
+186.66 292.27 0.60 0.60 re f
+194.01 280.58 0.60 0.60 re f
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+54.59 276.96 m 172.25 276.96 l S
+54.59 276.96 m 54.59 270.98 l S
+84.01 276.96 m 84.01 270.98 l S
+113.42 276.96 m 113.42 270.98 l S
+142.84 276.96 m 142.84 270.98 l S
+172.25 276.96 m 172.25 270.98 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 48.34 255.44 Tm (0.0) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 77.76 255.44 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 107.17 255.44 Tm (0.4) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 136.59 255.44 Tm (0.6) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 166.00 255.44 Tm (0.8) Tj
+ET
+49.00 281.82 m 49.00 379.07 l S
+49.00 281.82 m 43.03 281.82 l S
+49.00 306.13 m 43.03 306.13 l S
+49.00 330.44 m 43.03 330.44 l S
+49.00 354.76 m 43.03 354.76 l S
+49.00 379.07 m 43.03 379.07 l S
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 275.57 Tm (0.2) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 299.88 Tm (0.4) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 324.19 Tm (0.6) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 348.51 Tm (0.8) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 372.82 Tm (1.0) Tj
+ET
+49.00 276.96 m
+199.90 276.96 l
+199.90 383.00 l
+49.00 383.00 l
+49.00 276.96 l
+S
+Q q 0.00 216.00 225.00 216.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F6 1 Tf 10.00 0.00 -0.00 10.00 121.71 229.32 Tm (l) Tj
+ET
+BT
+/F6 1 Tf 0.00 10.00 -10.00 0.00 10.86 318.74 Tm (p) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 8.29 319.14 Tm (^) Tj
+ET
+BT
+/F2 1 Tf 0.00 7.00 -7.00 0.00 12.43 324.23 Tm (0) Tj
+ET
+BT
+/F6 1 Tf 0.00 12.00 -12.00 0.00 10.86 327.73 Tm (\() Tj
+ET
+BT
+/F6 1 Tf 0.00 10.00 -10.00 0.00 10.86 331.73 Tm (l) Tj
+ET
+BT
+/F6 1 Tf 0.00 12.00 -12.00 0.00 10.86 337.22 Tm (\)) Tj
+ET
+Q q
+BT
+0.000 0.000 0.000 rg
+/F6 1 Tf 12.00 0.00 -0.00 12.00 99.40 385.00 Tm (p) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 99.88 388.07 Tm (^) Tj
+ET
+BT
+/F2 1 Tf 8.00 0.00 -0.00 8.00 105.99 383.11 Tm (0) Tj
+ET
+BT
+/F6 1 Tf 12.00 0.00 -0.00 12.00 112.95 385.00 Tm (=) Tj
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 122.50 385.00 Tm (0.244) Tj
+ET
+Q q 49.00 276.96 150.90 106.04 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+54.59 353.73 m
+61.95 346.82 l
+69.30 340.08 l
+76.65 333.59 l
+84.01 327.44 l
+91.36 321.68 l
+98.71 316.35 l
+106.07 311.49 l
+113.42 307.16 l
+120.78 303.41 l
+128.13 300.26 l
+135.48 297.71 l
+142.84 295.68 l
+150.19 294.07 l
+157.54 292.76 l
+164.90 291.62 l
+172.25 290.54 l
+179.60 289.46 l
+186.96 288.32 l
+194.31 287.15 l
+S
+Q q 274.00 276.96 150.90 106.04 re W n
+Q q 274.00 276.96 150.90 106.04 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+279.59 280.88 m
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.59 280.88 l
+279.60 280.90 l
+279.60 280.90 l
+279.60 280.90 l
+279.67 281.03 l
+279.67 281.04 l
+279.69 281.05 l
+279.69 281.06 l
+280.04 281.63 l
+280.31 282.04 l
+280.35 282.07 l
+281.46 283.69 l
+281.74 284.01 l
+286.17 290.12 l
+287.08 291.07 l
+289.78 294.34 l
+294.28 299.71 l
+297.65 303.37 l
+299.78 304.90 l
+299.99 304.90 l
+300.82 305.22 l
+302.69 306.69 l
+308.96 312.88 l
+327.65 330.96 l
+327.87 330.96 l
+330.49 332.46 l
+332.50 333.28 l
+347.76 345.18 l
+349.02 345.18 l
+350.40 345.18 l
+350.46 345.18 l
+351.90 345.18 l
+361.13 351.22 l
+361.93 351.22 l
+365.40 352.78 l
+370.80 355.86 l
+389.52 367.63 l
+391.08 367.63 l
+391.08 367.63 l
+399.04 370.47 l
+402.71 370.47 l
+402.94 370.47 l
+402.97 370.47 l
+408.05 372.63 l
+419.31 379.07 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+279.59 276.96 m 424.54 276.96 l S
+279.59 276.96 m 279.59 270.98 l S
+308.58 276.96 m 308.58 270.98 l S
+337.57 276.96 m 337.57 270.98 l S
+366.56 276.96 m 366.56 270.98 l S
+395.55 276.96 m 395.55 270.98 l S
+424.54 276.96 m 424.54 270.98 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 270.84 255.44 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 299.83 255.44 Tm (0.05) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 328.82 255.44 Tm (0.10) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 357.81 255.44 Tm (0.15) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 386.80 255.44 Tm (0.20) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 415.79 255.44 Tm (0.25) Tj
+ET
+274.00 280.88 m 274.00 380.49 l S
+274.00 280.88 m 268.03 280.88 l S
+274.00 300.80 m 268.03 300.80 l S
+274.00 320.73 m 268.03 320.73 l S
+274.00 340.65 m 268.03 340.65 l S
+274.00 360.57 m 268.03 360.57 l S
+274.00 380.49 m 268.03 380.49 l S
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 272.13 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 311.98 Tm (0.04) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 351.82 Tm (0.08) Tj
+ET
+274.00 276.96 m
+424.90 276.96 l
+424.90 383.00 l
+274.00 383.00 l
+274.00 276.96 l
+S
+Q q 225.00 216.00 225.00 216.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 333.43 231.54 Tm [(p-v) 25 (alue)] TJ
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 235.76 313.95 Tm [(q-v) 25 (alue)] TJ
+ET
+Q q 49.00 60.96 150.90 106.04 re W n
+Q q 49.00 60.96 150.90 106.04 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+54.59 64.88 m
+54.59 66.49 l
+54.59 68.10 l
+54.59 69.71 l
+54.59 71.32 l
+54.59 72.93 l
+54.59 74.54 l
+54.59 76.15 l
+54.59 77.76 l
+54.59 79.37 l
+54.59 80.98 l
+54.59 82.59 l
+54.59 84.20 l
+54.59 85.81 l
+54.59 87.42 l
+54.59 89.03 l
+54.59 90.64 l
+54.59 92.25 l
+54.61 93.86 l
+54.61 95.47 l
+54.61 97.08 l
+54.80 98.68 l
+54.82 100.29 l
+54.83 101.90 l
+54.85 103.51 l
+55.65 105.12 l
+56.24 106.73 l
+56.28 108.34 l
+58.58 109.95 l
+59.04 111.56 l
+67.74 113.17 l
+69.09 114.78 l
+73.74 116.39 l
+81.38 118.00 l
+86.59 119.61 l
+88.76 121.22 l
+88.76 122.83 l
+89.23 124.44 l
+91.32 126.05 l
+100.12 127.66 l
+125.86 129.27 l
+125.86 130.88 l
+127.99 132.49 l
+129.15 134.10 l
+146.09 135.71 l
+146.09 137.32 l
+146.09 138.93 l
+146.09 140.53 l
+146.09 142.14 l
+154.69 143.75 l
+154.69 145.36 l
+156.90 146.97 l
+161.29 148.58 l
+178.03 150.19 l
+178.03 151.80 l
+178.03 153.41 l
+182.08 155.02 l
+182.08 156.63 l
+182.08 158.24 l
+182.08 159.85 l
+185.15 161.46 l
+194.31 163.07 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+54.59 60.96 m 196.33 60.96 l S
+54.59 60.96 m 54.59 54.98 l S
+82.94 60.96 m 82.94 54.98 l S
+111.29 60.96 m 111.29 54.98 l S
+139.64 60.96 m 139.64 54.98 l S
+167.98 60.96 m 167.98 54.98 l S
+196.33 60.96 m 196.33 54.98 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 45.84 39.44 Tm (0.00) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 74.19 39.44 Tm (0.02) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 102.54 39.44 Tm (0.04) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 130.89 39.44 Tm (0.06) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 159.23 39.44 Tm (0.08) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 187.58 39.44 Tm (0.10) Tj
+ET
+49.00 63.27 m 49.00 159.85 l S
+49.00 63.27 m 43.03 63.27 l S
+49.00 79.37 m 43.03 79.37 l S
+49.00 95.47 m 43.03 95.47 l S
+49.00 111.56 m 43.03 111.56 l S
+49.00 127.66 m 43.03 127.66 l S
+49.00 143.75 m 43.03 143.75 l S
+49.00 159.85 m 43.03 159.85 l S
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 60.77 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 74.37 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 106.56 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 34.66 138.75 Tm (50) Tj
+ET
+49.00 60.96 m
+199.90 60.96 l
+199.90 167.00 l
+49.00 167.00 l
+49.00 60.96 l
+S
+Q q 0.00 0.00 225.00 216.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 92.54 15.54 Tm [(q-v) 25 (alue cut-of) 25 (f)] TJ
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 10.76 82.83 Tm [(signif) 20 (icant tests)] TJ
+ET
+Q q 274.00 60.96 150.90 106.04 re W n
+Q q 274.00 60.96 150.90 106.04 re W n
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+279.59 64.88 m
+281.88 64.88 l
+284.17 64.88 l
+286.46 64.88 l
+288.75 64.88 l
+291.04 64.88 l
+293.33 64.88 l
+295.63 64.88 l
+297.92 64.88 l
+300.21 64.88 l
+302.50 64.88 l
+304.79 64.88 l
+307.08 64.88 l
+309.37 64.88 l
+311.66 64.88 l
+313.95 64.88 l
+316.24 64.88 l
+318.53 64.88 l
+320.82 64.89 l
+323.11 64.89 l
+325.40 64.89 l
+327.69 64.94 l
+329.98 64.94 l
+332.27 64.95 l
+334.56 64.95 l
+336.85 65.20 l
+339.14 65.39 l
+341.44 65.42 l
+343.73 66.19 l
+346.02 66.39 l
+348.31 69.50 l
+350.60 70.14 l
+352.89 72.04 l
+355.18 75.21 l
+357.47 77.58 l
+359.76 78.83 l
+362.05 79.21 l
+364.34 79.80 l
+366.63 81.12 l
+368.92 85.52 l
+371.21 98.00 l
+373.50 98.81 l
+375.79 100.65 l
+378.08 102.06 l
+380.37 111.55 l
+382.66 112.59 l
+384.95 113.62 l
+387.25 114.66 l
+389.54 115.70 l
+391.83 121.61 l
+394.12 122.74 l
+396.41 125.18 l
+398.70 128.98 l
+400.99 140.43 l
+403.28 141.83 l
+405.57 143.23 l
+407.86 147.25 l
+410.15 148.69 l
+412.44 150.14 l
+414.73 151.58 l
+417.02 155.15 l
+419.31 163.07 l
+S
+Q q
+0.000 0.000 0.000 RG
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+277.30 60.96 m 414.73 60.96 l S
+277.30 60.96 m 277.30 54.98 l S
+300.21 60.96 m 300.21 54.98 l S
+323.11 60.96 m 323.11 54.98 l S
+346.02 60.96 m 346.02 54.98 l S
+368.92 60.96 m 368.92 54.98 l S
+391.83 60.96 m 391.83 54.98 l S
+414.73 60.96 m 414.73 54.98 l S
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 274.80 39.44 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 295.21 39.44 Tm (10) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 318.11 39.44 Tm (20) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 341.02 39.44 Tm (30) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 363.92 39.44 Tm (40) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 386.83 39.44 Tm (50) Tj
+ET
+BT
+/F2 1 Tf 10.00 0.00 -0.00 10.00 409.73 39.44 Tm (60) Tj
+ET
+274.00 64.88 m 274.00 161.28 l S
+274.00 64.88 m 268.03 64.88 l S
+274.00 80.95 m 268.03 80.95 l S
+274.00 97.01 m 268.03 97.01 l S
+274.00 113.08 m 268.03 113.08 l S
+274.00 129.14 m 268.03 129.14 l S
+274.00 145.21 m 268.03 145.21 l S
+274.00 161.28 m 268.03 161.28 l S
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 62.38 Tm (0) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 78.45 Tm (1) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 94.51 Tm (2) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 110.58 Tm (3) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 126.64 Tm (4) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 142.71 Tm (5) Tj
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 259.66 158.78 Tm (6) Tj
+ET
+274.00 60.96 m
+424.90 60.96 l
+424.90 167.00 l
+274.00 167.00 l
+274.00 60.96 l
+S
+Q q 225.00 0.00 225.00 216.00 re W n
+BT
+0.000 0.000 0.000 rg
+/F2 1 Tf 10.00 0.00 -0.00 10.00 318.30 15.54 Tm [(signif) 20 (icant tests)] TJ
+ET
+BT
+/F2 1 Tf 0.00 10.00 -10.00 0.00 235.76 66.69 Tm [(e) 15 (xpected f) 10 (alse positiv) 15 (es)] TJ
+ET
+Q
+endstream
+endobj
+13 0 obj
+11038
+endobj
+3 0 obj
+<<
+/Type /Pages
+/Kids [
+5 0 R
+8 0 R
+11 0 R
+]
+/Count 3
+/MediaBox [0 0 450 432]
+>>
+endobj
+4 0 obj
+<<
+/ProcSet [/PDF /Text]
+/Font <</F2 15 0 R /F3 16 0 R /F6 17 0 R >>
+/ExtGState << >>
+>>
+endobj
+14 0 obj
+<<
+/Type /Encoding
+/BaseEncoding /WinAnsiEncoding
+/Differences [ 45/minus 96/quoteleft
+144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent
+/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
+>>
+endobj
+15 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Times-Roman
+/Encoding 14 0 R
+>> endobj
+16 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Times-Bold
+/Encoding 14 0 R
+>> endobj
+17 0 obj <<
+/Type /Font
+/Subtype /Type1
+/Name /F6
+/BaseFont /Symbol
+>> endobj
+xref
+0 18
+0000000000 65535 f 
+0000000021 00000 n 
+0000000164 00000 n 
+0000015307 00000 n 
+0000015403 00000 n 
+0000000213 00000 n 
+0000000293 00000 n 
+0000002193 00000 n 
+0000002213 00000 n 
+0000002293 00000 n 
+0000004089 00000 n 
+0000004110 00000 n 
+0000004192 00000 n 
+0000015285 00000 n 
+0000015507 00000 n 
+0000015765 00000 n 
+0000015865 00000 n 
+0000015964 00000 n 
+trailer
+<<
+/Size 18
+/Info 1 0 R
+/Root 2 0 R
+>>
+startxref
+16042
+%%EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/p_values.tabular	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,104 @@
+0.140627492
+0.432249886
+0.122120877
+0.142010182
+0.012909858
+0.000142807
+0.039841941
+0.035173303
+0.011340057
+1.01E-05
+0.212738282
+0.091256284
+0.547375415
+0.189589833
+6.18E-12
+0.001235875
+1.10E-05
+9.75E-07
+2.13E-18
+2.54E-16
+1.20E-19
+9.76E-14
+0.359181534
+0.03661672
+0.400459987
+0.387436466
+0.342075061
+0.904129283
+0.031152635
+0.192291058
+0.437124583
+0.277275459
+0.087793283
+0.212338628
+0.240978806
+0.147992575
+0.29686964
+1.76E-25
+0.000177302
+0.723415697
+0.082881604
+0.406304527
+0.281528123
+0.83848178
+0.622982165
+0.384561646
+0.386866855
+0.117564737
+0.001311515
+0.025337876
+0.317341701
+0.758855602
+0.893904741
+0.192291058
+0.534845889
+0.119743614
+0.122225863
+0.00321982
+0.393640803
+0.851268223
+0.206016554
+0.493358194
+0.221548695
+0.050657449
+0.650946275
+0.000766626
+0.017573735
+1.04E-05
+0.000129641
+0.000160473
+1.66E-10
+1.98E-16
+5.14E-08
+0.212786809
+0.003709354
+0.379936041
+0.293121715
+1.80E-27
+1.38E-20
+9.55E-07
+3.40E-37
+0.569660945
+0.277275459
+0.083264512
+0.993910216
+0.929394391
+0.277275459
+0.445814529
+0.034816588
+0.259597445
+0.425425014
+0.45953669
+0.443668416
+0.317341701
+1.35E-08
+1.51E-12
+1.21E-07
+7.58E-12
+0.124718201
+0.747944686
+0.413176878
+0.157312584
+0.828166803
+0.295507577
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/q_values.tabular	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,109 @@
+pi0: 0.243864 
+
+FDR level: 0.05 
+
+p-value q-value significant 
+0.1406275 0.07062033 0
+0.4322499 0.1299617 0
+0.1221209 0.06455266 0
+0.1420102 0.07062033 0
+0.01290986 0.01023180 1
+0.000142807 0.0001574715 1
+0.03984194 0.02590934 1
+0.0351733 0.0241097 1
+0.01134006 0.009277564 1
+1.01e-05 1.318815e-05 1
+0.2127383 0.08994434 0
+0.09125628 0.05260058 0
+0.5473754 0.1525542 0
+0.1895898 0.08708663 0
+6.18e-12 1.424873e-11 1
+0.001235875 0.001160890 1
+1.1e-05 1.328476e-05 1
+9.75e-07 1.373765e-06 1
+2.13e-18 9.003446e-18 1
+2.54e-16 8.052378e-16 1
+1.2e-19 6.086837e-19 1
+9.76e-14 2.750348e-13 1
+0.3591815 0.1231013 0
+0.03661672 0.02443860 1
+0.40046 0.1269549 0
+0.3874365 0.1259756 0
+0.3420751 0.1188445 0
+0.9041293 0.2248075 0
+0.03115264 0.02257393 1
+0.1922911 0.08708663 0
+0.4371246 0.1299617 0
+0.2772755 0.1065486 0
+0.08779328 0.05178133 0
+0.2123386 0.08994434 0
+0.2409788 0.09857518 0
+0.1479926 0.07218002 0
+0.2968696 0.1075593 0
+1.76e-25 1.487893e-24 1
+0.000177302 0.0001798681 1
+0.7234157 0.1931278 0
+0.0828816 0.05027951 0
+0.4063045 0.1272176 0
+0.2815281 0.1065681 0
+0.8384818 0.2148023 0
+0.6229822 0.1698921 0
+0.3845616 0.1259756 0
+0.3868669 0.1259756 0
+0.1175647 0.06455266 0
+0.001311515 0.001187943 1
+0.02533788 0.01890043 1
+0.3173417 0.1117828 0
+0.7588556 0.1984119 0
+0.8939047 0.2244658 0
+0.1922911 0.08708663 0
+0.5348459 0.1507185 0
+0.1197436 0.06455266 0
+0.1222259 0.06455266 0
+0.00321982 0.002815879 1
+0.3936408 0.1263727 0
+0.8512682 0.2158971 0
+0.2060166 0.08994434 0
+0.4933582 0.1405895 0
+0.2215487 0.09211275 0
+0.05065745 0.03211913 1
+0.6509463 0.1756296 0
+0.000766626 0.0007478089 1
+0.01757374 0.01350612 1
+1.04e-05 1.318815e-05 1
+0.000129641 0.0001494514 1
+0.000160473 0.0001695786 1
+1.66e-10 3.238509e-10 1
+1.98e-16 7.173772e-16 1
+5.14e-08 8.69065e-08 1
+0.2127868 0.08994434 0
+0.003709354 0.003135866 1
+0.3799360 0.1259756 0
+0.2931217 0.1075593 0
+1.8e-27 2.282564e-26 1
+1.38e-20 8.749828e-20 1
+9.55e-07 1.373765e-06 1
+3.4e-37 8.623019e-36 1
+0.569661 0.1570395 0
+0.2772755 0.1065486 0
+0.08326451 0.05027951 0
+0.9939102 0.2423786 0
+0.9293944 0.2288459 0
+0.2772755 0.1065486 0
+0.4458145 0.1299617 0
+0.03481659 0.0241097 1
+0.2595974 0.1045058 0
+0.425425 0.1299617 0
+0.4595367 0.1324396 0
+0.4436684 0.1299617 0
+0.3173417 0.1117828 0
+1.35e-08 2.445604e-08 1
+1.51e-12 3.829635e-12 1
+1.21e-07 1.917988e-07 1
+7.58e-12 1.602022e-11 1
+0.1247182 0.06455266 0
+0.7479447 0.1975962 0
+0.4131769 0.1277917 0
+0.1573126 0.07527799 0
+0.8281668 0.2143247 0
+0.2955076 0.1075593 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Tue Apr 01 10:53:54 2014 -0400
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="R" version="2.11.0">
+      <repository changeset_revision="6e1b17857732" name="package_r_2_11_0" owner="devteam" prior_installation_required="False" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="bioc_qvalue" version="1.34.0">
+      <repository changeset_revision="11735242a19e" name="package_bioc_qvalue_1_34_0" owner="devteam" prior_installation_required="False" toolshed="http://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>