#loading
useDynLib(AnaCoDa, .registration = TRUE)

#imports
importFrom(methods, new)
importFrom(Rcpp, evalCpp)
importFrom(stats, cov, dlnorm)
importFrom(mvtnorm, dmvnorm)
importFrom(VGAM, vglm, multinomial)

importFrom(graphics, abline, axis, box, grid, hist,
      layout, legend, lines, pairs, par, plot,
      points, segments, text)
importFrom(stats, lm, median, qt, quantile, sd, acf)
importFrom(utils, write.csv)
importFrom(grDevices, adjustcolor, rgb)
importFrom(graphics , mtext, title)

S3method(length, Rcpp_Genome)
S3method(summary, Rcpp_Genome)
S3method(writeParameterObject, Rcpp_ROCParameter)
S3method(writeParameterObject, Rcpp_PAParameter)
S3method(writeParameterObject, Rcpp_PANSEParameter)
S3method(writeParameterObject, Rcpp_FONSEParameter)
S3method(convergence.test, Rcpp_MCMCAlgorithm)
S3method(convergence.test, Rcpp_Trace)

S3method(plot, Rcpp_ROCParameter)
S3method(plot, Rcpp_FONSEParameter)
S3method(plot, Rcpp_PAParameter)
S3method(plot, Rcpp_ROCModel)
S3method(plot, Rcpp_FONSEModel)
S3method(plot, Rcpp_MCMCAlgorithm)
S3method(plot, Rcpp_Trace)


#exports
#exportPattern("^[[:alpha:]]+") #<- if commented out, only functions explicitly exported will be exposed 


export(
## Parameter object
"initializeParameterObject",
"getCSPEstimates",
"getMixtureAssignmentEstimate",
"findOptimalCodon",
"getExpressionEstimates",
"writeParameterObject",
"loadParameterObject",
"getTrace",
"getSelectionCoefficients",
"geomMean",
"calculateMarginalLogLikelihood",
#"confidenceInterval.plot",

## Model object
"initializeModelObject",

## Genome object
"initializeGenomeObject",
"getCodonCounts",
"getCodonCountsForAA",
"getNames",
"addObservedSynthesisRateSet",
"getObservedSynthesisRateSet",
"getCAIweights",
"getCAI",
"getNc",
"getNcAA",
"calculateSCUO",

## MCMC object
"initializeMCMCObject",
"runMCMC",
"setRestartSettings",
"writeMCMCObject",
"loadMCMCObject",

## Trace object

## shared functions
"convergence.test",

#Static C++ functions
"AAToCodon",
"aminoAcids",
"codonToAA",
"codons",

##
"acfMCMC",
"acfCSP"

)





