git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68697 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -21,5 +21,9 @@ snpindex <- function(name, genome, destdir = NULL, |
21 | 21 |
.snpindex <- function(sourcedir = NULL, db, destdir = NULL, snpsdb, |
22 | 22 |
.iitfile = NULL) |
23 | 23 |
{ |
24 |
+ if (is.null(destdir) && !file.exists(destdir)) { |
|
25 |
+ stop("The destination directory for the SNPs has not been created.", |
|
26 |
+ " Perhaps run GmapSnpDirectory with the \"create\" arg set to TRUE.") |
|
27 |
+ } |
|
24 | 28 |
.system(commandLine("snpindex")) |
25 | 29 |
} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68172 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,25 @@ |
1 |
+### ========================================================================= |
|
2 |
+### snpindex command |
|
3 |
+### ------------------------------------------------------------------------- |
|
4 |
+### |
|
5 |
+ |
|
6 |
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
7 |
+### High-level wrapper |
|
8 |
+### |
|
9 |
+ |
|
10 |
+snpindex <- function(name, genome, destdir = NULL, |
|
11 |
+ iitfile = paste(name, "iit", sep = ".")) |
|
12 |
+{ |
|
13 |
+ .snpindex(sourcedir = path(directory(genome)), db = genome(genome), |
|
14 |
+ destdir = destdir, snpsdb = name, .iitfile = iitfile) |
|
15 |
+} |
|
16 |
+ |
|
17 |
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
18 |
+### Low-level wrapper |
|
19 |
+### |
|
20 |
+ |
|
21 |
+.snpindex <- function(sourcedir = NULL, db, destdir = NULL, snpsdb, |
|
22 |
+ .iitfile = NULL) |
|
23 |
+{ |
|
24 |
+ .system(commandLine("snpindex")) |
|
25 |
+} |