import(graphics)
import(BiocGenerics)
import(Biobase)
import(mzR)
import(grid)

import(reshape) ## try to reduce this
importFrom(plyr, ddply, llply, adply, summarise, summarize)

importFrom(preprocessCore, normalize.quantiles) 
importFrom(vsn, vsn2, meanSdPlot)
importFrom(IRanges, IRanges)
importClassesFrom(IRanges, IRanges)

export(readMzXMLData,
       readMgfData,
       readMSData,
       readMSnSet,
       readIspyData,
       formatRt,
       fillUp,
       extractSpectra,
       extractPrecSpectra,
       as.data.frame.Spectrum,
       as.ExpressionSet.MSnSet,
       is.na.MSnSet,
       combineFeatures,
       makeImpuritiesMatrix,
       precSelection,
       precSelectionTable,
       t.MSnSet,
       updateFvarLabels,
       updateFeatureNames,
       updateSampleNames)


exportClasses(pSet,
              MIAPE,
              MSnExp,
              MSnProcess,
              MSnSet,
              Spectrum, Spectrum1, Spectrum2,
              ReporterIons)

exportMethods(coerce,
              show,"[","[[",
              fileNames,
              qual,
              length,
              plot,
              plot2d,
              plotDensity,
              plotMzDelta,
              plotNA, 
              spectra,
              processingData,
              peaksCount,
              clean,
              removePeaks,
              removeReporters,
              intensity,
              mz,
              tic,
              fromFile,
              centroided,"centroided<-",
              precursorMz,
              precursorIntensity,
              precursorCharge,
              precScanNum,
              acquisitionNum,
              rtime,
              peaksCount,
              msLevel,
              collisionEnergy,
              polarity,
              trimMz,
              quantify,
              purityCorrect,
              header,
              dim,
              multiplex,
              multiLabels,
              width,
              reporterNames,"reporterNames<-",
              reporterColours,reporterColors,
              writeMgfData,
              write.exprs,
              combine, ## for classes MIAPE, MSnProcess and MSnSet
              "experimentData<-", ## signature("MSnSet", "MIAPE")
              normalise, normalize,
              topN,
              filterNA)

## methods NOT exported
## curveStats
## "precursorCharge<-"


