import(methods)
import(Biostrings)
import(BSgenome)
import(GenomeInfoDb)
import(GenomicRanges)
import(GenomicAlignments)
import(IRanges)
import(Rsamtools)
import(S4Vectors)
import(ggplot2)
import(grid)
import(gridBase)
import(impute)
importMethodsFrom("rtracklayer", import)


#importMethodsFrom("GenomicRanges",elementMetadata,countOverlaps,findOverlaps, seqnames, seqlengths, strand,"strand<-")

#importClassesFrom("GenomicRanges",GRanges,GRangesList)

#importClassesFrom("IRanges", RangedData, RangedDataList, DataTable,
#                  Annotated, Vector, List, DataTable_OR_NULL, character_OR_NULL,
#                  RangedSelection, SimpleList, DataFrame,SimpleRleList,RleList,SimpleAtomicList,AtomicList,RleViews,RleViewsList)

#importFrom("IRanges", DataFrame, IRanges, RangedDataList, RangedData,
#           IntegerRangesList, Rle,matchMatrix,findOverlaps, RangedSelection,ranges,countOverlaps,subsetByOverlaps,elementMetadata,"elementMetadata<-",Views,viewApply,RleViewsList)

#importMethodsFrom("IRanges",nearest,as.data.frame,values,length,elementNROWS,width,start,end)

importFrom("data.table",data.table,dcast)
importFrom("data.table", rbindlist)
importFrom("graphics", "axis", "barplot", "image", "legend", "lines",
             "par", "pie", "plot", "plot.new", "plot.window", "polygon",
             "text")
importFrom("grDevices", "colorRamp", "hcl", "rainbow", "rgb")
importFrom("matrixStats",colMedians)
importFrom("matrixStats",colSds)
importFrom("matrixStats",colQuantiles)
importFrom("parallel", mclapply)
importFrom("plotrix", dispersion)
importFrom("plotrix", std.error)
importFrom("plyr",rbind.fill)
importFrom("readr", read_delim)
importFrom("readr", locale)
importFrom("reshape2", melt)
importFrom("seqPattern", motifScanScores)
importFrom("seqPattern", getPatternOccurrenceList)
importFrom("stats", "dist", "hclust", "pnorm", "runif")
importFrom("utils", "download.file", "read.table", "unzip")
importFrom(Rcpp, sourceCpp)

exportClasses(AnnotationByFeature)
exportClasses(AnnotationByGeneParts)
exportClasses(RandomEnrichment)
exportClasses(ScoreMatrix)
exportClasses(ScoreMatrixList)

exportMethods(annotateWithFeature)
exportMethods(annotateWithFeatures)
exportMethods(annotateWithFeatureFlank)
exportMethods(annotateWithGeneParts)
exportMethods(binMatrix)
exportMethods(convertBedDf)
exportMethods(convertBed2Exons)
exportMethods(convertBed2Introns)
exportMethods(enrichmentMatrix)
exportMethods(findFeatureComb)
exportMethods(getAssociationWithTSS)
exportMethods(getFeatsWithTargetsStats)
exportMethods(getFlanks)
exportMethods(getMembers)
exportMethods(getRandomEnrichment)
exportMethods(getTargetAnnotationStats)
export(heatMatrix)
export(heatMeta)
export(intersectScoreMatrixList)
export(multiHeatMatrix)
exportMethods(patternMatrix)
export(plotMeta)
export(plotGeneAnnotation)
export(heatTargetAnnotation)
export(plotTargetAnnotation)
exportMethods(orderBy)
exportMethods(randomizeFeature)
export(readGeneric)
export(readBed)
export(readBroadPeak)
exportMethods(readFeatureFlank)
export(readNarrowPeak)
exportMethods(readTranscriptFeatures)
exportMethods(ScoreMatrix)
exportMethods(ScoreMatrixBin)
exportMethods(scaleScoreMatrix)
exportMethods(scaleScoreMatrixList)
export(listSliceMean)
export(listSliceMedian)
export(listSliceMax)
export(listSliceMin)
export(listSliceSum)
export(Mean_c)
export(Median_c)
export(Max_c)
export(Min_c)
export(Sum_c)

export(gffToGRanges) 
export(ScoreMatrixList)

S3method(c,ScoreMatrixList)
S3method(c,ScoreMatrix)

useDynLib(genomation)
exportPattern("^[[:alpha:]]+")
