useDynLib(GenomicRanges)

import(methods)

import(utils)  # for as.roman()

import(BiocGenerics)

import(IRanges)

exportClasses(
    Constraint, ConstraintORNULL,
    Seqinfo,
    GenomicRanges, GenomicRangesORmissing, GRanges, GRangesList,
    GenomicRangesORGRangesList,
    GappedAlignments, GappedAlignmentPairs,
    SummarizedExperiment, Assays,
    GenomicRangesList, SimpleGenomicRangesList
)

export(
    phicoef,

    validCigar, cigarOpTable,
    cigarToQWidth, cigarToWidth, cigarQNarrow, cigarNarrow,
    cigarToIRanges, cigarToIRangesListByAlignment, cigarToIRangesListByRName,
    queryLoc2refLoc, queryLocs2refLocs,
    splitCigar, cigarToRleList, cigarToCigarTable, summarizeCigarTable,

    constraint, "constraint<-",
    checkConstraint,

    makeSeqnameIds,
    seqinfo, "seqinfo<-",
    seqnames, "seqnames<-",
    seqlevels, "seqlevels<-",
    seqlengths, "seqlengths<-",
    isCircular, "isCircular<-",
    genome, "genome<-",
    seqnameStyle, "seqnameStyle<-",
    Seqinfo,

    GRanges, GRangesList, GenomicRangesList,
    .DollarNames.GenomicRanges,
    makeGRangesListFromFeatureFragments,
    compare,
    rname, "rname<-", cigar, qwidth,
    grglist, granges, introns, grg, rglist,
    qnarrow,
    GappedAlignments, readGappedAlignments,
    first, last, left, right, isProperPair,
    GappedAlignmentPairs, readGappedAlignmentPairs,

    SummarizedExperiment,
    assays, "assays<-", assay, "assay<-", rowData, "rowData<-",
    colData, "colData<-", exptData, "exptData<-",

    flipQuery,
    selectEncodingWithCompatibleStrand,
    isCompatibleWithSplicing, isCompatibleWithSkippedExons,
    extractSteppedExonRanks, extractSpannedExonRanks, extractSkippedExonRanks,
    extractQueryStartInTranscript,
    findCompatibleOverlaps, countCompatibleOverlaps,

    countGenomicOverlaps,

    keepSeqlevels, renameSeqlevels,

    summarizeOverlaps,
    Union, IntersectionNotEmpty, IntersectionStrict,

    findSpliceOverlaps
)

exportMethods(
    length,
    names, "names<-",
    #constraint, "constraint<-",
    checkConstraint,
    seqinfo, "seqinfo<-",
    seqnames, "seqnames<-",
    seqlevels, "seqlevels<-",
    seqlengths, "seqlengths<-",
    isCircular, "isCircular<-",
    genome, "genome<-",
    seqnameStyle, "seqnameStyle<-",
    strand, "strand<-",
    score,
    merge,
    coerce, as.data.frame, unlist,
    elementMetadata, "elementMetadata<-",
    mcols, "mcols<-",
    "$", "$<-",
    values, "values<-",
    ranges, "ranges<-",
    start, end, width, "start<-", "end<-", "width<-",
    "[", "[<-", c, seqselect, "seqselect<-", "$", "$<-", "[[", "[[<-",
    splitAsListReturnedClass,
    split, window,
    duplicated, unique, order, sort, rank, "==", "<=", ">=", "<", ">",
    shift, narrow, flank, resize, Ops, restrict,
    gaps, range, reduce, isDisjoint, disjoin, disjointBins,
    precede, follow, nearest, distance, distanceToNearest,
    map,
    coverage,
    union, intersect, setdiff,
    punion, pintersect, psetdiff, pgap,
    findOverlaps, countOverlaps, match, "%in%",
    encodeOverlaps, isCompatibleWithSplicing, isCompatibleWithSkippedExons,
    extractSteppedExonRanks, extractSpannedExonRanks, extractSkippedExonRanks,
    findCompatibleOverlaps,
    show,
    rname, "rname<-", cigar, qwidth,
    grglist, granges, rglist, introns, ngap,
    qnarrow,
    first, last, left, right, isProperPair,
    dimnames, "dimnames<-",
    keepSeqlevels, renameSeqlevels,
    summarizeOverlaps,
    findSpliceOverlaps,
    updateObject
)

