### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Imports
import(S4Vectors)
import(Biobase)
import(NanoStringNCTools)
import(ggplot2)
importClassesFrom(S4Vectors, DataFrame)
importClassesFrom(NanoStringNCTools, SignatureSet)
importFrom(rjson, fromJSON)
importFrom(readxl, read_xlsx)
importFrom(EnvStats, geoMean)
importFrom(reshape2, dcast)
importFrom(utils, read.csv)
importFrom(stats, as.formula)
importFrom(stats, quantile)
importFrom(stats, anova)
importFrom(stats, formula)
importFrom(stats, p.adjust)
importFrom(methods, callGeneric)
importFrom(methods, callNextMethod)
importFrom(methods, is)
importFrom(methods, new)
importFrom(methods, validObject)
importFrom(dplyr, bind_rows)
importFrom(utils, capture.output)
importFrom(utils, write.table)
importFrom("utils", "packageVersion")
importFrom(data.table, data.table, .SD, as.data.table)
importFrom(lmerTest, lmer)
importFrom(lmerTest, ls_means)
importFrom(parallel, mclapply)
importFrom(parallel, parLapply)
importFrom(parallel, makeCluster)
importFrom(parallel, stopCluster)
importFrom(stringr, str_split)
importFrom(BiocGenerics, design)
importFrom(BiocGenerics, "design<-")
importFrom(BiocGenerics, getObjectSlots)
importFrom(BiocGenerics, updateObject)
importFrom("grDevices", "col2rgb", "colors", "rgb")
importFrom("graphics", "abline", "axis", "boxplot", "legend", "pairs",
           "par", "points")
importFrom(stats, median)
importFrom("stats", "pt", "qt", "uniroot")
importFrom(rlang, expr_text)
importFrom(GGally, ggpairs)
importFrom(GGally, wrap)
importFrom(SeuratObject,as.Seurat)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 classes

exportClasses(NanoStringGeoMxSet)

### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 generics

export(NanoStringGeoMxSet, sData, svarLabels, dimLabels, "dimLabels<-",
       featureType, "featureType<-",
       signatures, "signatures<-", signatureScores,
       design, "design<-", signatureGroups,
       checkQCFlags)

### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 methods

exportMethods(NanoStringGeoMxSet, show, 
              sData, svarLabels, dimLabels, "dimLabels<-",
              featureType, "featureType<-",
              signatures, "signatures<-", signatureScores,
              design, "design<-", signatureGroups,
              checkQCFlags, normalize, analyte)

### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S3 methods

S3method(as.Seurat,NanoStringGeoMxSet)
S3method(as.SpatialExperiment,NanoStringGeoMxSet)

### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export non-generic functions

export(readNanoStringGeoMxSet,
       readDccFile,
       readPKCFile,
       writeNanoStringGeoMxSet)
export(aggregateCounts)
export(checkQCFlags)
export(countsShiftedByOne)
export(logtBase)
export(ngeoMean)
export(ngeoSD)
export(setSegmentQCFlags)
export(setBackgroundQCFlags)
export(setBioProbeQCFlags)
export(setGeoMxQCFlags)
export(setSeqQCFlags)
export(shiftCountsOne)
export(summarizeNegatives)
export(mixedModelDE)
export(iggNames)
export(hkNames)
export(computeNormalizationFactors)
export(qcProteinSignal)
export(plotConcordance)
export(plotNormFactorConcordance)
export(qcProteinSignalNames)
export(updateGeoMxSet)
export(as.Seurat)
export(as.SpatialExperiment)

