import(methods)

importFrom("grDevices", "heat.colors", "dev.off", "pdf", "rgb", "gray")
importFrom("graphics", "contour", "image", "legend", "par", "plot", "polygon", "rect", "segments", "strheight", "strwidth", "text", "points", "axis")
importFrom("stats", "pchisq", "quantile", "rnorm", "kmeans", "glm", "binomial", "pt", "qbeta", "ppoints", "qnorm", "sd", "approxfun")
importFrom("utils", "read.table", "write.table")
importFrom("Rcpp", "evalCpp") # just to avoid << function 'enterRNGScope' not provided by package 'Rcpp' >> error
importFrom("RcppParallel", "setThreadOptions")

useDynLib(gaston, .registration = TRUE)

exportClasses(bed.matrix)
exportMethods(head,  as.matrix, "[", "%*%", dim, p, 'p<-', mu, 'mu<-', sigma, 'sigma<-', standardize, 'standardize<-', cbind, rbind)

export(as.bed.matrix)
export(GRM, DM, reshape.GRM)
export(set.stats, set.stats.ped, set.stats.snps, set.hwe, set.genomic.sex)
export(bed.loadings, LD, LD.plot, LD.thin)
export(select.inds, select.snps)
export(test.inds, which.inds, test.snps, which.snps)
export(is.autosome, is.chr.x, is.chr.y, is.chr.mt)
export(read.bed.matrix, write.bed.matrix, read.vcf)
export(random.pm, lmm.simu, lmm.aireml, logistic.mm.aireml, lmm.diago, lmm.diago.likelihood, lmm.diago.profile.likelihood, lik.contour)
export(lmm.restricted.likelihood, lmm.profile.restricted.likelihood)
export(association.test)
export(score.variance.linear, score.variance.logistic, score.fixed.linear, score.fixed.logistic)
export(qqplot.pvalues, manhattan)
export(SNP.duplicated, SNP.match)
export(SNP.rm.duplicates)
export(set.dist)
export(LD.clump)
