*doc'ed ... arg to GmapSnps constructor
*added aliases for snps<- when first arg is a GmapGenomeDirectory
*test case for creating a GmapGenome via a DNAStringSet was
broken. Example sequence was too short for gmap_build to work
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@69386 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -10,7 +10,7 @@ Description: GSNAP and GMAP are a pair of tools to align short-read |
10 | 10 |
to work with GMAP and GSNAP from within R. In addition, it provides |
11 | 11 |
methods to tally alignment results on a per-nucleotide basis using |
12 | 12 |
the bam_tally tool. |
13 |
-Version: 0.99.21 |
|
13 |
+Version: 0.99.22 |
|
14 | 14 |
Depends: R (>= 2.15.0), methods, GenomicRanges |
15 | 15 |
Imports: IRanges, Rsamtools (>= 1.7.4), rtracklayer (>= 1.17.15), GenomicRanges, |
16 | 16 |
GenomicFeatures, Biostrings, VariantAnnotation, tools, Biobase |
... | ... |
@@ -24,7 +24,7 @@ setMethod("length", "GmapSnpDirectory", function(x) { |
24 | 24 |
|
25 | 25 |
setReplaceMethod("snps", c("GmapSnpDirectory", "character", "VCF"), |
26 | 26 |
function(x, name, genome = GmapGenome(genome(x)), |
27 |
- iitPath = tempdir(), ..., value) |
|
27 |
+ iitPath = tempdir(), value) |
|
28 | 28 |
{ |
29 | 29 |
gr <- rowData(value) |
30 | 30 |
values(gr) <- values(fixed(value))[c("REF", "ALT")] |
... | ... |
@@ -6,8 +6,10 @@ test_GmapGenome_constructor_DNAStringSet_noCreate <- function() { |
6 | 6 |
} |
7 | 7 |
|
8 | 8 |
test_GmapGenome_constructor_DNAStringSet_create <- function() { |
9 |
- dna <- Biostrings::DNAStringSet("ACTGTGTCAG") |
|
10 |
- names(dna) <- "test" |
|
9 |
+ set.seed(1) |
|
10 |
+ seq <- paste0(sample(c("A", "C", "G", "T"), 2000, replace=TRUE), |
|
11 |
+ collapse="") |
|
12 |
+ dna <- Biostrings::DNAStringSet(seq) |
|
11 | 13 |
genomeDir <- file.path(tempdir(), as.integer(runif(1) * 1000000000)) |
12 | 14 |
if (file.exists(genomeDir)) unlink(genomeDir, recursive=TRUE) |
13 | 15 |
dir.create(genomeDir, recursive=TRUE) |
... | ... |
@@ -7,6 +7,8 @@ |
7 | 7 |
\alias{length,GmapSnpDirectory-method} |
8 | 8 |
\alias{names,GmapSnpDirectory-method} |
9 | 9 |
\alias{path,GmapSnpDirectory-method} |
10 |
+\alias{snps<-,GmapSnpDirectory,character,VCF-method} |
|
11 |
+\alias{snps<-,GmapSnpDirectory,character,character-method} |
|
10 | 12 |
|
11 | 13 |
\title{Class \code{"GmapSnpDirectory"}} |
12 | 14 |
\description{ |
... | ... |
@@ -25,8 +25,10 @@ Objects can be created by calls of the form \code{GmapSnps(snps, |
25 | 25 |
\item{name}{If provided, the name to give the database of SNPs. If not |
26 | 26 |
provided, defauts to the \code{snps} argument.} |
27 | 27 |
\item{create}{If the directory provided in the \code{directory} |
28 |
- argument does not exist, create it.} |
|
29 |
- } |
|
28 |
+ argument does not exist, create it.} |
|
29 |
+ \item{...}{Additional arguments to be passed to the SNPs |
|
30 |
+ replacement method.} |
|
31 |
+} |
|
30 | 32 |
|
31 | 33 |
\section{Accessors}{ |
32 | 34 |
\describe{ |
... | ... |
@@ -36,8 +38,7 @@ Objects can be created by calls of the form \code{GmapSnps(snps, |
36 | 38 |
this \code{GmapSnps} object.} |
37 | 39 |
} |
38 | 40 |
} |
39 |
- |
|
40 |
- |
|
41 |
+ |
|
41 | 42 |
\section{Methods}{ |
42 | 43 |
\describe{ |
43 | 44 |
\item{directory}{\code{signature(x = "GmapSnps")}: ... } |