useDynLib(bandle, .registration=TRUE)
importFrom(Rcpp, evalCpp)

# require imports
import(pRolocdata)
import(knitr)
import(BiocStyle)

# selective importing
importFrom("graphics", "arrows", "matplot", "points", "axis", "par", "hist")
importFrom("methods", "new")
importFrom("stats", "cov", "dnorm", "pnorm", "quantile", "rbeta",
           "rgamma", "rnorm", "runif", "var")
importFrom("utils", "setTxtProgressBar", "txtProgressBar")
importFrom("S4Vectors", "DataFrame")
importFrom("pRoloc", "getMarkerClasses", "unknownMSnSet",
           "markerMSnSet", "knnClassification", "getMarkers",
           "getStockcol", "plot2D", "setStockcol")
importFrom("MSnbase", "normalize", "combine", "exprs", "commonFeatureNames",
           "normalise")
importFrom("Biobase", "featureNames","fData",
           "fData<-", "exprs", "exprs<-", "fvarLabels")
importFrom("lbfgs", "lbfgs")
importFrom("ggplot2", "ggplot", "aes", "geom_violin",
           "theme_bw", "scale_fill_manual", "theme", "element_text",
           "element_blank", "ylab", "ggtitle", "coord_fixed", "geom_contour",
           "stat", "geom_point", "scale_alpha", "scale_color_manual",
           "theme_minimal", "element_rect", "xlab", "scale_x_discrete",
           "scale_y_continuous", "geom_label", "geom_text", "after_stat",
           "alpha", "scale_type")
importFrom("dplyr", "%>%", "mutate", "group_by", "summarise", "row_number")
importFrom("stats", "cor", "p.adjust", "pchisq", "sd", "setNames")
importFrom("ggalluvial", "geom_flow", "geom_stratum", "GeomAlluvium", 
           "StatStratum")
importFrom("ggrepel", "geom_text_repel", "geom_label_repel")
importFrom("tidyr", "pivot_longer")
importFrom("circlize", "chordDiagram", "circos.trackPlotRegion", "CELL_META",
           "get.cell.meta.data", "circos.text", "circos.axis", "circos.par", 
           "circos.clear",  "cm_h")
importFrom("grDevices", "dev.off", "rainbow")
importFrom("plyr", "id")
importFrom("rlang", ".data")
importFrom("RColorBrewer", "brewer.pal")
importFrom("coda", "traceplot", "densplot", "gelman.diag")
importFrom("gtools", "combinations")
importFrom("gridExtra", "grid.arrange")


exportClasses(bandleChains,
              bandleSummary,
              bandleSummaries,
              bandleParams,
              nicheParam,
              nicheParams,
              bandleChain)

exportMethods(posteriorEstimates,
              bandleJoint)

export(diffLoc,
       mcmc_plot_probs,
       spatial2D,
       plotTranslocations, 
       plotTable,
       plotGPmatern,
       fitGP, 
       fitGPmaternPC, 
       fitGPmatern, 
       bandle, 
       bandlePredict, 
       bandleProcess,
       diffLocalisationProb, 
       bootstrapdiffLocprob, 
       binomialDiffLocProb, 
       EFDR,
       meanOrganelle, 
       prior_pred_dir, 
       prior_pred_pg, 
       mrMethod, 
       sim_dynamic, 
       kldirpg, 
       kldir,
       summaries, 
       StatStratum, 
       dmvtCpp, 
       Gumbel,
       covOrganelle, 
       pg_prior, 
       plotConvergence, 
       plotOutliers,
       bandle_get_outliers,
       calculateGelman)

