Commit 81c97798 authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent 985a6b27
......@@ -837,6 +837,10 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){
#' correlation\strong{:}
#' numeric vector with values between \eqn{0} and \eqn{1}
#'
#' @param spec
#' number of cores\strong{:}
#' positive integer
#'
#' @details
#' Automatic adjustment of the number of permutations
#' such that Bonferroni-significant p-values are possible.
......@@ -844,7 +848,7 @@ test.single <- function(Y,X,map,i,limit=NULL,steps=NULL,rho=c(0,0.5,1)){
#' @examples
#' NA
#'
test.multiple <- function(Y,X,map,rho=c(0,0.5,1)){
test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=4){
p <- nrow(map$genes)
......@@ -871,7 +875,7 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1)){
# parallel computation
type <- ifelse(test=.Platform$OS.type=="windows",yes="PSOCK",no="FORK")
cluster <- parallel::makeCluster(spec=8,type=type)
cluster <- parallel::makeCluster(spec=spec,type=type)
parallel::clusterSetRNGStream(cl=cluster,iseed=1)
parallel::clusterExport(cl=cluster,varlist=c("Y","X","map","limit","steps","rho"),envir=environment())
start <- Sys.time()
......
......@@ -120,7 +120,7 @@
</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>))</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'>4</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
......@@ -144,6 +144,11 @@ matrix with \(n\) rows (samples) and \(q\) columns (SNPs)</p></td>
<th>rho</th>
<td><p>correlation<strong>:</strong>
numeric vector with values between \(0\) and \(1\)</p></td>
</tr>
<tr>
<th>spec</th>
<td><p>number of cores<strong>:</strong>
positive integer</p></td>
</tr>
</table>
......
......@@ -4,7 +4,7 @@
\alias{test.multiple}
\title{Conduct multiple tests}
\usage{
test.multiple(Y, X, map, rho = c(0, 0.5, 1))
test.multiple(Y, X, map, rho = c(0, 0.5, 1), spec = 4)
}
\arguments{
\item{Y}{exon expression\strong{:}
......@@ -18,6 +18,9 @@ matrix with \eqn{n} rows (samples) and \eqn{q} columns (SNPs)}
\item{rho}{correlation\strong{:}
numeric vector with values between \eqn{0} and \eqn{1}}
\item{spec}{number of cores\strong{:}
positive integer}
}
\description{
This function ...
......
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