import(methods)
import(grid)
import(shinyFiles)
import(openxlsx)

# Selected functions import
importFrom(foreach, "%:%")
importFrom(foreach, "%do%")
importFrom(foreach, "%dopar%")
importFrom(foreach, foreach)
importFrom(NOISeq, tmm)
importFrom(openxlsx, write.xlsx)
importFrom(openxlsx, read.xlsx)
importFrom(openxlsx, getSheetNames)
importFrom(testthat, test_that)
importFrom(testthat, expect_equal)
importFrom(gplots, heatmap.2)
importFrom(ggplot2, ggplot)
importFrom(ggplot2, aes)
importFrom(ggplot2, geom_violin)
importFrom(ggplot2, ggtitle)
importFrom(ggplot2, coord_cartesian)
importFrom(ggplot2, geom_hline)
importFrom(ggplot2, geom_line)
importFrom(ggplot2, geom_point)
importFrom(ggplot2, geom_smooth)
importFrom(ggplot2, theme)
importFrom(ggplot2, scale_fill_manual)
importFrom(ggplot2, scale_x_discrete)
importFrom(ggplot2, scale_colour_discrete)
importFrom(ggplot2, ggsave)
importFrom(ggplot2, element_text)
importFrom(ggplot2, element_blank)
importFrom(ggplot2, element_line)
importFrom(ggplot2, theme_bw)
importFrom(ggplot2, xlab)
importFrom(ggplot2, ylab)
importFrom(ggplot2, scale_fill_gradient2)
importFrom(Rsamtools, indexBam)
importFrom(exomeCopy, countBamInGRanges)
importFrom(S4Vectors, NROW)
importFrom(grDevices, boxplot.stats)
importFrom(stats, mad, qnorm, rpois, fivenum, kmeans)
importFrom(utils, read.table)
importFrom(utils, read.csv)
importFrom(utils, data)
importFrom(utils, zip)
importFrom(grDevices, png)
importFrom(grDevices, dev.off)
#importFrom(chromPlot, chromPlot)
importFrom(stringr, str_replace)
importFrom(graphics, barplot)
importFrom(reshape2, melt)
importFrom(GenomeInfoDb, dropSeqlevels)
importFrom(GenomicRanges, seqnames)
importFrom(GenomicRanges, GRanges)
importFrom(GenomicRanges, elementMetadata)
importFrom(GenomicRanges, "elementMetadata<-")  # why is this needed ?
importFrom(GenomicRanges, start)
importFrom(GenomicRanges, end)
importFrom(IRanges, quantile)
importFrom(IRanges, median)
importFrom(IRanges, IQR)
importFrom(IRanges, IRanges)
importFrom(IRanges, sd)
importFrom(plyr, revalue)

# Shiny related imports
importFrom(shiny, dataTableOutput)
importFrom(shiny, textOutput)
importFrom(shiny, renderDataTable)
importFrom(shiny, withProgress)
importFrom(shiny, updateTabsetPanel)
importFrom(shiny, showNotification)
importFrom(shiny, shinyUI)
importFrom(shiny, shinyServer)
importFrom(shiny, titlePanel)
importFrom(shiny, mainPanel)
importFrom(shiny, withTags)
importFrom(shiny, sidebarLayout)
importFrom(shiny, sidebarPanel)
importFrom(shiny, fileInput)
importFrom(shiny, numericInput)
importFrom(shiny, HTML)
importFrom(shiny, actionButton)
importFrom(shiny, animationOptions)
importFrom(shiny, checkboxGroupInput)
importFrom(shiny, column)
importFrom(shiny, conditionalPanel)
importFrom(shiny, div)
importFrom(shiny, downloadButton)
importFrom(shiny, downloadHandler)
importFrom(shiny, downloadLink)
importFrom(shiny, eventReactive)
importFrom(shiny, fluidPage)
importFrom(shiny, fluidRow)
importFrom(shiny, h4)
importFrom(shiny, h1)
importFrom(shiny, h2)
importFrom(shiny, h3)
importFrom(shiny, headerPanel)
importFrom(shiny, htmlOutput)
importFrom(shiny, need)
importFrom(shiny, observe)
importFrom(shiny, observeEvent)
importFrom(shiny, outputOptions)
importFrom(shiny, p)
importFrom(shiny, plotOutput)
importFrom(shiny, radioButtons)
importFrom(shiny, reactive)
importFrom(shiny, reactiveValues)
importFrom(shiny, renderPlot)
importFrom(shiny, renderUI)
importFrom(shiny, selectInput)
importFrom(shiny, shinyApp)
importFrom(shiny, sliderInput)
importFrom(shiny, stopApp)
importFrom(shiny, tabPanel)
importFrom(shiny, tabsetPanel)
importFrom(shiny, tags)
importFrom(shiny, uiOutput)
importFrom(shiny, updateSelectInput)
importFrom(shiny, validate)
importFrom(shiny, wellPanel)
importFrom(shiny, checkboxInput)
importFrom(shiny, icon)
importFrom(shiny, addResourcePath)
importFrom(shiny, checkboxInput)
importFrom(shinyjs, useShinyjs)

##########################################
# Exported functions
##########################################
export(IndexMultipleBams)
export(NormalizeCounts)
export(Background)
export(ReportTables)
export(BedToGenomicRanges)
export(ReadCountsFromBam)
export(BootList)
export(PlotBootstrapDistributions)
export(CombinedNormalizedCounts)

# Selecting reference set methods
export(SelectReferenceSetFromReadCounts)
export(SelectReferenceSetByPercentil)
export(SelectReferenceSetByInterquartileRange)
export(SelectReferenceSetByKmeans)

# Execute CNVPanelizer
export(CNVPanelizer)
export(CNVPanelizerFromReadCountsHELPER)
export(CNVPanelizerFromReadCounts)

# Report results related methods
export(CollectColumnFromAllReportTables)
export(StatusHeatmap)
export(WriteListToXLSX)
export(ReadXLSXToList)

# Shiny related
#export(startApp)
#export(shinyUI)
#export(shinyServer)
export(RunCNVPanelizerShiny)

