import(MASS, combinat)
export(
       HWE.chisq,
       HWE.exact,
       HWE.test,
       LD,
       #binsearch,  # moved to gtools
       ci.balance,
       diseq,
       diseq.ci,
       genotype,
       haplotype,
       is.genotype,
       is.haplotype,
       as.genotype,
       as.haplotype,
       allele.names,
       nallele,
       gregorius,
       homozygote,
       heterozygote,
       carrier,
       allele,
       allele.count,
       allele.names,
       #library.pos,
       locus,
       gene,
       marker,
       "locus<-",
       "gene<-",
       "marker<-",
       is.gene,
       is.locus,
       is.marker,
       getlocus,
       getmarker,
       getgene,
       makeGenotypes,
       makeHaplotypes,
       power.casectrl,
       LDtable,
       LDplot,
       as.factor,
       geno.as.array,
#       mknum,
       hap,
       hapshuffle,
       hapenum,
       hapfreq,
       hapmcmc,
       mourant,
       hapambig,
       write.pop.file,
       write.pedigree.file,
       write.marker.file,
       shortsummary.genotype,
       summary.LD.data.frame,
       as.genotype.allele.count,
       expectedGenotypes,
       expectedHaplotypes,
       order,
       genotypeOrder,
       "genotypeOrder<-",
       groupGenotype,
       "%in%"
       )

S3method(summary,genotype)
#S3method(allele.count.2,genotype)
#S3method(as.factor.allele,genotype)
S3method(as.factor,default)
S3method(as.factor,genotype)
#S3method('<-',locus)
#S3method('<-',marker)
#S3method('<-',gene)
S3method(print,gene)
S3method(print,locus)
S3method(print,marker)
S3method(as.character,locus)
S3method(as.character,gene)
S3method(as.character,marker)
S3method(carrier,genotype)
S3method(as.genotype,allele.count)
S3method(as.genotype,character)
S3method(as.genotype,default)
S3method(as.genotype,factor)
S3method(as.genotype,genotype)
S3method(as.genotype,haplotype)
S3method(as.genotype,table)
S3method(HWE.chisq,genotype)
S3method(HWE.test,genotype)
S3method(HWE.test,data.frame)
S3method(print,HWE.test)
S3method(LD,genotype)
S3method(LD,data.frame)
S3method(diseq,table)
S3method(diseq,genotype)
S3method(print,diseq)
S3method(print,genotype)
S3method('==',genotype)
S3method('==',haplotype)
S3method('%in%',default)
S3method('%in%',genotype)
S3method('%in%',haplotype)
S3method('[',genotype)
S3method('[',haplotype)
S3method('[<-',genotype)
S3method('[<-',haplotype)
S3method(heterozygote,genotype)
S3method(homozygote,genotype)
#S3method(print,allele.count)
S3method(print,allele.genotype)
#S3method(allele.count,genotype)
#S3method(allele,genotype)
S3method(print,LD)
S3method(print,LD.data.frame)
S3method(print,summary.LD.data.frame)
S3method(plot,LD.data.frame)
S3method(print,summary.genotype)
S3method(plot,genotype)
S3method(order, default)
S3method(order, genotype)
S3method(sort, genotype)

importFrom(stats, na.omit)
importFrom(gdata, interleave, trim, as.levelsMap, "mapLevels<-")
importFrom(mvtnorm, rmvnorm)
##importFrom(combinat, rmultz2) # combinat doesn't have a namesspace.
importFrom(gtools, binsearch, combinations, permutations)

importFrom("grDevices", "heat.colors")
importFrom("graphics", "abline", "axis", "barplot", "image", "legend",
           "locator", "matplot", "par", "plot", "strheight",
           "strwidth", "text", "title")
importFrom("stats", "anova", "chisq.test", "complete.cases", "lm",
           "optimize", "pchisq", "quantile", "runif")
importFrom("utils", "write.table")

S3method(summary, LD.data.frame)
