Browse code

version 1.5.3. Small fix of symCount for subAxt.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/CNEr@103638 bc3139a8-67e5-0310-9ffc-ced21a209358

Ge Tan authored on 11/05/2015 17:19:38
Showing 3 changed files

... ...
@@ -1,6 +1,6 @@
1 1
 Package: CNEr 
2
-Version: 1.5.2
3
-Date: 2015-05-07
2
+Version: 1.5.3
3
+Date: 2015-05-11
4 4
 Title: CNE Detection and Visualization
5 5
 Description: Large-scale identification and advanced visualization of sets of conserved noncoding elements.
6 6
 Author: Ge Tan <ge.tan09@imperial.ac.uk> 
... ...
@@ -3,21 +3,29 @@
3 3
 ### Exported!!
4 4
 
5 5
 setMethod("subAxt", signature(x="Axt", chr="character",
6
-                              start="numeric", end="numeric"),
6
+                              start="integer", end="integer"),
7 7
           function(x, chr, start, end, select=c("target", "query"), qSize=NULL){
8 8
             .subAxtMultiple(x, chr=chr, start=start, end=end,
9 9
                             select=select, qSize=qSize)
10 10
           }
11 11
           )
12 12
 
13
+setMethod("subAxt", signature(x="Axt", chr="character",
14
+                              start="numeric", end="numeric"),
15
+          function(x, chr, start, end, select=c("target", "query"), qSize=NULL){
16
+            subAxt(x, chr, as.integer(start), as.integer(end), 
17
+                   select=select, qSize=qSize)
18
+          }
19
+          )
20
+
13 21
 setMethod("subAxt", signature(x="Axt", chr="character",
14 22
                               start="missing", end="missing"),
15 23
           function(x, chr, start, end, select=c("target", "query"), qSize=NULL){
16 24
             select <- match.arg(select)
17 25
             if(select == "target"){
18
-              ans <- x[seqnames(targetRanges(x)) == chr]
26
+              ans <- x[seqnames(targetRanges(x)) %in% chr]
19 27
             }else{
20
-              ans <- x[seqnames(queryRanges(x)) == chr]
28
+              ans <- x[seqnames(queryRanges(x)) %in% chr]
21 29
             }
22 30
             return(ans)
23 31
           }
... ...
@@ -265,7 +273,7 @@ subAln <- function(x, start, end, select=c("target", "query")){
265 273
                                  strand=strand(queryRanges(x))),
266 274
              querySeqs=DNAStringSet(paste0(alignedSeq2[alnStart:alnEnd],
267 275
                                            collapse="")),
268
-             score=score(x), symCount=symCount(x))
276
+             score=score(x), symCount=alnEnd-alnStart+1L)
269 277
   return(ans)
270 278
 }
271 279
 
... ...
@@ -4,6 +4,7 @@
4 4
 \alias{subAxt-methods}
5 5
 \alias{subAxt,Axt,character,missing,missing-method}
6 6
 \alias{subAxt,Axt,character,numeric,numeric-method}
7
+\alias{subAxt,Axt,character,integer,integer-method}
7 8
 
8 9
 \title{ \code{subAxt} method}
9 10
 \description{