## IMPORTS
import(GenomicRanges, Rsamtools)
importFrom("BiocGenerics", "end<-")
importFrom("BiocGenerics", "start<-")
importFrom("BiocGenerics", "strand")
importFrom("BiocGenerics", "strand<-")
importFrom("Biostrings", "strsplit")
importFrom("BiocGenerics", "width")
importFrom("BiocGenerics", "width<-")
importFrom("BiocGenerics", "sort")
importFrom("Biostrings", "reverseComplement")
importFrom("Biostrings", "DNAStringSet")
importFrom("Biostrings", "alphabetFrequency")
importFrom("Biostrings", "codons")
importFrom("Biostrings", "Views")
importFrom("Biostrings", "reverse")
importFrom("Biostrings", "unstrsplit")
importFrom("Biostrings", "PhredQuality")
importFrom("Biostrings", "quality")
importFrom("crayon", "blue")
importFrom("crayon", "make_style")
importFrom("crayon", "red")
importFrom("crayon", "green")
importFrom("crayon", "bgMagenta")
importFrom("crayon", "bgBlue")
importFrom("crayon", "yellow")
importFrom("crayon", "bgYellow")
importFrom("crayon", "bgRed")
importFrom("crayon", "bgGreen")
importFrom("crayon", "bgCyan")
importFrom("ggplot2", "aes")
importFrom("ggplot2", "coord_flip")
importFrom("ggplot2", "element_text")
importFrom("ggplot2", "facet_wrap")
importFrom("ggplot2", "geom_bar")
importFrom("ggplot2", "geom_boxplot")
importFrom("ggplot2", "geom_line")
importFrom("ggplot2", "ggplot")
importFrom("ggplot2", "ggtitle")
importFrom("ggplot2", "labs")
importFrom("ggplot2", "scale_x_discrete")
importFrom("ggplot2", "scale_y_continuous")
importFrom("ggplot2", "theme")
importFrom("ggplot2", "unit")
importFrom("ggplot2", "xlab")
importFrom("ggplot2", "ylab")
importFrom("ggplot2", "ylim")
importFrom("graphics", "boxplot")
importFrom("graphics", "close.screen")
importFrom("graphics", "screen")
importFrom("graphics", "split.screen")
importFrom("graphics", "symbols")
importFrom("graphics", "text")
importFrom("grDevices", "dev.off")
importFrom("grDevices", "pdf")
importFrom("htmlwidgets", "createWidget")
importFrom("htmlwidgets", "saveWidget")
importFrom("htmlwidgets", "shinyWidgetOutput")
importFrom("htmlwidgets", "shinyRenderWidget")
importFrom("magrittr", "%>%")
importFrom("methods", "as")
importFrom("methods", "hasArg")
importFrom("methods", "new")
importFrom("methods", "slot")
importFrom("methods", "slotNames")
importFrom("Rsamtools", "asBam")
importFrom("Rsamtools", "sortBam")
importFrom("Rsamtools", "indexBam")
importFrom("Rsamtools", "countBam")
importFrom("Rsamtools", "ScanBamParam")
importFrom("Rsamtools", "scanBamFlag")
importFrom("Rsamtools", "scanBamWhat")
importFrom("Rsamtools", "BamFile")
importFrom("Rsamtools", "mergeBam")
importFrom("S4Vectors", "DataFrame")
importFrom("S4Vectors", "elementMetadata<-")
importFrom("S4Vectors", "first")
importFrom("S4Vectors", "metadata")
importFrom("S4Vectors", "Rle")
importFrom("S4Vectors", "SimpleList")
importFrom("ShortRead", "readFastq")
importFrom("ShortRead", "id")
importFrom("ShortRead", "writeFastq")
importFrom("ShortRead", "files")
importFrom("ShortRead", "FastqSampler")
importFrom("ShortRead", "yield")
importFrom("ShortRead", "sread")
importFrom("ShortRead", "qa")
importFrom("ShortRead", "countLines")
importFrom("ShortRead", "FastqStreamer")
importFrom("stats", "aggregate")
importFrom("stats", "model.matrix")
importFrom("stats", "na.omit")
importFrom("stats", "phyper")
importFrom("stats", "setNames")
importFrom("stringr", "str_detect")
importFrom("stringr", "str_extract")
importFrom("stringr", "str_extract_all")
importFrom("stringr", "str_match")
importFrom("stringr", "str_pad")
importFrom("stringr", "str_remove_all")
importFrom("stringr", "str_remove")
importFrom("stringr", "str_replace_all")
importFrom("stringr", "str_replace")
importFrom("stringr", "str_split")
importFrom("stringr", "str_which")
importFrom("SummarizedExperiment", "assayNames")
importFrom("SummarizedExperiment", "assays")
importFrom("SummarizedExperiment", "colData")
importFrom("SummarizedExperiment", "colData<-")
importFrom("SummarizedExperiment", "metadata<-")
importFrom("SummarizedExperiment", "rowRanges")
importFrom("SummarizedExperiment", "SummarizedExperiment")
importFrom("SummarizedExperiment", "subset")
importFrom("utils", "browseURL")
importFrom("utils", "capture.output")
importFrom("utils", "combn")
importFrom("utils", "menu")
importFrom("utils", "packageVersion")
importFrom("utils", "read.delim")
importFrom("utils", "read.table")
importFrom("utils", "write.table")
importFrom("utils", "setTxtProgressBar")
importFrom("utils", "txtProgressBar")
importFrom("utils", "head")
importFrom("utils", "tail")
importFrom("utils", "download.file")
importFrom("utils", "unzip")
importFrom("yaml", "as.yaml")
importFrom("yaml", "read_yaml")
importFrom("yaml", "write_yaml")
importFrom("yaml", "yaml.load")

