useDynLib(casper)

import(Biobase, EBarrays, IRanges, graphics, GenomicRanges, methods)
importFrom(BiocGenerics, "%in%", strand, "strand<-")
importFrom(coda, as.mcmc)
importFrom("grDevices", "rainbow")
importFrom(gaga, fitGG, fitNNSingleHyp, getpar, parest, simnewsamples, simGG)
importFrom(GenomeInfoDb, seqlengths)
importFrom(GenomicFeatures, transcripts, exonsBy, makeTxDb)
importClassesFrom(GenomicFeatures, TxDb)
importFrom(gtools, rdirichlet)
importFrom(limma, lmFit, contrasts.fit, treat)
importFrom(mgcv,gam,predict.gam,s)
importMethodsFrom(Rsamtools, scanBam, scanBamHeader, ScanBamParam)
importFrom(Rsamtools, scanBamFlag)
importFrom(rtracklayer, import)
importFrom(stats, aggregate, approxfun, coef, dmultinom, dnbinom,
             dpois, gaussian, integrate, nlminb, p.adjust,
             pexp, pgamma, pnorm, ppoints, qexp, qgamma,
             qnorm, rgamma, rmultinom, rnorm, runif, uniroot)
importFrom(S4Vectors, expand, Rle, DataFrame, isSingleStringOrNA, isTRUEorFALSE, queryHits, subjectHits)
importFrom(sqldf, sqldf)
importFrom(survival,Surv,survfit)
importFrom(utils, data, head, tail)
importMethodsFrom(VGAM, Coef, model.matrix, predict)
importFrom(VGAM,vglm,betabinomial)

#export regular functions
export(asymmetryCheck, calcDenovo, calcExp, casperDesign, createDenovoGenome, denovoExpr, getDistrs, getIsland, genePlot, getRoc, matchTranscripts, mergeBatches, mergeExp, modelPrior, pathCounts, plotPriorAS, posprob, probNonEquiv, procBam, procGenome, pvalTreat, qqgammaGenomeWide, qqnormGenomeWide, quantileNorm, relexprByGene, rmShortInserts, simMAE, simMultSamples, simReads, transcripts, variants, "variants<-", getReads, getNreads, getChr, getIsland, subsetGenome, txLength, wrapKnown, wrapDenovo, simMAEcheck)

exportClasses(annotatedGenome, simulatedSamples, pathCounts, procBam)
#export general methods
exportMethods("plot","lines","coef","[","[[","as.list")

