useDynLib("crlmm", .registration=TRUE)

## this is temporary
## exportPattern("^[^\\.]")

## Biobase
importClassesFrom(Biobase, AnnotatedDataFrame, AssayData, eSet, SnpSet,
		  NChannelSet, MIAME, Versioned, VersionedBiobase,
		  Versions)

importMethodsFrom(Biobase, annotation, "annotation<-",
                  annotatedDataFrameFrom, assayData, "assayData<-",
                  combine, dims, experimentData, "experimentData<-",
                  fData, featureData, "featureData<-", featureNames,
                  fvarMetadata, fvarLabels, pData, "pData<-", phenoData,
                  "phenoData<-", protocolData, "protocolData<-",
                  pubMedIds, rowMedians, sampleNames, snpCall,
                  snpCallProbability,
		  "snpCall<-", "snpCallProbability<-", storageMode,
                  "storageMode<-", updateObject, varLabels)

importFrom(Biobase, assayDataElement, assayDataElementNames,
           assayDataElementReplace, assayDataNew, classVersion,
           validMsg)

## oligoClasses
importClassesFrom(oligoClasses, SnpSuperSet, AlleleSet, CNSet)

importMethodsFrom(oligoClasses, allele, calls, "calls<-", confs,
		  "confs<-", cnConfidence, "cnConfidence<-", isSnp,
		  chromosome, position, A, B,
		  "A<-", "B<-", open, close, lM, flags,
		  batchStatistics, "batchStatistics<-", updateObject)


importFrom(oligoClasses, chromosome2integer, celfileDate, list.celfiles,
           copyNumber, initializeBigMatrix, initializeBigVector)


importFrom(graphics, abline, axis, layout, legend, mtext, par, plot,
           polygon, rect, segments, text, points, boxplot, lines)

importFrom(grDevices, grey)

importFrom(affyio, read.celfile.header, read.celfile)

importFrom(preprocessCore, normalize.quantiles.use.target, normalize.quantiles)

importFrom(utils, data, packageDescription, setTxtProgressBar, txtProgressBar)

importFrom(stats, coef, cov, dnorm, kmeans, lm, mad, median, quantile, sd, update)

importFrom(genefilter, rowSds)

importFrom(mvtnorm, dmvnorm)

importFrom(ellipse, ellipse)

importFrom(ff, ffdf, physical.ff, physical.ffdf)
importClassesFrom(oligoClasses, ffdf, ff_matrix)

exportMethods(lines)
exportMethods(CA, CB)
export(crlmm,
       crlmmIllumina,
       crlmmIllumina2,
       ellipseCenters,
       genotype,
       readIdatFiles,
       readIdatFiles2,
       snprma,
       snprma2,
       crlmm2,
       genotype2, genotypeLD,
       crlmmCopynumber2, crlmmCopynumberLD, crlmmCopynumber)
export(constructIlluminaCNSet)
##export(linesCNSet)
export(fit.lm1, fit.lm2, fit.lm3, fit.lm4, construct,
       dqrlsWrapper, fit.wls)
export(computeCopynumber, ACN)
export(totalCopyNumber)
export(cnrma, cnrma2)

exportMethods("A<-", "B<-", "nuA", "nuB", "phiA", "phiB", "nuA<-", "nuB<-", "phiA<-", "phiB<-")
exportMethods(Ns, medians, mads, tau2, corr)
exportClasses(ff_or_matrix)
export(genotypeSummary, summarizeSnps, summarizeNps, shrinkSummary, shrinkGenotypeSummaries, summarizeMaleXGenotypes,
       indexComplete)
export(Ns)
## For debugging
## exportPattern("^[^\\.]")