import(methods)
importFrom(utils, data, download.file, read.delim, read.table, read.csv,
                  write.table, as.roman)
importFrom(stats, setNames)

import(BiocGenerics)
import(S4Vectors)
import(IRanges)  # for CompressedList
import(Seqinfo)
import(UCSC.utils)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export non-generic functions
###

export(
    ## utils.R:
    DEFAULT_CIRC_SEQS,

    ## list_ftp_dir.R:
    list_ftp_dir,

    ## NCBI-utils.R:
    find_NCBI_assembly_ftp_dir,
    fetch_assembly_report,

    ## getChromInfoFromNCBI.R:
    registered_NCBI_assemblies,
    getChromInfoFromNCBI,
    saveChromInfoFromNCBI,

    ## getChromInfoFromUCSC.R:
    registered_UCSC_genomes,
    getChromInfoFromUCSC,
    get_and_fix_chrom_info_from_UCSC,
    saveChromInfoFromUCSC,

    ## getChromInfoFromEnsembl.R:
    getChromInfoFromEnsembl,

    ## loadTaxonomyDb.R:
    loadTaxonomyDb,

    ## mapGenomeBuilds.R
    mapGenomeBuilds,
    genomeBuilds,
    listOrganisms,

    ## seqlevelsStyle.R:
    genomeStyles,
    extractSeqlevels,
    extractSeqlevelsByGroup,
    mapSeqlevels,
    seqlevelsInGroup,

    ## seqlevels-wrappers.R:
    keepSeqlevels, dropSeqlevels, renameSeqlevels,
    standardChromosomes, keepStandardChromosomes
)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 generics defined in GenomeInfoDb + export corresponding methods
###

export(
    seqlevelsStyle, "seqlevelsStyle<-"
)

### Exactly the same list as above.
exportMethods(
    seqlevelsStyle, "seqlevelsStyle<-"
)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### TEMPORARY HACK: Re-export stuff that used to be defined here in
### GenomeInfoDb but has moved to the Seqinfo package in BioC 3.22.
### This avoids breaking packages that still **explicitly** import
### this stuff from GenomeInfoDb.
### TODO: Fix these packages and get rid of this.

export(
    orderSeqlevels, rankSeqlevels,
    Seqinfo, seqinfo, "seqinfo<-",
    seqnames, "seqnames<-",
    seqlevels, "seqlevels<-",
    seqlengths, "seqlengths<-",
    isCircular, "isCircular<-",
    genome, "genome<-",
    sortSeqlevels, seqlevelsInUse, seqlevels0,

    ## Note that the SNPlocs packages currently import the GenomeDescription()
    ## constructor function from GenomeInfoDb, so they need to be modified
    ## to import it from the Seqinfo package before we can get rid of the
    ## re-exports below.
    GenomeDescription,
    commonName, provider, providerVersion,
    releaseDate, bsgenomeName
)

