Commit 0b461e54 authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent d1cc60e6
......@@ -911,6 +911,7 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,steps=20){
limit <- ceiling(0.05*max/p)
steps <- diff(limit^seq(from=1,to=log(max)/log(limit),length.out=pmin(p,steps))) # was (p,20)
steps <- c(limit,round(steps)) # Or replace "limit" by "minimum # of permutations"!
steps[steps==0] <- 1
steps[length(steps)] <- max-sum(steps[-length(steps)])
}
......
......@@ -195,7 +195,7 @@
<a class="sourceLine" id="cb5-10" data-line-number="10"> </a>
<a class="sourceLine" id="cb5-11" data-line-number="11"> <span class="kw">rm</span>(<span class="dt">list=</span><span class="kw">setdiff</span>(<span class="kw">ls</span>(),<span class="kw">c</span>(<span class="st">"data"</span>,<span class="st">"chr"</span>,<span class="st">"path"</span>))); <span class="kw">gc</span>(); <span class="kw">cat</span>(<span class="st">"."</span>)</a>
<a class="sourceLine" id="cb5-12" data-line-number="12"> <span class="kw">load</span>(<span class="kw">file.path</span>(path,<span class="kw">paste0</span>(<span class="st">"temp."</span>,data,<span class="st">".chr"</span>,chr,<span class="st">".RData"</span>))); <span class="kw">cat</span>(<span class="st">"."</span>)</a>
<a class="sourceLine" id="cb5-13" data-line-number="13"> pvalue &lt;-<span class="st"> </span>spliceQTL<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/spliceQTL/topics/test.multiple">test.multiple</a></span>(<span class="dt">Y=</span>exons,<span class="dt">X=</span>snps,<span class="dt">map=</span>map,<span class="dt">rho=</span><span class="dv">1</span>,<span class="dt">spec=</span><span class="dv">16</span>); <span class="kw">cat</span>(<span class="st">"."</span>)</a>
<a class="sourceLine" id="cb5-13" data-line-number="13"> pvalue &lt;-<span class="st"> </span>spliceQTL<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/spliceQTL/topics/test.multiple">test.multiple</a></span>(<span class="dt">Y=</span>exons,<span class="dt">X=</span>snps,<span class="dt">map=</span>map,<span class="dt">rho=</span><span class="dv">1</span>,<span class="dt">spec=</span><span class="dv">16</span>,<span class="dt">steps=</span><span class="dv">30</span>); <span class="kw">cat</span>(<span class="st">"."</span>)</a>
<a class="sourceLine" id="cb5-14" data-line-number="14"> <span class="kw">save</span>(<span class="dt">object=</span>pvalue,<span class="dt">file=</span><span class="kw">file.path</span>(path,<span class="kw">paste0</span>(<span class="st">"pval."</span>,data,<span class="st">".chr"</span>,chr,<span class="st">".RData"</span>))); <span class="kw">cat</span>(<span class="st">"</span><span class="ch">\n</span><span class="st">"</span>)</a>
<a class="sourceLine" id="cb5-15" data-line-number="15"> }</a>
<a class="sourceLine" id="cb5-16" data-line-number="16"><span class="co">#q()</span></a>
......
......@@ -131,7 +131,7 @@ for(chr in 22:1){
rm(list=setdiff(ls(),c("data","chr","path"))); gc(); cat(".")
load(file.path(path,paste0("temp.",data,".chr",chr,".RData"))); cat(".")
pvalue <- spliceQTL::test.multiple(Y=exons,X=snps,map=map,rho=1,spec=16); cat(".")
pvalue <- spliceQTL::test.multiple(Y=exons,X=snps,map=map,rho=1,spec=16,steps=30); cat(".")
save(object=pvalue,file=file.path(path,paste0("pval.",data,".chr",chr,".RData"))); cat("\n")
}
#q()
......
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