useDynLib(GSVA)

import(methods)

importClassesFrom(Biobase, ExpressionSet)
importClassesFrom(SummarizedExperiment, SummarizedExperiment)
importClassesFrom(GSEABase, GeneSetCollection)
importClassesFrom(SingleCellExperiment, SingleCellExperiment)
importClassesFrom(Matrix, dgCMatrix)
importClassesFrom(DelayedArray, DelayedArray)
importClassesFrom(HDF5Array, HDF5Array)

importMethodsFrom(Biobase, featureNames,
                           phenoData,
                           experimentData,
                           exprs,
                           annotation)

importMethodsFrom(S4Vectors, metadata,
                             "metadata<-")
importMethodsFrom(IRanges, match)

importMethodsFrom(SummarizedExperiment, assays,
                                        colData)

importMethodsFrom(GSEABase, geneIds,
                            incidence)

importMethodsFrom(BiocParallel, bpiterate,
                                "bpworkers<-",
                                bplapply,
                                "bpprogressbar<-")

importFrom(graphics, plot)
importFrom(stats, ecdf,
                  na.omit,
                  sd)
importFrom(utils, installed.packages,
                  setTxtProgressBar,
                  txtProgressBar,
                  read.csv,
                  write.csv)
importFrom(S4Vectors, SimpleList)
importFrom(IRanges, CharacterList)
importFrom(GSEABase, AnnoOrEntrezIdentifier,
                     mapIdentifiers,
                     getGmt)
importFrom(SummarizedExperiment, SummarizedExperiment)
importFrom(parallel, splitIndices)
importFrom(BiocParallel, SerialParam,
                         MulticoreParam,
                         multicoreWorkers,
                         bpnworkers)
importFrom(SingleCellExperiment, SingleCellExperiment)
importFrom(sparseMatrixStats, colRanks)
importFrom(DelayedArray, rowAutoGrid,
			  colAutoGrid,
			  defaultAutoGrid,
			  currentBlockId,
			  read_block, 
			  viewportReduce,
			  write_block,
			  close,
			  t)
importFrom(HDF5Array, HDF5RealizationSink,
                      writeHDF5Array)
importFrom(DelayedMatrixStats, rowSds)
importFrom(BiocSingular, runRandomSVD)

exportMethods(gsva,
              filterGeneSets,
              computeGeneSetsOverlap)

export(igsva)
