Browse code

Fixed gsva() method for signature matrix and GeneSetCollection.

Robert Castelo authored on 09/02/2021 12:11:44
Showing 2 changed files

... ...
@@ -1,5 +1,5 @@
1 1
 Package: GSVA
2
-Version: 1.39.16
2
+Version: 1.39.17
3 3
 Title: Gene Set Variation Analysis for microarray and RNA-seq data
4 4
 Authors@R: c(person("Justin", "Guinney", role=c("aut", "cre"), email="justin.guinney@sagebase.org"),
5 5
              person("Robert", "Castelo", role="aut", email="robert.castelo@upf.edu"),
... ...
@@ -418,7 +418,6 @@ setMethod("gsva", signature(expr="ExpressionSet", gset.idx.list="GeneSetCollecti
418 418
     ## 'annotation' argument
419 419
     mapped.gset.idx.list <- mapIdentifiers(gset.idx.list,
420 420
                                            AnnoOrEntrezIdentifier(annotpkg))
421
-    mapped.gset.idx.list <- geneIds(mapped.gset.idx.list) 
422 421
   } else {
423 422
     mapped.gset.idx.list <- gset.idx.list
424 423
     if (verbose) {
... ...
@@ -426,6 +425,7 @@ setMethod("gsva", signature(expr="ExpressionSet", gset.idx.list="GeneSetCollecti
426 425
         "Attempting to directly match identifiers in 'expr' to gene sets.", sep="\n")
427 426
     }
428 427
   }
428
+  mapped.gset.idx.list <- geneIds(mapped.gset.idx.list) 
429 429
 
430 430
   ## map to the actual features for which expression data is available
431 431
   mapped.gset.idx.list <- .mapGeneSetsToFeatures(mapped.gset.idx.list, rownames(expr))
... ...
@@ -486,6 +486,7 @@ setMethod("gsva", signature(expr="matrix", gset.idx.list="GeneSetCollection"),
486 486
     mapped.gset.idx.list <- mapIdentifiers(gset.idx.list,
487 487
                                            AnnoOrEntrezIdentifier(annotation))
488 488
   }
489
+  mapped.gset.idx.list <- geneIds(mapped.gset.idx.list)
489 490
   
490 491
   ## map to the actual features for which expression data is available
491 492
   mapped.gset.idx.list <- .mapGeneSetsToFeatures(mapped.gset.idx.list, rownames(expr))
... ...
@@ -984,7 +985,7 @@ setMethod("filterGeneSets", signature(gSets="list"),
984 985
 
985 986
 setMethod("filterGeneSets", signature(gSets="GeneSetCollection"),
986 987
           function(gSets, min.sz=1, max.sz=Inf) {
987
-  filterGeneSets(geneIds(gSets), min.sz., max.sz)
988
+  filterGeneSets(geneIds(gSets), min.sz, max.sz)
988 989
 })
989 990
 
990 991