
useDynLib(PRECAST, .registration=TRUE)



S3method(SelectModel, PRECASTObj)
S3method(SelectModel, SeqK_PRECAST_Object)
# S3method(print, PRECASTObj)



importFrom(Rcpp, evalCpp)

#exportPattern("^[[:alpha:]]+")
export(AddAdjList, AddParSetting, AddTSNE, AddUMAP, Add_embed, model_set)
export(CreatePRECASTObject) # gendata_seulist
export(PRECAST, SelectModel, SelectModel.PRECASTObj,  IntegrateSpaData)

export(ICM.EM,ICM.EM_structure, SelectModel.SeqK_PRECAST_Object,
       getAdj_reg, getAdj_fixedNumber)

export(coordinate_rotate, firstup, SpaPlot,dimPlot,
       plot_RGB, plot_scatter, volinPlot, boxPlot, doHeatmap, featurePlot,
       drawFigs, chooseColors)

importFrom(DR.SC,getAdj_auto, getAdj_manual, getAdj, RunWPCA, read10XVisium)
# export(getAdj, getAdj_manual, getAdj_auto, RunWPCA, read10XVisium)

importFrom(purrr, discard, keep)
# export(discard, keep, DataFrame)

import(ggplot2)
import(parallel)
import(gtools)

importFrom(patchwork, wrap_plots)
importFrom(cowplot, theme_cowplot)
importFrom(dplyr,sample_frac, "%>%")
importFrom(ggthemes, tableau_color_pal)
importFrom(patchwork, wrap_plots)
importFrom(pbapply, pbapply)
importFrom(scater, calculateTSNE, calculateUMAP)

importFrom(MASS, mvrnorm)
importFrom(Matrix, t, sparseMatrix)
importFrom(mclust, Mclust, mclustBIC)
importFrom(ggpubr, ggarrange)
importFrom(colorspace, adjust_transparency)
importFrom(irlba, irlba)

importFrom(Seurat, CreateDimReducObject, NormalizeData, CreateSeuratObject, FindVariableFeatures,  
           "Idents<-", Idents, DefaultAssay, "DefaultAssay<-", ScaleData, GetAssayData,
           SetAssayData, Embeddings)
# export(ScaleData)

importFrom("graphics", "barplot")
importFrom(grDevices, hcl, rgb, col2rgb)
importFrom(stats,quantile,coef, dist, rnorm, median, 
           cov, rpois, lm, sd, hclust,  complete.cases, model.matrix.lm)
importFrom("stats", "var")
importFrom("utils", "modifyList")
importFrom("methods", "new")
importFrom("utils", "data")
importFrom(scales, hue_pal)
importFrom("utils", "getFromNamespace")

# importFrom(ggridges, geom_density_ridges, theme_ridges)
# importFrom(GiRaF, sampler.mrf)