library(MetFamily)
Some text about the scenario, data and MTBLS297.
Cool paper [@Treutler16DiscoveringRegulatedMetabolite].
Cool R package: r Githubpkg("ipb-halle/MetFamily")
First, we load the data and summarise it
#That's also what the shiny app uses dataList <<- list() filePeakMatrixPath <- system.file("extdata/showcase/Metabolite_profile_showcase.txt", package = "MetFamily") fileSpectra <- system.file("extdata/showcase/MSMS_library_showcase.msp", package = "MetFamily") fileAnnotation <- system.file("extdata/testdata/canopus/canopusShort.txt", package = "MetFamily") parameterSetPath <- system.file("extdata/testdata/parameterSet.RData", package = "MetFamily" ) load(parameterSetPath) resultObj <- convertToProjectFile(filePeakMatrixPath, fileSpectra, fileAnnotation, parameterSet, progress = FALSE) lines <- sparseMatrixToString(matrixRows = resultObj$matrixRows, matrixCols = resultObj$matrixCols, matrixVals = resultObj$matrixVals, parameterSet = parameterSet) qfeatures <- resultObj$qfeatures dataList <<- readProjectData(fileLines = lines, progress = FALSE, qfeatures = qfeatures) #project <- readClusterDataFromProjectFile(file = fileName)
We can filter the data to remove low quality data points
# todo...
PCA on MS1 in Figure \@ref(fig:pca).
fileName <- system.file("extdata/testdata/filterObj.Rdata", package = "MetFamily") load(fileName) pca <- calculatePCA(dataList=dataList, filterObj=filterObj, ms1AnalysisMethod="PCA (Principal Component Analysis)", scaling="None", logTransform=FALSE) ## Need to be global variables because they are not ## passed to getPcaPerformanceIndicator() as parameters. pcaDimensionOne <<- 1 pcaDimensionTwo <<- 2 resultObj <- calcPlotPCAscores( pcaObj = pca, dataList = project, filterObj = filterObj, pcaDimensionOne = pcaDimensionOne, pcaDimensionTwo = pcaDimensionTwo, showScoresLabels = FALSE, xInterval = NULL, yInterval = NULL ) resultObj <- calcPlotPCAloadings( pcaObj = pca, dataList = project, filter = filterObj, pcaDimensionOne = pcaDimensionOne, pcaDimensionTwo = pcaDimensionTwo, selectionFragmentPcaLoadingSet = NULL, selectionAnalysisPcaLoadingSet = NULL, selectionSearchPcaLoadingSet = NULL, xInterval = NULL, yInterval = NULL, loadingsLabels = "None", showLoadingsAbundance = FALSE, showLoadingsFeaturesAnnotated = TRUE, showLoadingsFeaturesUnannotated = TRUE, showLoadingsFeaturesSelected = TRUE, showLoadingsFeaturesUnselected = TRUE )
HCA on MS2 in Figure \@ref(fig:hca).
if (FALSE) { p <- calcPlotDendrogram_plotly(dataList=project, filterObj=filterObj, clusterDataList=project, distanceMeasure = "Jaccard", showClusterLabels=FALSE, hcaPrecursorLabels="m/z / RT", selectionFragmentTreeNodeSet = NULL, selectionAnalysisTreeNodeSet = NULL, selectionSearchTreeNodeSet = NULL, selectedSelection, heatmapContent, heatmapOrdering, heatmapProportion) } fileName <- system.file("extdata/testdata/clusterDataList.Rdata", package = "MetFamily") load(fileName) fileName <- system.file("extdata/testdata/hcaFilter.Rdata", package = "MetFamily") load(fileName) returnObj <- calcPlotDendrogram(dataList=project, filter=filter, clusterDataList=clusterDataList, annoPresentAnnotationsList = annoPresentAnnotationsList , annoPresentColorsList = annoPresentColorsList, distanceMeasure="Jaccard (intensity-weighted)", selectionFragmentTreeNodeSet = NULL, selectionAnalysisTreeNodeSet = NULL, selectionSearchTreeNodeSet = NULL, showClusterLabels = TRUE, hcaPrecursorLabels = "m/z / RT", xInterval = c(1,219))
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.