## Imports:
importFrom(bnlearn, nodes, hc, averaged.network, bn.boot, custom.strength,
           arcs, "arcs<-", empty.graph, score, pdag2dag, discretize,
           tiers2blacklist, bn.fit,  boot.strength, random.graph,
           graphviz.plot, children, parents)

## BiocCheck did not pass without including 'graph' in the dependencies due to
## a problem in bnlearn package.
importFrom(graph, plot)
importFrom(BiocStyle, latex)
importFrom(parallel, makeCluster, stopCluster)  ## BiocParallel is better
importFrom(pheatmap, pheatmap)
importFrom(matrixStats, colSds, rowSds)
importFrom(C50, C5.0, C5.0Control, as.party.C5.0)
importFrom(MASS, rlm)
importFrom(partykit, as.party)
importFrom(Rgraphviz, getDefaultAttrs)
importFrom(dplyr, bind_rows)
importFrom(graphics, axis)
importFrom(stats, as.dist, prcomp)
importFrom(gdata, humanReadable)
importFrom(clusterProfiler, enrichGO, enrichKEGG, simplify, dotplot)
importFrom(ReactomePA, enrichPathway)
importFrom(ggplot2, ggsave, ggtitle, theme, element_text)
importFrom(openxlsx, write.xlsx)
importFrom(DBI, dbGetQuery)
importFrom(DOSE, enrichNCG)


## Imported by WGCNA but not installed with it:
import(GO.db)
importFrom(impute, impute.knn)
importFrom(preprocessCore, normalize.quantiles)
importFrom(stats, as.formula, oneway.test, setNames, na.omit)

## Recommended by Bioconductor:
importFrom(grDevices, dev.new, dev.off, png, rgb)
importFrom(graphics, abline, arrows, barplot, hist, legend,
           par, plot.new, points)
importFrom(utils, assignInNamespace, capture.output, read.csv,
           tail, write.csv, object.size)
importFrom(stats, manova, p.adjust, predict, quantile,
           rnorm, runif, sd, summary.aov, t.test, var) ## cor was not imported because:
## cor must be imported from WGCA otherwise stats::cor will be used by WGCNA functions leading to errors.
importFrom(WGCNA, blockwiseModules, moduleEigengenes, allowWGCNAThreads, pickSoftThreshold,
           labels2colors, sizeGrWindow, plotDendroAndColors, cor)
## IMPORTANT: In this package, use "stats::cor" instead of "cor" otherwise the "WGCNA::cor" is used by default!!!

## Exports:
##exportPattern("^[[:alpha:]]+")
##exportClasses(pigengene) ## This is an S3 class and does not need exportation.
export(one.step.pigengene,
       check.pigengene.input, balance, calculate.beta,
       wgcna.one.step, compute.pigengene, plot.pigengene, pheatmap.type,
       project.eigen, learn.bn, draw.bn, make.decision.tree, get.used.features,
       get.fitted.leaf, module.heatmap, compact.tree, get.genes, preds.at,
       pvalues.manova, gene.mapping, dcor.matrix, check.nas, combine.networks,
       save.if, message.if, get.enriched.pw, apply.filter, determine.modules, make.filter)
S3method(plot, pigengene)
