Changes

From Genome Analysis Wiki
Jump to navigationJump to search
Line 144: Line 144:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
The confidence intervals are calculated using the fact that the standard uniform order statistics follow a beta distribution. The default settings will draw confidence intervals around the 1000 more significant points. You can change that with the <tt>conf.points=</tt> parameter and you can change the alpha level from the default .05 using the <tt>conf.alpha=</tt> parameter. If you wish to disable the confidence interval, use <tt>draw.conf=F</tt> in your call to <tt>qqunif.plot()</tt>.
+
=== Under the Hood: Multiple P-value Lists ===
   −
This function does thin the data by rounding the observer and expected -log10 p-values to two places by default. You can control the thinning with the <tt>should.thin=</tt>, <tt>thin.obs.places=</tt>, and <tt>thin.exp.places=</tt> parameters.
+
If you are comparing two-test or want to show data before and after it has been corrected for genomic control, you can pass multiple sets of p-values to the function via a list.
 
  −
The function should also accept any other lattice graphing parameters should you want to change the plot title (<tt>main=</tt>), plotting character (<tt>pch=</tt>), or plot colors (<tt>col=</tt> for points, <tt>conf.col=</tt> for confidence interval). By default the <tt>aspect="iso"</tt> parameter is set which ensures that the reference line lies on a 45-degree angle. If you have very significant results, this may make your plot taller than you would like. You can set the parameter to <tt>aspect="fill"</tt> to use the standard layout which stretches the values on each axis to take up as much room as possible.
     −
If you are comparing two-test or want to show data before and after it has been corrected for genomic control, you can pass multiple sets of p-values to the function via a list.
   
<syntaxhighlight lang="rsplus">
 
<syntaxhighlight lang="rsplus">
 
my.pvalue.list<-list("Study 1"=runif(10000), "Study 2"=runif(10000,0,.90))
 
my.pvalue.list<-list("Study 1"=runif(10000), "Study 2"=runif(10000,0,.90))
Line 156: Line 153:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Note that the confidence interval drawn depends on the total number of p-values given. When you pass in a list, the number of tests the confidence interval uses is determined by the vector with the '''least number of p-values''' - this gives the widest, most conservative confidence bands. Internally the different groups are drawn using the lattice superpose settings, so if you want more control over the color and shapes, you can use the <tt>par.settings=list(superpose.symbol=)</tt> settings. Furthermore, you can use any of the lattice methods of adding a legend to your plot. The names used in the legend correspond to the names of the elements in the list you pass in.
+
Internally the different groups are drawn using the lattice superpose settings, so if you want more control over the color and shapes, you can use the <tt>par.settings=list(superpose.symbol=)</tt> settings. Furthermore, you can use any of the lattice methods of adding a legend to your plot. The names used in the legend correspond to the names of the elements in the list you pass in.
 +
 
 +
=== Under the Hood: Confidence Intervals ===
 +
 
 +
The confidence intervals are calculated using the fact that the standard uniform order statistics follow a beta distribution. The default settings will draw confidence intervals around the 1000 more significant points. You can change that with the <tt>conf.points=</tt> parameter and you can change the alpha level from the default .05 using the <tt>conf.alpha=</tt> parameter. If you wish to disable the confidence interval, use <tt>draw.conf=F</tt> in your call to <tt>qqunif.plot()</tt>.
 +
 
 +
Note that the confidence interval drawn depends on the total number of p-values given. When you pass in a list, the number of tests the confidence interval uses is determined by the vector with the '''least number of p-values''' - this gives the widest, most conservative confidence bands.
 +
 
 +
=== Under the Hood: Thinning the Data ===
 +
 
 +
This function does thin the data by rounding the observer and expected -log10 p-values to two places by default. You can control the thinning with the <tt>should.thin=</tt>, <tt>thin.obs.places=</tt>, and <tt>thin.exp.places=</tt> parameters.
 +
 
 +
=== Under the Hood: Customizing Graphics ===
 +
 
 +
The function should also accept any other lattice graphing parameters should you want to change the plot title (<tt>main=</tt>), plotting character (<tt>pch=</tt>), or plot colors (<tt>col=</tt> for points, <tt>conf.col=</tt> for confidence interval). By default the <tt>aspect="iso"</tt> parameter is set which ensures that the reference line lies on a 45-degree angle. If you have very significant results, this may make your plot taller than you would like. You can set the parameter to <tt>aspect="fill"</tt> to use the standard layout which stretches the values on each axis to take up as much room as possible.
    
== R Base Graphics ==
 
== R Base Graphics ==

Navigation menu