import(methods)
import(utils)
import(GGBase)
import(data.table)

importMethodsFrom(Biostrings, nchar)
importFrom(Biostrings, nchar)
importFrom(Rsamtools, "headerTabix", "isOpen", "close.TabixFile", "open.TabixFile")
importFrom(Biostrings, nchar)
importMethodsFrom(Biostrings, nchar)

importFrom(stats, IQR)

importFrom(stats4, plot)

importFrom(BiocGenerics, NROW)

importFrom(snpStats, snp.rhs.tests, p.value, col.summary, snp.rhs.estimates)

importFrom(ff, ff, as.ram, ffrowapply, filename, is.open)

importFrom(bit, chunk)

importFrom(Gviz, DataTrack, plotTracks, GeneRegionTrack, GenomeAxisTrack)

importFrom(AnnotationDbi, get, mget, revmap, mappedkeys)

importMethodsFrom(IRanges, aggregate, metadata)

importFrom(IRanges, RangedData, IRanges)

importMethodsFrom(IRanges, elementMetadata, as.matrix, findOverlaps, "elementMetadata<-",
	as.data.frame, values, start, ranges)

importFrom(Biobase, featureNames, annotation, pData, rowMin,
    selectSome, samples)

importClassFrom(GenomicRanges, GenomicRanges, GenomicRangesORmissing)
importMethodsFrom(GenomicRanges, seqnames, genome, c, "genome<-")
importFrom(GenomicRanges, GRanges, Seqinfo, genome, "genome<-", GRangesList)

importFrom(Rsamtools, TabixFile, path)
export(TabixFile)

importMethodsFrom(Rsamtools, scanTabix)

importClassFrom(GenomicRanges, GRanges, Seqinfo)

importClassFrom(Rsamtools, TabixFile)

importFrom(VariantAnnotation, scanVcfHeader)
importFrom(rtracklayer, import.gff3)

importClassFrom(IRanges, RangedData, DataTable, List, Vector, Annotated, 
	DataTableORNULL)

exportMethods("gwSnpTests", "show", "topFeats", "plot", transTab)

exportClasses("eqtlTestsManager", "eqtlEstimatesManager", "mcwBestCis",
   "gwSnpScreenResult", transManager, allSigCis, sensiCisInput,
   sensiCisOutput, mcwAllCis, cisRun, CisConfig, TransConfig)

export(gwSnpTests, topSnps, eqtlTests, topFeats, getCisMap, pData, plot,
	best.cis.eQTLs, chromsUsed, fullreport, 
	eqtlEstimates, probesManaged, snpsManaged,
	topScores, topGenes, locusNames, geneNames, geneIndcol, nthScores,
	vcf2sm, fdr, transScores, getBest, getAll, 
	getCall, transTab, meqtlTests, meta.best.cis.eQTLs, meta.All.cis.eQTLs,
	meta.transScores, annotation, sensanal, snplocsDefault, 
	richNull, meta.bindmaf, meta.richNull, pifdr, 
 	All.cis, collectBest, 
        collectFiltered, cis.FDR.filter.SNPcentric, cis.FDR.filter.best)

export(best.trans.eQTLs, chrFilter, All.cis)


export("chrnames", "chrnames<-", "estimates", "estimates<-", 
"excludeRadius", "excludeRadius<-", "exFilter", "exFilter<-", 
"folderStem", "folderStem<-", "gchrpref", "gchrpref<-", "geneannopk", 
"geneannopk<-", "geneApply", "geneApply<-", "keepMapCache", "keepMapCache<-", 
"nperm", "nperm<-", "radius", 
"radius<-", "rhs", "rhs<-", "schrpref", "schrpref<-", 
"shortfac", "shortfac<-", "smchrpref", "smchrpref<-", 
"smFilter", "smFilter<-", "smpack", "smpack<-", "snpannopk", 
"snpannopk<-", "SSgen", "SSgen<-",
"cis.FDR.filter.SNPcentric.complete", "binqq", "qqhex",
 "gffprocess", "simpleTiling", "cgff2dt", "ciseqByCluster", "scoresCis",
 "binnedQQ", "transeqByCluster", "transeqByChrom", "cisScores")

exportMethods("chrnames", "chrnames<-", "estimates", "estimates<-", 
"excludeRadius", "excludeRadius<-", "exFilter", "exFilter<-", 
"folderStem", "folderStem<-", "gchrpref", "gchrpref<-", "geneannopk", 
"geneannopk<-", "geneApply", "geneApply<-", "keepMapCache", "keepMapCache<-", 
"nperm", "nperm<-", "radius", 
"radius<-", "rhs", "rhs<-", "schrpref", "schrpref<-", 
"shortfac", "shortfac<-", "smchrpref", "smchrpref<-", 
"smFilter", "smFilter<-", "smpack", "smpack<-", "snpannopk", 
"snpannopk<-", "SSgen", "SSgen<-")

export(concatCis, eqtlTests.me, plotsens, inflammFilter)

exportMethods("snpchr", "snpchr<-", "gbufsize", "gbufsize<-",
 "batchsize", "batchsize<-", "extraProps", "extraProps<-")

importFrom(hexbin, hexbin)
importClassFrom(hexbin, hexbin)

export(update_fdr_filt, filtgen.maf.dist, eqsens_dt, "genome<-",
  buildConfList, add878, addgwhit, cisAssoc, sampsInVCF, appraise, calfig)

importFrom(iterators, nextElem, idiv)

importFrom(ROCR, prediction, performance)
importFrom(biglm, biglm, bigglm, bigglm.function,
  bigglm.data.frame, bigglm.RODBC)

