Browse code

Updates for _R_CHECK_LENGTH_1_ & classEq

Panos Balomenos authored on 29/02/2020 09:59:36
Showing 4 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: DEsubs
2
-Version: 1.13.0
2
+Version: 1.13.1
3 3
 Date: 2017-07-23
4 4
 Title: DEsubs: an R package for flexible identification of
5 5
         differentially expressed subpathways using RNA-seq expression
... ...
@@ -2,7 +2,7 @@
2 2
                                 pathways='all')
3 3
 {
4 4
     # If a filename is given, read a text file from the 'User' directory.
5
-    if ( class(mRNAexpr) == 'character' )
5
+    if ( is(mRNAexpr, 'character') )
6 6
     {
7 7
         dir <- paste0(cache[['baseDir']], '//User') 
8 8
         mRNAexpr <- readLines(paste(dir, mRNAexpr, sep='//'))
... ...
@@ -43,9 +43,9 @@
43 43
     edgeList[idx] <- lapply(edgeList[idx], as.character)
44 44
 
45 45
     pathIds <- as.numeric(edgeList[, 4])
46
-    if ( pathways == 'Metabolic')
46
+    if ( 'Metabolic' %in% pathways )
47 47
         { edgeList <- edgeList[which(pathIds < 2000), ] }
48
-    if ( pathways == 'Non-Metabolic')
48
+    if ( 'Non-Metabolic' %in% pathways )
49 49
         { edgeList <- edgeList[which(pathIds >= 2000), ] }
50 50
 
51 51
     # Filter edgelist with gene within the RNA-seq data
... ...
@@ -91,7 +91,7 @@
91 91
     if ( !is.null(rankedList) )
92 92
     {
93 93
         # A filepath is given as input
94
-        if ( class(rankedList) != 'numeric')
94
+        if ( !is(rankedList, 'numeric') ) 
95 95
         {
96 96
             file <- rankedList
97 97
             rankedList.data <- read.table(file, dec = '.', sep=' ')
... ...
@@ -101,7 +101,7 @@
101 101
         # A ranked list of differentially expressed genes is given as input,
102 102
         # in the form of a named vector, storing the Q-values and the gene
103 103
         # names (the vector's names).
104
-        if ( class(rankedList) == 'numeric')
104
+        if ( is(rankedList, 'numeric') ) 
105 105
         { 
106 106
             genes <- rankedList 
107 107
         }
... ...
@@ -50,7 +50,8 @@
50 50
     if (is.null(limat))     { return(limat) }
51 51
 
52 52
     # If input is already a matrix, return original data.
53
-    if (class(limat) == 'matrix') { return(limat) }
53
+    if ( is(limat, 'matrix') )  
54
+        { return(limat) }
54 55
 
55 56
     # Find what type of data the list holds
56 57
     type <- NULL
... ...
@@ -1,3 +1,8 @@
1
+CHANGES IN VERSION 1.13.1
2
+------------------------
3
+
4
+    - Updates for _R_CHECK_LENGTH_1_LOGIC2_, _R_CHECK_LENGTH_1_CONDITION_, classEq.
5
+
1 6
 CHANGES IN VERSION 1.9.1
2 7
 ------------------------
3 8