#  Calling the dynamic library.
useDynLib(diffHic, .registration=TRUE, .fixes="cxx_")

#  All functions exported, sorted by approximate function:
export(diffHicUsersGuide,
	cutGenome, segmentGenome,
    preparePairs, mergePairs, savePairs, prepPseudoPairs,
	getPairData, prunePairs, 
	loadChromos, loadData,
	DIList, pairParam,
    squareCounts, connectCounts, marginCounts, totalCounts, 
    correctedContact, normalizeCNV, matchMargins,
    getDistance, getArea,
	filterDirect, filterTrended, filterDiag,
	filterPeaks, enrichedPairs, neighborCounts,
    boxPairs, clusterPairs, consolidatePairs, diClusters,
    annotatePairs,
	compartmentalize, domainDirections,
    plotPlaid, rotPlaid, plotDI, rotDI,
    DI2IS
)

# Exporting the DIList class.
exportClasses(
    DIList, pairParam
)

exportMethods(
    anchors, targets, counts, regions, 
	asDGEList, normOffsets, reform
    , normalize
)
# asDGEList, normOffsets and normalize can be shuffled 
# into 'exports' when the DIList objects are finally removed,
# to ensure that they are accessible to the user.

# Requires several imports.
import(Rsamtools,Rhtslib,GenomicRanges,Biostrings,BSgenome,rhdf5,
	IRanges,S4Vectors,GenomeInfoDb,
	edgeR,limma,locfit,methods,csaw,
    InteractionSet,SummarizedExperiment
)
	
importFrom("BiocGenerics", counts)
importFrom("grDevices", col2rgb, rgb)
importFrom("graphics", box, par, plot, polygon, rect, text)
importFrom("stats", approx, approxfun, fitted, kmeans)
importFrom("utils", read.table, write.table)
