Commit 8b2c7f9b authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent 5ea85de2
...@@ -846,6 +846,10 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){ ...@@ -846,6 +846,10 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){
#' number of cores\strong{:} #' number of cores\strong{:}
#' positive integer #' positive integer
#' #'
#' @param min
#' minim chunk size\strong{:}
#' positive integer
#'
#' @param steps #' @param steps
#' number of iteration chunks\strong{:} #' number of iteration chunks\strong{:}
#' positive integer #' positive integer
...@@ -857,7 +861,7 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){ ...@@ -857,7 +861,7 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){
#' @examples #' @examples
#' NA #' NA
#' #'
test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,steps=20){ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,min=100,steps=20){
p <- nrow(map$genes) p <- nrow(map$genes)
...@@ -884,8 +888,8 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,steps=20){ ...@@ -884,8 +888,8 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,steps=20){
if(TRUE){ if(TRUE){
max <- p/0.05+1 max <- p/0.05+1
limit <- ceiling(0.05*max/p) limit <- ceiling(0.05*max/p)
steps <- diff(limit^seq(from=log(100),to=log(max)/log(limit),length.out=pmin(p,steps))) steps <- diff(limit^seq(from=log(min),to=log(max)/log(limit),length.out=pmin(p,steps)))
steps[steps<100] <- 100 steps[steps<min] <- min
for(i in 1:10){ for(i in 1:10){
cond <- steps>10^i & steps<10^(i+1) cond <- steps>10^i & steps<10^(i+1)
steps[cond] <- ceiling(steps[cond]/10^i)*10^i steps[cond] <- ceiling(steps[cond]/10^i)*10^i
......
...@@ -120,7 +120,8 @@ ...@@ -120,7 +120,8 @@
</div> </div>
<pre class="usage"><span class='fu'>test.multiple</span>(<span class='no'>Y</span>, <span class='no'>X</span>, <span class='no'>map</span>, <span class='kw'>rho</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>0.5</span>, <span class='fl'>1</span>), <span class='kw'>spec</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>steps</span> <span class='kw'>=</span> <span class='fl'>20</span>)</pre> <pre class="usage"><span class='fu'>test.multiple</span>(<span class='no'>Y</span>, <span class='no'>X</span>, <span class='no'>map</span>, <span class='kw'>rho</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='fl'>0</span>, <span class='fl'>0.5</span>, <span class='fl'>1</span>), <span class='kw'>spec</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>min</span> <span class='kw'>=</span> <span class='fl'>100</span>,
<span class='kw'>steps</span> <span class='kw'>=</span> <span class='fl'>20</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments"> <table class="ref-arguments">
...@@ -148,6 +149,11 @@ numeric vector with values between \(0\) and \(1\)</p></td> ...@@ -148,6 +149,11 @@ numeric vector with values between \(0\) and \(1\)</p></td>
<tr> <tr>
<th>spec</th> <th>spec</th>
<td><p>number of cores<strong>:</strong> <td><p>number of cores<strong>:</strong>
positive integer</p></td>
</tr>
<tr>
<th>min</th>
<td><p>minim chunk size<strong>:</strong>
positive integer</p></td> positive integer</p></td>
</tr> </tr>
<tr> <tr>
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
\alias{test.multiple} \alias{test.multiple}
\title{Conduct multiple tests} \title{Conduct multiple tests}
\usage{ \usage{
test.multiple(Y, X, map, rho = c(0, 0.5, 1), spec = 1, steps = 20) test.multiple(Y, X, map, rho = c(0, 0.5, 1), spec = 1, min = 100,
steps = 20)
} }
\arguments{ \arguments{
\item{Y}{exon expression\strong{:} \item{Y}{exon expression\strong{:}
...@@ -22,6 +23,9 @@ numeric vector with values between \eqn{0} and \eqn{1}} ...@@ -22,6 +23,9 @@ numeric vector with values between \eqn{0} and \eqn{1}}
\item{spec}{number of cores\strong{:} \item{spec}{number of cores\strong{:}
positive integer} positive integer}
\item{min}{minim chunk size\strong{:}
positive integer}
\item{steps}{number of iteration chunks\strong{:} \item{steps}{number of iteration chunks\strong{:}
positive integer} positive integer}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment