# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# IMPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
importClassesFrom(Biobase, AnnotatedDataFrame, AssayData, eSet, MIAxE,
    Versioned, VersionedBiobase, Versions)
importClassesFrom(CGHbase, cghCall, cghRaw, cghSeg)
importClassesFrom(methods, character, logical, matrix, missing, numeric)

importMethodsFrom(Biobase, AnnotatedDataFrame, assayData, classVersion, fData,
    "fData<-", featureData, featureNames, pData, "pData<-", phenoData,
    sampleNames, "sampleNames<-", varMetadata)
importMethodsFrom(CGHbase, bpend, bpstart, calls, "calls<-", chromosomes,
    copynumber, "copynumber<-", frequencyPlot, plot, probamp, "probamp<-",
    probdloss, "probdloss<-", probgain, "probgain<-", probloss, "probloss<-",
    probnorm, "probnorm<-", segmented, "segmented<-", "regions", "regions<-")
importMethodsFrom(methods, coerce, initialize, show)
importMethodsFrom(Rsamtools, scanBam, ScanBamParam, scanBamHeader)

importFrom(Biobase, assayDataElement, "assayDataElement<-",
    assayDataElementNames, assayDataElementReplace, assayDataNew)
importFrom(CGHcall, CGHcall, ExpandCGHcall, postsegnormalize)
importFrom(DNAcopy, CNA, segment, smooth.CNA, segments.summary)
importFrom(graphics, abline, axis, axTicks, box, contour, image, mtext, par,
    points, rect, segments, text)
importFrom(matrixStats, binCounts, madDiff, sdDiff, colSums2, rowSums2, colMeans2, rowMeans2, rowMedians, colMedians)
importFrom(methods, callNextMethod, new)
importFrom(R.utils, downloadFile)
importFrom(Rsamtools, scanBamFlag)
importFrom(stats, aggregate, approxfun, density, formula, lm, loess, median, predict, qnorm)
importFrom(utils, file_test, capture.output, data, maintainer, packageVersion, read.table, write.table)
importFrom(GenomicRanges, GRanges)
importFrom(IRanges, IRanges)
importFrom(future.apply, future_apply, future_lapply, future_mapply)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# EXPORTS
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#exportPattern("^[[:alpha:]]+")

export("addPhenodata")
export("applyFilters")
export("binReadCounts")
export("callBins")
export("compareToReference")
export("correctBins")
export("estimateCorrection")
export("exportBins")
export("frequencyPlot")
export("getBinAnnotations")
export("highlightFilters")
export("isobarPlot")
export("makeCgh")
export("noisePlot")
export("normalizeBins")
export("normalizeSegmentedBins")
export("plot")
export("poolRuns")
export("segmentBins")
export("smoothOutlierBins")

export("createBins")
export("calculateMappability")
export("calculateBlacklist")
export("calculateBlacklistByRegions")
export("iterateResiduals")

export("chromosomes")
export("bpstart")
export("bpend")

exportClasses("QDNAseqCopyNumbers")
exportClasses("QDNAseqReadCounts")

# EOF
