... | ... |
@@ -21,7 +21,7 @@ setClass("GmapAlignerParam", |
21 | 21 |
extra = "list")) |
22 | 22 |
|
23 | 23 |
setClass("GmapParam", |
24 |
- representation(suboptimal_score = "integer", |
|
24 |
+ representation(suboptimal_score = "integer_OR_NULL", |
|
25 | 25 |
splicing = "logical", |
26 | 26 |
format = "character"), |
27 | 27 |
contains="GmapAlignerParam") |
... | ... |
@@ -31,7 +31,7 @@ setClass("GmapParam", |
31 | 31 |
### |
32 | 32 |
|
33 | 33 |
GmapParam <- function(genome, unique_only = FALSE, |
34 |
- suboptimal_score = 0L, mode = "standard", |
|
34 |
+ suboptimal_score = NULL, mode = "standard", |
|
35 | 35 |
snps = NULL, |
36 | 36 |
npaths = if (unique_only) 1L else 100L, |
37 | 37 |
quiet_if_excessive = unique_only, nofails = unique_only, |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@126394 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -5,13 +5,13 @@ |
5 | 5 |
### High-level interface to gmap. |
6 | 6 |
### |
7 | 7 |
|
8 |
-setClassUnion("GmapSnpsORNULL", c("GmapSnps", "NULL")) |
|
8 |
+setClassUnion("GmapSnps_OR_NULL", c("GmapSnps", "NULL")) |
|
9 | 9 |
|
10 | 10 |
setClass("GmapAlignerParam", |
11 | 11 |
representation(genome = "GmapGenome", |
12 |
- part = "characterORNULL", |
|
12 |
+ part = "character_OR_NULL", |
|
13 | 13 |
batch = "character", |
14 |
- snps = "GmapSnpsORNULL", |
|
14 |
+ snps = "GmapSnps_OR_NULL", |
|
15 | 15 |
mode = "character", |
16 | 16 |
nthreads = "integer", |
17 | 17 |
npaths = "integer", |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@110840 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,60 @@ |
1 |
+### ========================================================================= |
|
2 |
+### GmapParam class |
|
3 |
+### ------------------------------------------------------------------------- |
|
4 |
+### |
|
5 |
+### High-level interface to gmap. |
|
6 |
+### |
|
7 |
+ |
|
8 |
+setClassUnion("GmapSnpsORNULL", c("GmapSnps", "NULL")) |
|
9 |
+ |
|
10 |
+setClass("GmapAlignerParam", |
|
11 |
+ representation(genome = "GmapGenome", |
|
12 |
+ part = "characterORNULL", |
|
13 |
+ batch = "character", |
|
14 |
+ snps = "GmapSnpsORNULL", |
|
15 |
+ mode = "character", |
|
16 |
+ nthreads = "integer", |
|
17 |
+ npaths = "integer", |
|
18 |
+ quiet_if_excessive = "logical", |
|
19 |
+ nofails = "logical", |
|
20 |
+ split_output = "logical", |
|
21 |
+ extra = "list")) |
|
22 |
+ |
|
23 |
+setClass("GmapParam", |
|
24 |
+ representation(suboptimal_score = "integer", |
|
25 |
+ splicing = "logical", |
|
26 |
+ format = "character"), |
|
27 |
+ contains="GmapAlignerParam") |
|
28 |
+ |
|
29 |
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
30 |
+### Constructor |
|
31 |
+### |
|
32 |
+ |
|
33 |
+GmapParam <- function(genome, unique_only = FALSE, |
|
34 |
+ suboptimal_score = 0L, mode = "standard", |
|
35 |
+ snps = NULL, |
|
36 |
+ npaths = if (unique_only) 1L else 100L, |
|
37 |
+ quiet_if_excessive = unique_only, nofails = unique_only, |
|
38 |
+ split_output = !unique_only, |
|
39 |
+ splicing = TRUE, |
|
40 |
+ nthreads = 1L, part = NULL, batch = "2", |
|
41 |
+ format = c("gff3_gene", "gff3_match_cdna", |
|
42 |
+ "gff3_match_est", "sampe", "samse", "psl", |
|
43 |
+ "splicesites", "introns", |
|
44 |
+ "map_exons", "map_ranges", "coords"), |
|
45 |
+ ...) |
|
46 |
+{ |
|
47 |
+ format <- match.arg(format) |
|
48 |
+ newGmapAlignerParam("GmapParam", genome, snps) |
|
49 |
+} |
|
50 |
+ |
|
51 |
+### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
52 |
+### Coercion |
|
53 |
+### |
|
54 |
+ |
|
55 |
+setAs("GmapParam", "list", function(from) { |
|
56 |
+ to <- GmapAlignerParam_asList(from) |
|
57 |
+ to$nosplicing <- !to$splicing |
|
58 |
+ to$splicing <- NULL |
|
59 |
+ to |
|
60 |
+ }) |