# Load the shared object
useDynLib(SeqArray,
    SEQ_File_Init, SEQ_File_Done,
    SEQ_FilterPushEmpty, SEQ_FilterPushLast, SEQ_FilterPop,
    SEQ_MergeAllele, SEQ_MergeGeno, SEQ_MergePhase, SEQ_MergeInfo,
    SEQ_MergeFormat,
    SEQ_SetSpaceSample, SEQ_SetSpaceSample2,
    SEQ_SetSpaceVariant, SEQ_SetSpaceVariant2, SEQ_SplitSelection,
    SEQ_SetChrom, SEQ_GetSpace,
    SEQ_Summary, SEQ_System,
    SEQ_VCF_NumLines, SEQ_VCF_Split, SEQ_VCF_Parse,
    SEQ_ToVCF_Init, SEQ_ToVCF_Done, SEQ_ToVCF, SEQ_ToVCF_Di_WrtFmt,
    SEQ_Quote, SEQ_GetData, SEQ_Apply_Variant, SEQ_Apply_Sample,
    SEQ_BApply_Variant,
    SEQ_ConvBEDFlag, SEQ_ConvBED2GDS,
    SEQ_SelectFlag,
    SEQ_IntAssign,
    SEQ_Pkg_Init,
    SEQ_bgzip_create,
    SEQ_ExternalName0, SEQ_ExternalName1, SEQ_ExternalName2,
    SEQ_ExternalName3, SEQ_ExternalName4, SEQ_ExternalName5
)


# Import all packages listed as Imports or Depends
import(methods)
import(gdsfmt)
importFrom(parallel, clusterApply, clusterApplyLB, clusterCall, detectCores,
    makeCluster, makeForkCluster, mclapply, stopCluster)
importFrom(utils, read.table, flush.console)

importFrom(S4Vectors, DataFrame, SimpleList)
importClassesFrom(IRanges, IRanges)
importFrom(IRanges, IRanges, IntegerList, NumericList, CharacterList, DataFrameList)
importClassesFrom(GenomicRanges, GRanges, GRangesList)
importFrom(GenomicRanges, GRanges)
importMethodsFrom(GenomicRanges, granges)
importMethodsFrom(GenomeInfoDb, seqnames, seqlevels)
importFrom(GenomeInfoDb, renameSeqlevels)
importFrom(Biostrings, DNAStringSet, DNAStringSetList)


# Export all names
exportPattern("^seq*")
export(.onAttach, .Last.lib)

exportClasses(SeqVarGDSClass)
exportMethods(granges, ref, alt, qual, filt, header, fixed, info, geno,
    colData, rowRanges)
exportMethods(seqClose, seqSetFilter)
