# 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_DNAStrSet,

    SEQ_Pkg_Init,
    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)
import(Biostrings)
import(S4Vectors)
import(IRanges)
import(GenomicRanges)

importFrom(utils, count.fields, read.table, flush.console)
importClassesFrom(GenomicRanges, GRanges, GRangesList)
importFrom(VariantAnnotation, VCF, VCFHeader, readVcf)
importClassesFrom(VariantAnnotation, VCF, CollapsedVCF, VCFHeader)
importMethodsFrom(VariantAnnotation, ref, alt, qual, filt, asVCF,
                  header, fixed, info, geno)
importMethodsFrom(SummarizedExperiment, colData, rowRanges)
importFrom(GenomeInfoDb, renameSeqlevels)
importMethodsFrom(GenomeInfoDb, seqlevels)


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

exportClasses(SeqVarGDSClass)


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