useDynLib(beadarray)
import(Biobase)
import(graphics)
import(AnnotationDbi)
import(GenomicRanges)
import(IRanges)
importFrom(reshape2, melt)
importFrom(ggplot2, ggplot, aes,
           geom_boxplot, geom_tile, geom_hline, geom_vline, geom_point, stat_binhex,
           scale_fill_gradient, scale_fill_discrete, scale_fill_gradient2,
           xlab, ylab, labs, ggtitle,
           theme_bw, theme, facet_wrap, 
           element_blank, element_text,
           ggsave)

importFrom(BiocGenerics, annotation, "annotation<-",plotMA)

importFrom(limma, normalizeQuantiles, neqc, lmFit, arrayWeights,makeContrasts,contrasts.fit, eBayes)

import(BeadDataPackR)
#import(illuminaio)

importFrom(stats4, plot, summary)
importFrom(BiocGenerics, boxplot, combine)

## suggested by R CMD check
importFrom("grDevices", "col2rgb", "dev.off", "jpeg", "pdf", "png",
           "rainbow", "rgb")
importFrom("methods", "as", "callNextMethod", "is", "new")
importFrom("stats", "aggregate", "approx", "density", "loess",
           "lowess", "model.matrix", "p.adjust", "predict", "runif")
importFrom("utils", "data", "menu", "packageDescription", "read.csv",
           "read.table", "setTxtProgressBar", "txtProgressBar",
           "write.csv", "write.table")

exportClasses(beadLevelData, ExpressionSetIllumina, illuminaChannel, beadRegistrationData,limmaResults)
exportMethods(show, "[[", dim, sectionNames, numBeads, boxplot, exprs, se.exprs,nObservations,Detection, annotation, "annotation<-","se.exprs<-","exprs<-", "nObservations<-", "Detection<-", qcData, combine, DesignMatrix, ContrastMatrix, ArrayWeights, LogFC, LogOdds, PValue,"ArrayWeights<-", "LogFC<-", "LogOdds<-", "PValue<-" ,"DesignMatrix<-", "ContrastMatrix<-")

export(insertBeadData, removeBeadData, getBeadData, plotChipLayout, createTargetsFile,  quickSummary, summarize, identifyControlBeads, insertSectionData, backgroundCorrectSingleSection, beadarrayUsersGuide, suggestAnnotation, addFeatureData)


## Data input
export(readIllumina, readLocsFile, convertBeadLevelList, readIdatFiles)

## Dealing with Swath data
export(processSwathData)

## Raw image manipulation
export(readTIFF, plotTIFF)

## Image processing
export(illuminaForeground, illuminaBackground, illuminaSharpen, medianBackground)

## Transformations
export(logGreenChannelTransform, logRedChannelTransform, logRatioTransform, greenChannelTransform, redChannelTransform,greenChannel)

## QC
export(plotBeadIntensities, genericBeadIntensityPlot, poscontPlot, outlierplot, imageplot, checkRegistration, makeQCTable, expressionQCPipeline, calculateOutlierStats, controlProbeDetection, plotBeadLocations, makeControlProfile, combinedControlPlot)

## BASH etc.
export(BASH, HULK, generateNeighbours, BASHCompact, BASHDiffuse, BASHExtended, setWeights,showArrayMask)

## Summary Data
export(readBeadSummaryData,  normaliseIllumina, medianNormalise,calculateDetection)

## Deprecated functions.
exportClasses(BeadLevelList)
export(checkPlatform)
export(getAnnotation, setAnnotation)
export(beadStatusVector)
export(plotMAXY)
##outlier methods

export(illuminaOutlierMethod, squeezedVarOutlierMethod, weightsOutlierMethod, noOutlierMethod)


##metrics methods

exportMethods(metrics, p95, snr)

##sample sheet

export(readSampleSheet)
#exportMethods(sampleSheet, "sampleSheet<-")

export(makeGEOSubmissionFiles, createGEOMeta,createGEOMatrix)


export(limmaDE)
