Commit c4055146 authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent 3625726d
......@@ -2,7 +2,7 @@
export(adjust.covariates)
export(adjust.samples)
export(drop.trivial.genes)
export(drop.trivial)
export(map.exons)
export(map.genes)
export(map.snps)
......
......@@ -182,7 +182,7 @@ adjust.covariates <- function(x,offset,group){
map.genes <- function(chr,path=getwd(),release="GRCh37",build=71){
# check input
if(chr %in% 1:22){
if(!chr %in% 1:22){
stop("Invalid argument \"chr\".",call.=FALSE)
}
if(!release %in% c("NCBI36","GRCh37","GRCh38")){
......@@ -316,7 +316,7 @@ map.snps <- function(gene.chr,gene.start,gene.end,snp.chr,snp.pos,dist=10^3){
#' @export
#' @title
#' Drop "trivial" genes
#' Drop trivial test
#'
#' @description
#' This function
......@@ -326,12 +326,12 @@ map.snps <- function(gene.chr,gene.start,gene.end,snp.chr,snp.pos,dist=10^3){
#' (output from \code{map.genes}, \code{map.exons}, and \code{map.snps})
#'
#' @details
#' This functions drops genes without SNPs or with a single exon.
#' This functions drops tests for genes without SNPs or with a single exon.
#'
#' @examples
#' NA
#'
drop.trivial.genes <- function(map){
drop.trivial <- function(map){
# check input
if(length(map)!=3){
......@@ -366,10 +366,10 @@ drop.trivial.genes <- function(map){
stop("Genes without multiple exons.",call.=FALSE)
}
#map$genes <- map$genes[pass,]
#map$exons <- map$exons[pass]
#map$snps <- map$snps[pass,]
return(pass) # temporary
map$genes <- map$genes[pass,]
map$exons <- map$exons[pass]
map$snps <- map$snps[pass,]
return(map)
}
......
......@@ -90,8 +90,8 @@
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1">stats<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/stats/topics/Normal">rnorm</a></span>(<span class="dv">10</span>)</a></code></pre></div>
<pre><code>## [1] -0.5102516 -0.9053667 -0.3843858 -0.2003901 -0.8825564 -0.4837392
## [7] -0.2320180 0.9918950 1.0735842 0.2360493</code></pre>
<pre><code>## [1] 0.70736847 0.63344201 -0.10847742 0.44286567 -0.07326815
## [6] -0.61661042 0.41808907 1.53022899 -3.17186612 -1.04656881</code></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
......
......@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drop "trivial" genes — drop.trivial.genes • spliceQTL</title>
<title>Drop trivial test — drop.trivial • spliceQTL</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
......@@ -28,7 +28,7 @@
<meta property="og:title" content="Drop "trivial" genes drop.trivial.genes" />
<meta property="og:title" content="Drop trivial test — drop.trivial" />
<meta property="og:description" content="This function" />
<meta name="twitter:card" content="summary" />
......@@ -109,9 +109,9 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Drop "trivial" genes</h1>
<h1>Drop trivial test</h1>
<small class="dont-index">Source: <a href='https://github.com/rauschenberger/spliceQTL/blob/master/R/function.R'><code>R/function.R</code></a></small>
<div class="hidden name"><code>drop.trivial.genes.Rd</code></div>
<div class="hidden name"><code>drop.trivial.Rd</code></div>
</div>
<div class="ref-description">
......@@ -120,7 +120,7 @@
</div>
<pre class="usage"><span class='fu'>drop.trivial.genes</span>(<span class='no'>map</span>)</pre>
<pre class="usage"><span class='fu'>drop.trivial</span>(<span class='no'>map</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
......@@ -134,7 +134,7 @@
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<p>This functions drops genes without SNPs or with a single exon.</p>
<p>This functions drops tests for genes without SNPs or with a single exon.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
......
......@@ -141,12 +141,6 @@
<p><code><a href="map.snps.html">map.snps()</a></code> </p>
</td>
<td><p>Search for SNPs</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drop.trivial.genes.html">drop.trivial.genes()</a></code> </p>
</td>
<td><p>Drop "trivial" genes</p></td>
</tr><tr>
<!-- -->
<td>
......@@ -177,6 +171,12 @@
<p><code><a href="test.multiple.html">test.multiple()</a></code> </p>
</td>
<td><p>Conduct multiple tests</p></td>
</tr><tr>
<!-- -->
<td>
<p><code><a href="drop.trivial.html">drop.trivial()</a></code> </p>
</td>
<td><p>Drop trivial test</p></td>
</tr>
</tbody>
</table>
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/function.R
\name{drop.trivial.genes}
\alias{drop.trivial.genes}
\title{Drop "trivial" genes}
\name{drop.trivial}
\alias{drop.trivial}
\title{Drop trivial test}
\usage{
drop.trivial.genes(map)
drop.trivial(map)
}
\arguments{
\item{map}{list with names "genes", "exons", and "snps"
......@@ -14,7 +14,7 @@ drop.trivial.genes(map)
This function
}
\details{
This functions drops genes without SNPs or with a single exon.
This functions drops tests for genes without SNPs or with a single exon.
}
\examples{
NA
......
......@@ -8,5 +8,6 @@ vignette: >
---
```{r}
set.seed(1)
stats::rnorm(10)
```
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