#############################
##
## IMPORT
##
#############################

##For S4 usage
import("methods")
#import("Matrix")
import("GenomicRanges")
import("IRanges")

##Package used in HiTC
importFrom("RColorBrewer", "brewer.pal")
importFrom("Matrix", "Matrix", "sparseMatrix", "t")
importFrom("Seqinfo", "seqlevels", "sortSeqlevels", "seqlengths")
importFrom("parallel", "mclapply")
importFrom("grDevices", "col2rgb", "colorRampPalette", "dev.off", "pdf", "pdf.options", "png")
importFrom("graphics", "plot", "image", "abline", "axis", "text", "barplot", "hist", "layout", "legend", "lines", "par", "points", "rect")
importFrom("stats", "prcomp", "approx", "density", "glm", "lm", "lowess", "residuals")
importFrom("utils", "combn", "object.size", "packageVersion", "read.table", "write.table")

##importFrom("MASS", "glm.nb")
importMethodsFrom("Biostrings", "detail")
importMethodsFrom("rtracklayer", "import", "export")
importMethodsFrom("Matrix", "colMeans", "colSums", "crossprod", "diag", "forceSymmetric", "isTriangular", "rowSums", "nnzero")

#############################
##
## EXPORT
##
#############################

##Export functions and generics
export(
    "HTCexp","HTClist",
    "binningC",
    "exportC", "export.my5C", "importC", "import.my5C",
    "removeIntervals", "setIntervalScale",   
    "CQC", "intervalsDist",
    "extractRegion",
    "pca.hic","getPearsonMap",
    "getExpectedCounts", "normLGF","normICE", "setGenomicFeatures",
    "getAnnotatedRestrictionSites", "getRestrictionFragmentsPerChromosome",
    "discretize",
    "directionalityIndex"
)

##Export classes
exportClasses("HTCexp", "HTClist")

##Export Methods
exportMethods(
    "intdata", "intdata<-",
    "id",
    "y_intervals", "y_intervals<-", "x_intervals", "x_intervals<-", "xy_intervals",
    "getCombinedIntervals", "getCombinedContacts",
    "forcePairwise", "forceTriangular",
    "isComplete", "isPairwise",
    "isBinned", "isIntraChrom",
    "divide", "substract",
    "mapC",
    "summary",
    "as.list", "c", "detail", "show",
    "plot",
    "seqlevels",
    "range", "ranges", "reduce",
    "substract", "divide",
    "forcePairwise", "forceSymmetric", "forceTriangular",
    "isTriangular", "isSymmetric",    
    "normPerReads", "normPerTrans", "normPerExpected"
    )