## S4 Classes
exportClasses(
    "SYSargs", "catDB", "VENNset", "INTERSECTset", "SYSargs2", "SYSargsList",
    "LineWise"
)

## Methods
exportMethods(
    ## common
    "[[", "[[<-", "$", "show", "names", "length", "[",
    ## SYSargs class
    "targetsin", "targetsout", "targetsheader", "modules", "software", "cores",
    "other", "reference", "results", "infile1", "infile2", "outfile1", "SampleName",
    "sysargs", "outpaths",
    ## catDB
    "catmap", "catlist", "idconv",
    ## VENNset
    "setlist", "intersectmatrix", "complexitylevels","vennlist",
    "intersectlist", "as.list",
    ## SYSargs2
    "targets", "wf", "clt", "yamlinput", "cmdlist", "input",  "output", "files",
    "inputvars", "cmdToCwl", "status",
    "sysargs2", "baseCommand", "yamlinput<-", "cmdToCwl<-",
    ## SYSargsList
    "stepsWF", "statusWF", "targetsWF", "outfiles", "SE",
    "dependency", "projectInfo", "runInfo",
    "sysargslist", "subset", "stepName", "getColumn",
    "SampleName", "viewEnvir", "copyEnvir", "addResources",
    "appendStep<-", "replaceStep<-", "renameStep<-", "dependency<-",
    "updateColumn<-",
    ## LineWise
    "codeLine", "codeChunkStart", "rmdPath", "linewise",
    "replaceCodeLine<-", "appendCodeLine<-"
)
S3method("+", SYSargsList)

## Functions
# exportPattern("^[[:alpha:]]+")
export(
    ## Data sets
    ## Import/exports
    "readComp", "writeTargetsout", "writeTargetsRef", "mergeBamByFactor",
    ## Utilities
    "alignStats", "clusterRun", "returnRPKM",
    "runCommandline", "systemArgs", "symLink2bam", "moduleload",
    "modulelist", "moduleAvail", "moduleClear", "moduleInit", "moduleUnload",
    "module", "run_edgeR", "run_DESeq2", "filterDEGs", "seeFastq", "seeFastqPlot",
    "GOHyperGAll", "GOHyperGAll_Subset", "GOHyperGAll_Simplify", "GOCluster_Report",
    "makeCATdb", "goBarplot", "overLapper", "vennPlot", "olBarplot",
    "preprocessReads", "filterVars", "variantReport", "combineVarReports",
    "varSummary", "countRangeset", "runDiff", "genFeatures", "featuretypeCounts",
    "plotfeaturetypeCounts", "featureCoverage", "plotfeatureCoverage", "predORF",
    "trimbatch", "scaleRanges", "olRanges", "showDF", "cwlFilesUpdate",
    ## SYSargs2
    "loadWorkflow", "loadWF", "renderWF", "updateWF", "check.output",
    "subsetWF", "output_update",
    "targets.as.df", "targets.as.list", "evalCode", "tryPath", "tryCL", "tryCMD",
    "configWF", "config.param",
    # SYSargsList
    "SPRproject", "SYSargsList", "runWF", "check.outfiles",  "plotWF",
    "plotwfOutput", "renderPlotwf", "renderLogs", "sal2rmd", "sal2bash",
    "write_SYSargsList", "renderReport", "writeTargets",
    ## cmd2cwl
    "createParamFiles", "createParam", "writeParamFiles", "printParam",
    "subsetParam", "replaceParam", "renameParam",
    "appendParam",
    ## cmd2cwl2
    "printParam2", "appendParam2", "replaceParam2", "removeParam2", "renameParam2",
    ## LineWise
    "importWF", "LineWise"
)
