useDynLib("crlmm", .registration=TRUE)

## 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, phenoData,
                  "phenoData<-", protocolData, "protocolData<-",
                  pubMedIds, rowMedians, sampleNames, storageMode,
                  "storageMode<-", updateObject, varLabels)
importFrom(Biobase, assayDataElement, assayDataElementNames,
           assayDataElementReplace, assayDataNew, classVersion, validMsg)

## oligoClasses
importFrom(oligoClasses, position, chromosome)
importClassesFrom(oligoClasses, SnpSuperSet, AlleleSet)
importMethodsFrom(oligoClasses, 
		  allele,
                  calls, "calls<-",  
          	  confs, "confs<-",
	          cnConfidence, "cnConfidence<-", 
		  copyNumber, isSnp, chromosome, position, CA, "CA<-", CB, "CB<-",
		  rangedData, segmentData, "rangedData<-", "segmentData<-")
importFrom(oligoClasses, chromosome2integer, celfileDate)

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

importFrom(stats, update)

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)

importFrom(genefilter, rowSds)

importFrom(mvtnorm, dmvnorm)

importFrom(ellipse, ellipse)

export(celDates,  ##move to oligoClasses
       crlmm, 
       cnOptions,
       calls,
       "calls<-",
     snprma)

##exportMethods(computeHmm) ##move to VanillaICE
exportMethods(A, B, copyNumber)
export(crlmmCopynumber) 
export(ellipse) 
export(##viterbi.CNSet, ##move to VanillaICE
	combineIntensities,
	whichPlatform,
	isValidCdfName,
	crlmmWrapper,
##	computeHmm.CNSet, ##move to VanillaICE
        readIdatFiles,
        withinGenotypeMoments,  
##	trioOptions, ##move to VanillaICE
##	hmm.SnpSuperSet, ##move to VanillaICE
##	computeBpiEmission.SnpSuperSet,##move to VanillaICE
##  	isBiparental.matrix, ##move to VanillaICE
##	isBiparental.SnpSuperSet, ##move to VanillaICE
##	hapmapPedFile, ##move to VanillaICE
##       findFatherMother, 
	 locationAndScale, getParam.SnpSuperSet)