diff --git a/.Rbuildignore b/.Rbuildignore index 31e37542..3b76295d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,3 +2,5 @@ ^\.Rproj\.user$ ^LICENSE\.md$ ^\.github$ +^\.positai$ +^\.claude$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 66f8a066..dafa3f7f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -22,7 +22,7 @@ jobs: config: - { os: macOS-latest, bioc: 'release', curlConfigPath: '/usr/bin/'} - { os: windows-latest, bioc: 'release'} - - { os: ubuntu-latest, image: "bioconductor/bioconductor_docker:RELEASE_3_20", cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} + - { os: ubuntu-latest, image: "bioconductor/bioconductor_docker:RELEASE_3_23", cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -35,7 +35,7 @@ jobs: steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Set up R and install BiocManager uses: grimbough/bioc-actions/setup-bioc@v1 @@ -60,7 +60,7 @@ jobs: - name: Cache R packages if: runner.os != 'Windows' && matrix.config.image == null - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ${{ env.R_LIBS_USER }} key: ${{ env.cache-version }}-${{ runner.os }}-bioc-${{ matrix.config.bioc }}-${{ hashFiles('depends.Rds') }} diff --git a/DESCRIPTION b/DESCRIPTION index 0f772fb3..ae77f8a4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: einprot Type: Package Title: A collection of proteomics analysis utilities and workflows -Version: 0.9.9 +Version: 0.10.2 Authors@R: c( person("Charlotte", "Soneson", email = "charlotte.soneson@fmi.ch", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3833-2169")), @@ -17,7 +17,7 @@ Description: The einprot package contains utilities for performing analysis functionality for assembling databases of known protein complexes. License: MIT + file LICENSE Encoding: UTF-8 -Depends: R (>= 4.0) +Depends: R (>= 4.1) Imports: babelgene, circlize, @@ -78,12 +78,13 @@ Imports: motifStack, msigdbrdata Remotes: msigdbrdata=github::igordot/msigdbrdata -RoxygenNote: 7.3.3 Suggests: BiocManager, testthat (>= 3.0.0), iSEE, - matrixStats + matrixStats, + arrow Config/testthat/edition: 3 VignetteBuilder: knitr biocViews: Proteomics, DataImport +Config/roxygen2/version: 8.0.0 diff --git a/NAMESPACE b/NAMESPACE index 7ee47cd8..3d437e02 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,14 +9,17 @@ export(defineAssayNames) export(doImputation) export(doNormalization) export(doPCA) +export(einprotDIANNFiltersDF) +export(einprotFragPipeFilters) +export(einprotMQFilters) +export(einprotPDTMTPeptideGroupFilters) +export(einprotPDTMTProteinFilters) +export(einprotSpectronautFilters) export(emptySampleText) export(expDesignText) export(featureCollectionText) export(filterByModText) -export(filterFragPipe) -export(filterMaxQuant) -export(filterPDTMT) -export(filterSpectronaut) +export(filterFeaturesSE) export(fixFeatureIds) export(formatTableColumns) export(getCalibrationFrompdAnalysis) @@ -73,6 +76,7 @@ export(runMaxQuantAnalysis) export(runPDTMTAnalysis) export(runPDTMTptmAnalysis) export(runPTMTest) +export(runSEAnalysis) export(runSpectronautAnalysis) export(runTest) export(saText) @@ -108,6 +112,7 @@ importFrom(SummarizedExperiment,"rowData<-") importFrom(SummarizedExperiment,assay) importFrom(SummarizedExperiment,assayNames) importFrom(SummarizedExperiment,colData) +importFrom(SummarizedExperiment,colnames) importFrom(SummarizedExperiment,rowData) importFrom(XML,xmlParse) importFrom(XML,xmlToList) @@ -122,7 +127,10 @@ importFrom(dplyr,arrange) importFrom(dplyr,between) importFrom(dplyr,bind_cols) importFrom(dplyr,bind_rows) +importFrom(dplyr,collect) +importFrom(dplyr,compute) importFrom(dplyr,contains) +importFrom(dplyr,count) importFrom(dplyr,desc) importFrom(dplyr,distinct) importFrom(dplyr,everything) @@ -130,6 +138,7 @@ importFrom(dplyr,filter) importFrom(dplyr,full_join) importFrom(dplyr,group_by) importFrom(dplyr,if_any) +importFrom(dplyr,inner_join) importFrom(dplyr,last_col) importFrom(dplyr,left_join) importFrom(dplyr,matches) @@ -269,6 +278,7 @@ importFrom(stats,setNames) importFrom(stringdist,amatch) importFrom(stringr,str_extract) importFrom(tibble,rownames_to_column) +importFrom(tibble,tibble) importFrom(tidyr,gather) importFrom(tidyr,pivot_longer) importFrom(tidyr,pivot_wider) @@ -279,6 +289,7 @@ importFrom(tidyr,unite) importFrom(tidyr,unnest) importFrom(tidyselect,any_of) importFrom(tools,file_ext) +importFrom(tools,file_path_sans_ext) importFrom(utils,combn) importFrom(utils,download.file) importFrom(utils,head) diff --git a/NEWS.md b/NEWS.md index cbaccdb3..1980168a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,23 @@ +# einprot 0.10.2 + +* Expose additional arguments to doImputation() in workflow functions +* Rename 'method' argument of doImputation() to 'imputeMethod' +* Add 'valueType' argument to plotFractionDetectedPerSample() +* Add normalization methods 'diff.mean.shared' and 'diff.median.shared' + +# einprot 0.10.1 + +* Limit the set of supported normalization methods in the workflows to make sure they are suitable for the input type +* Add runSEAnalysis function to run workflow starting from a SummarizedExperiment object +* Add clusterRows argument to makeAbundanceHeatmap() +* Add "sorted" setting to plotMissingValuesHeatmap() +* Change settings to not cluster very large heatmaps (>10,000 rows) + +# einprot 0.10.0 + +* Breaking change: redesign the feature filtering framework to make it more flexible and consistent across tools +* Add p-value histograms to pdfs with test result plots + # einprot 0.9.8 * Expose argument to include or exclude abundance values from result tables diff --git a/R/checkArgumentsDIANN.R b/R/checkArgumentsDIANN.R index e80c80de..ffe48a67 100644 --- a/R/checkArgumentsDIANN.R +++ b/R/checkArgumentsDIANN.R @@ -4,14 +4,13 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsDIANN <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, experimentInfo, species, diannFile, diannFileType, outLevel, diannLogFile, aName, idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol, extraFeatureCols, sampleAnnot, includeOnlySamples, - excludeSamples, minScore, minPeptides, imputeMethod, assaysForExport, - addAbundanceValues, addHeatmaps, mergeGroups, + excludeSamples, imputeMethod, imputeArgs, filtersDF, filtersSE, + assaysForExport, addAbundanceValues, addHeatmaps, mergeGroups, comparisons, ctrlGroup, allPairwiseComparisons, singleFit, subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, @@ -55,7 +54,8 @@ } .assertScalar(x = diannFileType, type = "character", - validValues = c("pg_matrix", "pr_matrix", "main_report")) + validValues = c("pg_matrix", "pr_matrix", "main_report", + "parquet")) .assertScalar(x = outLevel, type = "character", validValues = c("pg", "pr")) if (diannFileType == "pg_matrix" && outLevel == "pr") { @@ -135,19 +135,38 @@ .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) - ## Score thresholds - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) + ## Filter functions + .assertVector(x = filtersDF, type = "list") + if (length(filtersDF) > 0) { + .assertVector(x = names(filtersDF), type = "character") + for (f in filtersDF) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } ## Method choices .assertScalar(x = imputeMethod, type = "character", - validValues = c("impSeqRob", "MinProb", "MinProbGlobal")) + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) .assertScalar(x = addAbundanceValues, type = "logical") .assertScalar(x = addHeatmaps, type = "logical") .assertScalar(x = normMethod, type = "character", - validValues = c(MsCoreUtils::normalizeMethods(), "none", - "center.mean.shared", "center.median.shared")) + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) .assertScalar(x = stattest, type = "character", validValues = c("limma", "ttest", "proDA", "none")) diff --git a/R/checkArgumentsFragPipe.R b/R/checkArgumentsFragPipe.R index cb546c4d..8a366662 100755 --- a/R/checkArgumentsFragPipe.R +++ b/R/checkArgumentsFragPipe.R @@ -4,14 +4,13 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsFragPipe <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, experimentInfo, species, fragpipeDir, idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol, extraFeatureCols, - iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, minScore, - minPeptides, imputeMethod, assaysForExport, addAbundanceValues, - addHeatmaps, mergeGroups, + iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, + imputeMethod, imputeArgs, assaysForExport, addAbundanceValues, + addHeatmaps, mergeGroups, filtersSE, comparisons, ctrlGroup, allPairwiseComparisons, singleFit, subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, @@ -141,19 +140,30 @@ .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) - ## Score thresholds - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) + ## Filter functions + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } ## Method choices .assertScalar(x = imputeMethod, type = "character", - validValues = c("impSeqRob", "MinProb", "MinProbGlobal")) + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) .assertScalar(x = addAbundanceValues, type = "logical") .assertScalar(x = addHeatmaps, type = "logical") .assertScalar(x = normMethod, type = "character", - validValues = c(MsCoreUtils::normalizeMethods(), "none", - "center.mean.shared", "center.median.shared")) + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) .assertScalar(x = stattest, type = "character", validValues = c("limma", "ttest", "proDA", "none")) diff --git a/R/checkArgumentsMaxQuant.R b/R/checkArgumentsMaxQuant.R index abd760f7..71f83d14 100644 --- a/R/checkArgumentsMaxQuant.R +++ b/R/checkArgumentsMaxQuant.R @@ -4,14 +4,13 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsMaxQuant <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, experimentInfo, species, mqFile, mqParameterFile, idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol, extraFeatureCols, - iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, minScore, - minPeptides, imputeMethod, assaysForExport, addAbundanceValues, - addHeatmaps, mergeGroups, + iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, + imputeMethod, imputeArgs, assaysForExport, addAbundanceValues, + addHeatmaps, mergeGroups, filtersSE, comparisons, ctrlGroup, allPairwiseComparisons, singleFit, subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, @@ -126,19 +125,30 @@ .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) - ## Score thresholds - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) + ## Filter functions + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } ## Method choices .assertScalar(x = imputeMethod, type = "character", - validValues = c("impSeqRob", "MinProb", "MinProbGlobal")) + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) .assertScalar(x = addAbundanceValues, type = "logical") .assertScalar(x = addHeatmaps, type = "logical") .assertScalar(x = normMethod, type = "character", - validValues = c(MsCoreUtils::normalizeMethods(), "none", - "center.mean.shared", "center.median.shared")) + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) .assertScalar(x = stattest, type = "character", validValues = c("limma", "ttest", "proDA", "none")) diff --git a/R/checkArgumentsPDTMT.R b/R/checkArgumentsPDTMT.R index 7b52cd7f..7507581d 100644 --- a/R/checkArgumentsPDTMT.R +++ b/R/checkArgumentsPDTMT.R @@ -4,17 +4,15 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsPDTMT <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, experimentInfo, species, pdOutputFolder, pdResultName, inputLevel, pdAnalysisFile, idCol, labelCol, geneIdCol, proteinIdCol, - stringIdCol, extraFeatureCols, + stringIdCol, extraFeatureCols, filtersSE, modificationsCol, excludeUnmodifiedPeptides, keepModifications, iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, - minScore, minDeltaScore, minPeptides, minPSMs, masterProteinsOnly, - imputeMethod, assaysForExport, addAbundanceValues, addHeatmaps, mergeGroups, - comparisons, ctrlGroup, allPairwiseComparisons, singleFit, + imputeMethod, imputeArgs, assaysForExport, addAbundanceValues, addHeatmaps, + mergeGroups, comparisons, ctrlGroup, allPairwiseComparisons, singleFit, subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, volcanoLog2FCThr, volcanoMaxFeatures, volcanoLabelSign, volcanoS0, @@ -136,15 +134,16 @@ .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) - ## Score thresholds - if (inputLevel == "Proteins") { - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) - .assertScalar(x = masterProteinsOnly, type = "logical") - } else if (inputLevel == "PeptideGroups") { - .assertScalar(x = minDeltaScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPSMs, type = "numeric", allowNULL = TRUE) - + ## Filters + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } + if (inputLevel == "PeptideGroups") { .assertScalar(x = modificationsCol, type = "character", allowNULL = TRUE) .assertScalar(x = excludeUnmodifiedPeptides, type = "logical") @@ -154,13 +153,18 @@ ## Method choices .assertScalar(x = imputeMethod, type = "character", - validValues = c("impSeqRob", "MinProb", "MinProbGlobal")) + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) .assertScalar(x = addAbundanceValues, type = "logical") .assertScalar(x = addHeatmaps, type = "logical") .assertScalar(x = normMethod, type = "character", - validValues = c(MsCoreUtils::normalizeMethods(), "none", - "center.mean.shared", "center.median.shared")) + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) .assertScalar(x = stattest, type = "character", validValues = c("limma", "ttest", "proDA", "none")) diff --git a/R/checkArgumentsPDTMTptm.R b/R/checkArgumentsPDTMTptm.R index 8b820e6e..47485df7 100644 --- a/R/checkArgumentsPDTMTptm.R +++ b/R/checkArgumentsPDTMTptm.R @@ -4,7 +4,6 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsPDTMTptm <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, diff --git a/R/checkArgumentsSE.R b/R/checkArgumentsSE.R new file mode 100644 index 00000000..4a574a3a --- /dev/null +++ b/R/checkArgumentsSE.R @@ -0,0 +1,205 @@ +#' Check validity of arguments for SE analysis +#' +#' @keywords internal +#' @noRd +#' @author Charlotte Soneson +#' +#' @importFrom SummarizedExperiment assayNames colData +#' @importFrom tools file_ext +.checkArgumentsSE <- function( + templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, + forceOverwrite, experimentInfo, species, inFile, summaryInfo, aName, + idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol, extraFeatureCols, + imputeMethod, imputeArgs, assaysForExport, addAbundanceValues, + addHeatmaps, mergeGroups, filtersSE, + comparisons, ctrlGroup, allPairwiseComparisons, singleFit, + subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, + minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, + volcanoLog2FCThr, volcanoMaxFeatures, volcanoLabelSign, volcanoS0, + volcanoFeaturesToLabel, addInteractiveVolcanos, interactiveDisplayColumns, + interactiveGroupColumn, complexFDRThr, maxNbrComplexesToPlot, + maxComplexSimilarity, seed, + includeFeatureCollections, minSizeToKeepSet, customComplexes, + complexSpecies, complexDbPath, stringVersion, stringDir, linkTableColumns, + customYml, doRender +) { + ## templateRmd + .assertScalar(x = templateRmd, type = "character") + if (!file.exists(templateRmd)) { + stop("'templateRmd' must point to an existing file") + } + + ## Output specifications + .assertScalar(x = outputDir, type = "character") + .assertScalar(x = outputBaseName, type = "character") + .assertScalar(x = reportTitle, type = "character") + .assertScalar(x = reportAuthor, type = "character") + .assertScalar(x = forceOverwrite, type = "logical") + .assertScalar(x = doRender, type = "logical") + + ## Experiment info + .assertVector(x = experimentInfo, type = "list") + if (length(experimentInfo) > 0) { + .assertVector(x = names(experimentInfo), type = "character") + } + tmp <- getSpeciesInfo(species) ## gives an error for unsupported species + + ## Input file + .assertScalar(x = inFile, type = "character") + if (!file.exists(inFile)) { + stop("'inFile' must point to an existing file") + } + .assertScalar(x = file_ext(inFile), type = "character", + validValues = "rds") + tmpse <- readRDS(inFile) + .assertVector(x = tmpse, type = "SummarizedExperiment") + .assertScalar(x = aName, type = "character", + validValues = assayNames(tmpse)) + if (!is.matrix(assay(tmpse, aName))) { + stop("The ", aName, " assay must be a matrix") + } + stopifnot(all(c("sample", "group") %in% colnames(colData(tmpse)))) + .assertVector(x = tmpse$group, type = "character") + rm(tmpse) + + ## Settings info + .assertVector(x = summaryInfo, type = "list") + if (length(summaryInfo) > 0) { + .assertVector(x = names(summaryInfo), type = "character") + } + + if (is(idCol, "function")) { + stopifnot(length(formals(idCol)) == 1) + } else { + .assertVector(x = idCol, type = "character") + } + if (is(labelCol, "function")) { + stopifnot(length(formals(labelCol)) == 1) + } else { + .assertVector(x = labelCol, type = "character") + } + if (is(geneIdCol, "function")) { + stopifnot(length(formals(geneIdCol)) == 1) + } else { + .assertVector(x = geneIdCol, type = "character", allowNULL = TRUE) + } + if (is(proteinIdCol, "function")) { + stopifnot(length(formals(proteinIdCol)) == 1) + } else { + .assertVector(x = proteinIdCol, type = "character", allowNULL = TRUE) + } + if (is(stringIdCol, "function")) { + stopifnot(length(formals(stringIdCol)) == 1) + } else { + .assertVector(x = stringIdCol, type = "character", allowNULL = TRUE) + } + .assertVector(x = extraFeatureCols, type = "list", allowNULL = TRUE) + if (!is.null(extraFeatureCols)) { + .assertVector(x = names(extraFeatureCols), type = "character") + for (i in extraFeatureCols) { + if (is(i, "function")) { + stopifnot(length(formals(i)) == 1) + } else { + .assertVector(x = i, type = "character", allowNULL = TRUE) + } + } + } + + .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) + + ## Filter functions + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } + + ## Method choices + .assertScalar(x = imputeMethod, type = "character", + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") + .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) + .assertScalar(x = addAbundanceValues, type = "logical") + .assertScalar(x = addHeatmaps, type = "logical") + .assertScalar(x = normMethod, type = "character", + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) + .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) + .assertScalar(x = stattest, type = "character", + validValues = c("limma", "ttest", "proDA", "none")) + + ## Test parameters + .assertScalar(x = minNbrValidValues, type = "numeric", rngIncl = c(0, Inf)) + .assertScalar(x = minlFC, type = "numeric", rngIncl = c(0, Inf)) + .assertScalar(x = samSignificance, type = "logical") + .assertScalar(x = nperm, type = "numeric", rngIncl = c(1, Inf)) + .assertScalar(x = volcanoAdjPvalThr, type = "numeric", rngIncl = c(0, 1)) + .assertScalar(x = volcanoLog2FCThr, type = "numeric", rngIncl = c(0, Inf)) + .assertScalar(x = volcanoMaxFeatures, type = "numeric", rngIncl = c(0, Inf)) + .assertScalar(x = volcanoLabelSign, type = "character", + validValues = c("both", "pos", "neg")) + .assertScalar(x = volcanoS0, type = "numeric", rngIncl = c(0, Inf)) + .assertScalar(x = complexFDRThr, type = "numeric", rngIncl = c(0, 1)) + .assertScalar(x = maxNbrComplexesToPlot, type = "numeric", + rngIncl = c(0, Inf)) + .assertScalar(x = maxComplexSimilarity, type = "numeric") + .assertScalar(x = minSizeToKeepSet, type = "numeric", rngIncl = c(0, Inf)) + .assertVector(x = volcanoFeaturesToLabel, type = "character") + .assertVector(x = mergeGroups, type = "list") + .assertVector(x = comparisons, type = "list") + .assertScalar(x = ctrlGroup, type = "character") + .assertScalar(x = allPairwiseComparisons, type = "logical") + .assertScalar(x = addInteractiveVolcanos, type = "logical") + .assertVector(x = interactiveDisplayColumns, type = "character", + allowNULL = TRUE) + .assertScalar(x = interactiveGroupColumn, type = "character", + allowNULL = TRUE) + .assertScalar(x = singleFit, type = "logical") + .assertScalar(x = subtractBaseline, type = "logical") + .assertScalar(x = baselineGroup, type = "character") + + if (length(mergeGroups) > 0) { + if (is.null(names(mergeGroups)) || any(names(mergeGroups) == "") || + any(duplicated(names(mergeGroups)))) { + stop("'mergeGroups' must be a named list, without duplicated names") + } + } + + if (length(comparisons) > 0) { + if (!all(vapply(comparisons, length, 0) == 2)) { + stop("Each entry in 'comparisons' must have exactly two elements") + } + } + + ## seed + .assertScalar(x = seed, type = "numeric", rngIncl = c(1, Inf)) + + ## Complexes + .assertVector(x = includeFeatureCollections, type = "character", + validValues = c("complexes", "GO", "pathways"), allowNULL = TRUE) + .assertVector(x = customComplexes, type = "list") + if (length(customComplexes) > 0) { + .assertVector(x = names(customComplexes), type = "character") + } + .assertScalar(x = complexSpecies, type = "character", + validValues = c("current", "all"), allowNULL = TRUE) + .assertScalar(x = complexDbPath, type = "character", allowNULL = TRUE) + if (!is.null(complexDbPath) && !file.exists(complexDbPath)) { + stop("'complexDbPath' must point to an existing file") + } + + .assertScalar(x = stringVersion, type = "character") + .assertScalar(x = stringDir, type = "character", allowNULL = TRUE) + + .assertScalar(x = customYml, type = "character", allowNULL = TRUE) + if (!is.null(customYml) && !file.exists(customYml)) { + stop("'customYml' must point to an existing file") + } +} diff --git a/R/checkArgumentsSpectronaut.R b/R/checkArgumentsSpectronaut.R index 03baa99b..68f00020 100644 --- a/R/checkArgumentsSpectronaut.R +++ b/R/checkArgumentsSpectronaut.R @@ -4,15 +4,14 @@ #' @noRd #' @author Charlotte Soneson #' -#' @importFrom MsCoreUtils normalizeMethods .checkArgumentsSpectronaut <- function( templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor, forceOverwrite, experimentInfo, species, spectronautFile, spectronautFileType, outLevel, spectronautLogFile, aName, idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol, extraFeatureCols, iColPattern, sampleAnnot, includeOnlySamples, - excludeSamples, minScore, minPeptides, imputeMethod, assaysForExport, - addAbundanceValues, addHeatmaps, mergeGroups, + excludeSamples, imputeMethod, imputeArgs, filtersDF, filtersSE, + assaysForExport, addAbundanceValues, addHeatmaps, mergeGroups, comparisons, ctrlGroup, allPairwiseComparisons, singleFit, subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest, minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr, @@ -138,19 +137,38 @@ .assertVector(x = linkTableColumns, type = "character", allowNULL = TRUE) - ## Score thresholds - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) + ## Filter functions + .assertVector(x = filtersDF, type = "list") + if (length(filtersDF) > 0) { + .assertVector(x = names(filtersDF), type = "character") + for (f in filtersDF) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } ## Method choices .assertScalar(x = imputeMethod, type = "character", - validValues = c("impSeqRob", "MinProb", "MinProbGlobal")) + validValues = c("impSeqRob", "MinProb", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) + .assertVector(x = imputeArgs, type = "list") .assertVector(x = assaysForExport, type = "character", allowNULL = TRUE) .assertScalar(x = addAbundanceValues, type = "logical") .assertScalar(x = addHeatmaps, type = "logical") .assertScalar(x = normMethod, type = "character", - validValues = c(MsCoreUtils::normalizeMethods(), "none", - "center.mean.shared", "center.median.shared")) + validValues = c("center.mean", "center.median", + "diff.median", "vsn", "none", + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE) .assertScalar(x = stattest, type = "character", validValues = c("limma", "ttest", "proDA", "none")) diff --git a/R/doFilter.R b/R/doFilter.R index 689e361b..15411c34 100644 --- a/R/doFilter.R +++ b/R/doFilter.R @@ -28,20 +28,21 @@ } } -#' Filter out features in MaxQuant data +#' Filter features in a SummarizedExperiment object #' -#' Exclude features with 'Score' below \code{minScore}, 'Peptides' below -#' \code{minPeptides}, or identified as either 'Reverse', -#' 'Potential.contaminant' or 'Only.identified.by.site' by \code{MaxQuant}. +#' Filter the features (rows) in a SummarizedExperiment object based on a +#' user-defined combination of filters. #' #' @author Charlotte Soneson #' @export #' #' @param sce A \code{SummarizedExperiment} object (or a derivative). -#' @param minScore Numeric scalar, the minimum allowed value in the 'Score' -#' column in order to retain the feature. -#' @param minPeptides Numeric scalar, the minimum allowed value in the -#' 'Peptides' column in order to retain the feature. +#' @param filtersSE A named \code{list}, where each element is a function +#' that takes a \code{SummarizedExperiment} object as input and returns +#' a logical vector of the same length as the number of rows in \code{sce}, +#' and where \code{TRUE} implies that the row should be retained. Default +#' sets of filtering functions for input data from different tools are +#' provided (see \code{?defaultFiltersSE}). #' @param plotUpset Logical scalar, whether to generate an UpSet plot #' detailing the reasons for features being filtered out. Only #' generated if any feature is in fact filtered out. @@ -52,156 +53,18 @@ #' @returns A filtered object of the same type as \code{sce}. #' #' @examples +#' # MaxQuant #' sce <- importExperiment(inFile = system.file("extdata", "mq_example", #' "1356_proteinGroups.txt", #' package = "einprot"), #' iColPattern = "^LFQ.intensity.")$sce #' #' dim(sce) -#' sce <- filterMaxQuant(sce = sce, minScore = 2, minPeptides = 2, -#' plotUpset = TRUE) +#' sce <- filterFeaturesSE(sce = sce, filtersSE = einprotMQFilters, +#' plotUpset = TRUE) #' dim(sce) #' -#' @importFrom SummarizedExperiment rowData -#' @importFrom dplyr select mutate across -#' @importFrom ComplexUpset upset -#' @importFrom rlang .data -#' -filterMaxQuant <- function(sce, minScore, minPeptides, plotUpset = TRUE, - exclFile = NULL) { - .assertVector(x = sce, type = "SummarizedExperiment") - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) - .assertScalar(x = plotUpset, type = "logical") - .assertScalar(x = exclFile, type = "character", allowNULL = TRUE) - - ## Make sure that the columns used for filtering are character vectors - if ("Reverse" %in% colnames(rowData(sce))) { - rowData(sce)$Reverse[is.na(rowData(sce)$Reverse)] <- "" - } - if ("Potential.contaminant" %in% colnames(rowData(sce))) { - rowData(sce)$Potential.contaminant[is.na( - rowData(sce)$Potential.contaminant)] <- "" - } - if ("Only.identified.by.site" %in% colnames(rowData(sce))) { - rowData(sce)$Only.identified.by.site[is.na( - rowData(sce)$Only.identified.by.site)] <- "" - } - - filtdf <- as.data.frame(SummarizedExperiment::rowData(sce)) %>% - dplyr::select(dplyr::any_of(c("Reverse", "Potential.contaminant", - "Only.identified.by.site", "Score", - "Peptides"))) %>% - dplyr::mutate(across(dplyr::any_of(c("Reverse", "Potential.contaminant", - "Only.identified.by.site")), - function(x) as.numeric(x == "+"))) - if ("Score" %in% colnames(filtdf) && !is.null(minScore)) { - filtdf <- filtdf %>% - dplyr::mutate(Score = as.numeric((.data$Score < minScore) | - is.na(.data$Score))) - } else { - filtdf$Score <- NULL - } - if ("Peptides" %in% colnames(filtdf) && !is.null(minPeptides)) { - filtdf <- filtdf %>% - dplyr::mutate( - Peptides = as.numeric((.data$Peptides < minPeptides) | - is.na(.data$Peptides))) - } else { - filtdf$Peptides <- NULL - } - - keep <- seq_len(nrow(sce)) - if ("Reverse" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Reverse == "")) - } - if ("Potential.contaminant" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Potential.contaminant == "")) - } - if ("Only.identified.by.site" %in% colnames(rowData(sce))) { - keep <- intersect( - keep, which(rowData(sce)$Only.identified.by.site == "")) - } - if ("Score" %in% colnames(rowData(sce)) && !is.null(minScore)) { - keep <- intersect(keep, which(rowData(sce)$Score >= minScore)) - } - if ("Peptides" %in% colnames(rowData(sce)) && !is.null(minPeptides)) { - keep <- intersect(keep, which(rowData(sce)$Peptides >= minPeptides)) - } - exclude <- rowData(sce[setdiff(seq_len(nrow(sce)), keep), ]) - sce <- sce[keep, ] - - if (nrow(filtdf[rowSums(filtdf) == 0, , drop = FALSE]) != nrow(sce)) { - ## This should not happen - #nocov start - stop("Something went wrong in the filtering - filtdf and sce are of ", - "different sizes") - #nocov end - } - .makeFilterPlot(filtdf = filtdf, plotUpset = plotUpset) - - if (!is.null(exclFile)) { - write.table(exclude, file = exclFile, quote = FALSE, sep = "\t", - row.names = FALSE, col.names = TRUE) - } - sce -} - -#' Filter out features in PD/TMT data -#' -#' If \code{inputLevel} is "Proteins", exclude features with -#' 'Score.Sequest.HT.Sequest.HT' below \code{minScore}, -#' 'Number.of.Peptides' below \code{minPeptides}, or identified as -#' 'Contaminant' by \code{ProteomeDiscoverer}. -#' If \code{inputLevel} is "PeptideGroups", exclude features with -#' 'Delta.Score.by.Search.Engine.Sequest.HT' below \code{minDeltaScore}, -#' 'Number.of.PSMs' below \code{minPSMs}, or identified as -#' 'Contaminant' by \code{ProteomeDiscoverer}. -#' -#' @author Charlotte Soneson -#' @export -#' -#' @param sce A \code{SummarizedExperiment} object (or a derivative). -#' @param inputLevel Either \code{"Proteins"} or \code{"PeptideGroups"}, -#' indicating the type of features in \code{sce}. -#' @param minScore Numeric scalar, the minimum allowed value in the -#' 'Score.Sequest.HT.Sequest.HT' column in order to retain the feature. -#' Only used if \code{inputLevel} is \code{"Proteins"}. -#' @param minPeptides Numeric scalar, the minimum allowed value in the -#' 'Number.of.Peptides' column in order to retain the feature. -#' Only used if \code{inputLevel} is \code{"Proteins"}. -#' @param minDeltaScore Numeric scalar, the minimum allowed value in the -#' 'Delta.Score.by.Search.Engine.Sequest.HT' column in order to retain the -#' feature. Only used if \code{inputLevel} is \code{"PeptideGroups"}. -#' @param minPSMs Numeric scalar, the minimum allowed value in the -#' 'Number.of.PSMs' column in order to retain the feature. -#' Only used if \code{inputLevel} is \code{"PeptideGroups"}. -#' @param masterProteinsOnly Logical scalar indicating whether only master -#' proteins (where the \code{Master} column value is -#' \code{IsMasterProtein}) should be retained. -#' @param modificationsCol Character string pointing to a column containing -#' modification details. \code{excludeUnmodifiedPeptides} and -#' \code{keepModifications} will use information from this column. Only -#' used if \code{inputLevel} is \code{"PeptideGroups"}. -#' @param excludeUnmodifiedPeptides Logical scalar, whether to filter out -#' peptides without modifications. Only used if \code{inputLevel} is -#' \code{"PeptideGroups"}. -#' @param keepModifications Character string (or \code{NULL}) indicating -#' which modifications to retain in the analysis. Can be a regular -#' expression, which will be matched against the \code{modificationsCol}. -#' If \code{NULL} (the default), all rows are retained. Only used if -#' \code{inputLevel} is \code{"PeptideGroups"}. -#' @param plotUpset Logical scalar, whether to generate an UpSet plot -#' detailing the reasons for features being filtered out. Only -#' generated if any feature is in fact filtered out. -#' @param exclFile Character scalar, the path to a text file where the -#' features that are filtered out are written. If \code{NULL} (default), -#' excluded features are not recorded. -#' -#' @returns A filtered object of the same type as \code{sce}. -#' -#' @examples -#' ## Proteins +#' # ProteomeDiscoverer, Proteins #' sce <- importExperiment( #' inFile = system.file("extdata", "pdtmt_example", #' "Fig2_m23139_RTS_QC_varMods_Proteins.txt", @@ -209,11 +72,11 @@ filterMaxQuant <- function(sce, minScore, minPeptides, plotUpset = TRUE, #' iColPattern = "^Abundance.F.+.Sample.")$sce #' #' dim(sce) -#' sce <- filterPDTMT(sce = sce, inputLevel = "Proteins", minScore = 2, -#' minPeptides = 2, plotUpset = TRUE) +#' sce <- filterFeaturesSE(sce = sce, filtersSE = einprotPDTMTProteinFilters, +#' plotUpset = TRUE) #' dim(sce) #' -#' ## PeptideGroups +#' # ProteomeDiscoverer, PeptideGroups #' sce <- importExperiment( #' inFile = system.file("extdata", "pdtmt_example", #' "Fig2_m23139_RTS_QC_varMods_PeptideGroups.txt", @@ -221,422 +84,241 @@ filterMaxQuant <- function(sce, minScore, minPeptides, plotUpset = TRUE, #' iColPattern = "^Abundance.F.+.Sample.")$sce #' #' dim(sce) -#' sce <- filterPDTMT(sce = sce, inputLevel = "PeptideGroups", -#' minPSMs = 2, plotUpset = TRUE, minDeltaScore = 0.2, -#' modificationsCol = "Modifications.in.Master.Proteins", -#' excludeUnmodifiedPeptides = TRUE) +#' sce <- filterFeaturesSE(sce = sce, filtersSE = einprotPDTMTPeptideGroupFilters) #' dim(sce) #' -#' @importFrom SummarizedExperiment rowData -#' @importFrom dplyr select mutate -#' @importFrom ComplexUpset upset +#' # FragPipe +#' sce <- importExperiment(inFile = system.file("extdata", "fp_example", +#' "combined_protein.tsv", +#' package = "einprot"), +#' iColPattern = ".MaxLFQ.Intensity$")$sce +#' +#' dim(sce) +#' sce <- filterFeaturesSE(sce = sce, filtersSE = einprotFragPipeFilters, +#' plotUpset = TRUE) +#' dim(sce) #' -filterPDTMT <- function(sce, inputLevel, minScore = 0, minPeptides = 0, - minDeltaScore = 0, minPSMs = 0, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL) { +filterFeaturesSE <- function(sce, filtersSE = list(), plotUpset = TRUE, + exclFile = NULL) { .assertVector(x = sce, type = "SummarizedExperiment") - .assertScalar(x = inputLevel, type = "character", - validValues = c("Proteins", "PeptideGroups")) - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minDeltaScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPSMs, type = "numeric", allowNULL = TRUE) - .assertScalar(x = masterProteinsOnly, type = "logical") - if (inputLevel == "PeptideGroups") { - .assertScalar(x = modificationsCol, type = "character", - validValues = colnames(rowData(sce)), allowNULL = TRUE) - .assertScalar(x = excludeUnmodifiedPeptides, type = "logical") - .assertScalar(x = keepModifications, type = "character", - allowNULL = TRUE) + .assertVector(x = filtersSE, type = "list") + if (length(filtersSE) > 0) { + .assertVector(x = names(filtersSE), type = "character") + for (f in filtersSE) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } } .assertScalar(x = plotUpset, type = "logical") .assertScalar(x = exclFile, type = "character", allowNULL = TRUE) - ## Make sure that the columns used for filtering are character vectors - if ("Contaminant" %in% colnames(rowData(sce))) { - rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant) + if (length(filtersSE) > 0) { + # apply filters and check that all vectors are logical and have + # no NA values + tokeep <- lapply(filtersSE, function(f) f(sce)) + for (filts in names(tokeep)) { + stopifnot(is.logical(tokeep[[filts]]) && + all(!is.na(tokeep[[filts]]))) + } + + filtdf <- do.call(bind_rows, lapply(tokeep, function(x) !x)) + exclude <- rowData(sce)[which(rowSums(filtdf) > 0), , drop = FALSE] + sce <- sce[which(rowSums(filtdf) == 0), ] + + .makeFilterPlot(filtdf = filtdf, plotUpset = plotUpset) + + if (!is.null(exclFile)) { + write.table(exclude, file = exclFile, quote = FALSE, sep = "\t", + row.names = FALSE, col.names = TRUE) + } + sce + } else { + sce } +} - if (inputLevel == "Proteins") { - filtdf <- as.data.frame(SummarizedExperiment::rowData(sce)) %>% - dplyr::select(dplyr::any_of(c("Contaminant", "Number.of.Peptides", - "Score.Sequest.HT.Sequest.HT", - "Master"))) %>% - dplyr::mutate(across(dplyr::any_of(c("Contaminant")), - function(x) as.numeric(x == "True"))) - if ("Number.of.Peptides" %in% colnames(filtdf) && - !is.null(minPeptides)) { - filtdf <- filtdf %>% - dplyr::mutate( - Number.of.Peptides = - as.numeric((.data$Number.of.Peptides < minPeptides) | - is.na(.data$Number.of.Peptides))) +#' Default filters (SE) +#' +#' einprot provides default filters for data imported from various tools. +#' To see the functions and thresholds used in each of these, print the +#' corresponding object below. +#' +#' @export +#' @name defaultFiltersSE +#' @rdname defaultFiltersSE +einprotMQFilters <- list( + Score = function(sce) { + if ("Score" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Score >= 10 & !is.na(rowData(sce)$Score) } else { - filtdf$Number.of.Peptides <- NULL + kp <- rep(TRUE, nrow(sce)) } - if ("Score.Sequest.HT.Sequest.HT" %in% colnames(filtdf) && - !is.null(minScore)) { - filtdf <- filtdf %>% - dplyr::mutate( - Score.Sequest.HT.Sequest.HT = - as.numeric((.data$Score.Sequest.HT.Sequest.HT < minScore) | - is.na(.data$Score.Sequest.HT.Sequest.HT))) + kp + }, + Peptides = function(sce) { + if ("Peptides" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Peptides >= 2 & !is.na(rowData(sce)$Peptides) } else { - filtdf$Score.Sequest.HT.Sequest.HT <- NULL - } - if ("Master" %in% colnames(filtdf)) { - filtdf <- filtdf %>% - dplyr::mutate( - Master = as.numeric((.data$Master != "IsMasterProtein") | - is.na(.data$Master))) - } - - keep <- seq_len(nrow(sce)) - if ("Contaminant" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Contaminant == "False")) - } - if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce)) && - !is.null(minScore)) { - keep <- intersect( - keep, - which(rowData(sce)$Score.Sequest.HT.Sequest.HT >= minScore) - ) - } - if ("Number.of.Peptides" %in% colnames(rowData(sce)) && - !is.null(minPeptides)) { - keep <- intersect( - keep, which(rowData(sce)$Number.of.Peptides >= minPeptides) - ) + kp <- rep(TRUE, nrow(sce)) } - if (masterProteinsOnly) { - if ("Master" %in% colnames(rowData(sce))) { - keep <- intersect( - keep, which(rowData(sce)$Master == "IsMasterProtein") - ) - } + kp + }, + Reverse = function(sce) { + if ("Reverse" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Reverse == "" | is.na(rowData(sce)$Reverse) } else { - filtdf$Master <- NULL + kp <- rep(TRUE, nrow(sce)) } - exclude <- rowData(sce[setdiff(seq_len(nrow(sce)), keep), ]) - sce <- sce[keep, ] - } else if (inputLevel == "PeptideGroups") { - colsToExtract <- c("Contaminant", "Number.of.PSMs", - "Delta.Score.by.Search.Engine.Sequest.HT") - if (!is.null(modificationsCol)) { - colsToExtract <- c(colsToExtract, modificationsCol) - } - filtdf <- as.data.frame(SummarizedExperiment::rowData(sce)) %>% - dplyr::select(dplyr::any_of(colsToExtract)) %>% - dplyr::mutate(across(dplyr::any_of(c("Contaminant")), - function(x) as.numeric(x == "True"))) - if (!is.null(modificationsCol) && excludeUnmodifiedPeptides) { - filtdf <- filtdf %>% - dplyr::mutate(Unmodified.peptide = - .data[[modificationsCol]] == "") + kp + }, + Contaminant = function(sce) { + if ("Potential.contaminant" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Potential.contaminant == "" | + is.na(rowData(sce)$Potential.contaminant) } else { - filtdf$Unmodified.peptide <- NULL + kp <- rep(TRUE, nrow(sce)) } - if (!is.null(modificationsCol) && !is.null(keepModifications)) { - filtdf <- filtdf %>% - dplyr::mutate(No.modification.tokeep = - !grepl(keepModifications, - .data[[modificationsCol]])) + kp + }, + OnlySite = function(sce) { + if ("Only.identified.by.site" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Only.identified.by.site == "" | + is.na(rowData(sce)$Only.identified.by.site) } else { - filtdf$No.modification.tokeep <- NULL + kp <- rep(TRUE, nrow(sce)) } - if ("Number.of.PSMs" %in% colnames(filtdf) && !is.null(minPSMs)) { - filtdf <- filtdf %>% - dplyr::mutate(Number.of.PSMs = - as.numeric((.data$Number.of.PSMs < minPSMs) | - is.na(.data$Number.of.PSMs))) + kp + } +) + +#' @export +#' @rdname defaultFiltersSE +einprotPDTMTProteinFilters <- list( + Score = function(sce) { + if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Score.Sequest.HT.Sequest.HT >= 2 & + !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) } else { - filtdf$Number.of.PSMs <- NULL + kp <- rep(TRUE, nrow(sce)) } - if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(filtdf) && - !is.null(minDeltaScore)) { - filtdf <- filtdf %>% - dplyr::mutate( - Delta.Score.by.Search.Engine.Sequest.HT = - as.numeric((.data$Delta.Score.by.Search.Engine.Sequest.HT < - minDeltaScore) | - is.na(.data$Delta.Score.by.Search.Engine.Sequest.HT))) + kp + }, + Peptides = function(sce) { + if ("Number.of.Peptides" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Number.of.Peptides >= 2 & !is.na(rowData(sce)$Number.of.Peptides) } else { - filtdf$Delta.Score.by.Search.Engine.Sequest.HT <- NULL - } - ## Remove the modifications column (not needed anymore) - if (!is.null(modificationsCol) && - modificationsCol %in% colnames(filtdf)) { - filtdf[[modificationsCol]] <- NULL + kp <- rep(TRUE, nrow(sce)) } - - keep <- seq_len(nrow(sce)) + kp + }, + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Contaminant == "False")) - } - if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% - colnames(rowData(sce)) && - !is.null(minDeltaScore)) { - keep <- intersect( - keep, - which(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= minDeltaScore) - ) + rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant) + kp <- rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) + } else { + kp <- rep(TRUE, nrow(sce)) } - if ("Number.of.PSMs" %in% colnames(rowData(sce)) && !is.null(minPSMs)) { - keep <- intersect( - keep, which(rowData(sce)$Number.of.PSMs >= minPSMs) - ) + kp + } +) + +#' @export +#' @rdname defaultFiltersSE +einprotPDTMTPeptideGroupFilters <- list( + DeltaScore = function(sce) { + if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.2 & + !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) + } else { + kp <- rep(TRUE, nrow(sce)) } - if (!is.null(modificationsCol) && excludeUnmodifiedPeptides) { - keep <- intersect( - keep, which(rowData(sce)[[modificationsCol]] != "") - ) + kp + }, + PSMs = function(sce) { + if ("Number.of.PSMs" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Number.of.PSMs >= 2 & !is.na(rowData(sce)$Number.of.PSMs) + } else { + kp <- rep(TRUE, nrow(sce)) } - if (!is.null(modificationsCol) && !is.null(keepModifications)) { - keep <- intersect( - keep, which(grepl(keepModifications, - rowData(sce)[[modificationsCol]])) - ) + kp + }, + Contaminant = function(sce) { + if ("Contaminant" %in% colnames(rowData(sce))) { + rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant) + kp <- rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) + } else { + kp <- rep(TRUE, nrow(sce)) } - - exclude <- rowData(sce[setdiff(seq_len(nrow(sce)), keep), ]) - sce <- sce[keep, ] + kp } +) - if (nrow(filtdf[rowSums(filtdf) == 0, , drop = FALSE]) != nrow(sce)) { - ## This should not happen - could end up here though if the values in - ## the Contaminant column are not the expected ones - stop("Something went wrong in the filtering - filtdf and sce are of ", - "different sizes") - } - .makeFilterPlot(filtdf = filtdf, plotUpset = plotUpset) - - if (!is.null(exclFile)) { - write.table(exclude, file = exclFile, quote = FALSE, sep = "\t", - row.names = FALSE, col.names = TRUE) - } - - sce -} - -#' Filter out features in FragPipe data -#' -#' Exclude features with 'Combined.Total.Peptides' below \code{minPeptides}, -#' or identified as either 'Reverse' (Protein name matching -#' \code{revPattern}) or 'Potential.contaminant' (Protein name starting -#' with \code{contam_}) by \code{FragPipe}. -#' -#' @author Charlotte Soneson #' @export -#' -#' @param sce A \code{SummarizedExperiment} object (or a derivative). -#' @param minPeptides Numeric scalar, the minimum allowed value in the -#' 'Combined.Total.Peptides' column in order to retain the feature. -#' @param plotUpset Logical scalar, whether to generate an UpSet plot -#' detailing the reasons for features being filtered out. Only -#' generated if any feature is in fact filtered out. -#' @param revPattern Character scalar providing the pattern (a regular -#' expression) used to identify decoys (reverse hits). The pattern is -#' matched against the IDs in the FragPipe \code{Protein} column. -#' @param exclFile Character scalar, the path to a text file where the -#' features that are filtered out are written. If \code{NULL} (default), -#' excluded features are not recorded. -#' -#' @returns A filtered object of the same type as \code{sce}. -#' -#' @examples -#' sce <- importExperiment(inFile = system.file("extdata", "fp_example", -#' "combined_protein.tsv", -#' package = "einprot"), -#' iColPattern = ".MaxLFQ.Intensity$")$sce -#' -#' dim(sce) -#' sce <- filterFragPipe(sce = sce, minPeptides = 2, -#' plotUpset = TRUE, -#' revPattern = "^rev_") -#' dim(sce) -#' -#' @importFrom SummarizedExperiment rowData -#' @importFrom dplyr select mutate across -#' @importFrom ComplexUpset upset -#' @importFrom rlang .data -#' -filterFragPipe <- function(sce, minPeptides, plotUpset = TRUE, - revPattern = "^rev_", exclFile = NULL) { - .assertVector(x = sce, type = "SummarizedExperiment") - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) - .assertScalar(x = plotUpset, type = "logical") - .assertScalar(x = revPattern, type = "character") - .assertScalar(x = exclFile, type = "character", allowNULL = TRUE) - - ## Make sure that the columns used for filtering later are character vectors - rowData(sce)$Potential.contaminant <- - ifelse(grepl("^contam_", rowData(sce)$Protein), "+", "") - rowData(sce)$Reverse <- ifelse(grepl(revPattern, rowData(sce)$Protein), - "+", "") - - filtdf <- as.data.frame(SummarizedExperiment::rowData(sce)) %>% - dplyr::select(dplyr::any_of(c("Reverse", "Potential.contaminant", - "Combined.Total.Peptides"))) %>% - dplyr::mutate(across(dplyr::any_of(c("Reverse", - "Potential.contaminant")), - function(x) as.numeric(x == "+"))) - if ("Combined.Total.Peptides" %in% colnames(filtdf) && - !is.null(minPeptides)) { - filtdf <- filtdf %>% - dplyr::mutate( - Combined.Total.Peptides = as.numeric( - (.data$Combined.Total.Peptides < minPeptides) | - is.na(.data$Combined.Total.Peptides))) - } else { - filtdf$Combined.Total.Peptides <- NULL - } - - keep <- seq_len(nrow(sce)) - if ("Reverse" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Reverse == "")) - } - if ("Potential.contaminant" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Potential.contaminant == "")) - } - if ("Combined.Total.Peptides" %in% colnames(rowData(sce)) && - !is.null(minPeptides)) { - keep <- intersect( - keep, which(rowData(sce)$Combined.Total.Peptides >= minPeptides) - ) - } - exclude <- rowData(sce[setdiff(seq_len(nrow(sce)), keep), ]) - sce <- sce[keep, ] - - if (nrow(filtdf[rowSums(filtdf) == 0, , drop = FALSE]) != nrow(sce)) { - ## This should not happen - #nocov start - stop("Something went wrong in the filtering - filtdf and sce are of ", - "different sizes") - #nocov end - } - .makeFilterPlot(filtdf = filtdf, plotUpset = plotUpset) - - if (!is.null(exclFile)) { - write.table(exclude, file = exclFile, quote = FALSE, sep = "\t", - row.names = FALSE, col.names = TRUE) +#' @rdname defaultFiltersSE +einprotFragPipeFilters <- list( + Contaminant = function(sce) { + if ("Protein" %in% colnames(rowData(sce))) { + kp <- !grepl("^contam_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp + }, + Reverse = function(sce) { + if ("Protein" %in% colnames(rowData(sce))) { + kp <- !grepl("^rev_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp + }, + Peptides = function(sce) { + if ("Combined.Total.Peptides" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$Combined.Total.Peptides >= 2 & !is.na(rowData(sce)$Combined.Total.Peptides) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp } - sce -} +) -#' Filter out features in Spectronaut data -#' -#' Exclude features with 'PG.Cscore' below \code{minScore}, -#' 'PG.NrOfStrippedSequencesIdentified.Experiment.wide' below -#' \code{minPeptides}, or where the 'PG.ProteinGroups' column contains the -#' specified \code{revPattern}. -#' -#' @author Charlotte Soneson #' @export -#' -#' @param sce A \code{SummarizedExperiment} object (or a derivative). -#' @param minScore Numeric scalar, the minimum allowed value in the 'PG.Cscore' -#' column in order to retain the feature. -#' @param minPeptides Numeric scalar, the minimum allowed value in the -#' 'PG.NrOfStrippedSequencesIdentified.Experiment.wide' column in order to -#' retain the feature. -#' @param plotUpset Logical scalar, whether to generate an UpSet plot -#' detailing the reasons for features being filtered out. Only -#' generated if any feature is in fact filtered out. -#' @param revPattern Character scalar providing the pattern (a regular -#' expression) used to identify decoys (reverse hits). The pattern is -#' matched against the IDs in the Spectronaut \code{PG.ProteinGroups} -#' column. -#' @param contamPattern Character scalar providing the pattern (a regular -#' expression) used to identify contaminants. The pattern is -#' matched against the IDs in the Spectronaut \code{PG.ProteinGroups} -#' column. -#' @param exclFile Character scalar, the path to a text file where the -#' features that are filtered out are written. If \code{NULL} (default), -#' excluded features are not recorded. -#' -#' @returns A filtered object of the same type as \code{sce}. -#' -#' @importFrom SummarizedExperiment rowData -#' @importFrom dplyr select mutate across -#' @importFrom ComplexUpset upset -#' @importFrom rlang .data -#' -filterSpectronaut <- function(sce, minScore, minPeptides, plotUpset = TRUE, - revPattern = "_Decoy$", - contamPattern = "^contam_", exclFile = NULL) { - .assertVector(x = sce, type = "SummarizedExperiment") - .assertScalar(x = minScore, type = "numeric", allowNULL = TRUE) - .assertScalar(x = minPeptides, type = "numeric", allowNULL = TRUE) - .assertScalar(x = plotUpset, type = "logical") - .assertScalar(x = revPattern, type = "character") - .assertScalar(x = contamPattern, type = "character") - .assertScalar(x = exclFile, type = "character", allowNULL = TRUE) - - ## Make sure that the columns used for filtering later are character vectors - rowData(sce)$Reverse <- ifelse(grepl(revPattern, rowData(sce)$PG.ProteinGroups), - "+", "") - rowData(sce)$Contaminant <- ifelse(grepl(contamPattern, - rowData(sce)$PG.ProteinGroups), - "+", "") - - filtdf <- as.data.frame(SummarizedExperiment::rowData(sce)) %>% - dplyr::select(dplyr::any_of(c("Reverse", "PG.NrOfStrippedSequencesIdentified.Experiment.wide", - "PG.Cscore", "Contaminant"))) %>% - dplyr::mutate(across(dplyr::any_of(c("Reverse", "Contaminant")), - function(x) as.numeric(x == "+"))) - if ("PG.NrOfStrippedSequencesIdentified.Experiment.wide" %in% colnames(filtdf) && - !is.null(minPeptides)) { - filtdf <- filtdf %>% - dplyr::mutate( - PG.NrOfStrippedSequencesIdentified.Experiment.wide = as.numeric( - (.data$PG.NrOfStrippedSequencesIdentified.Experiment.wide < minPeptides) | - is.na(.data$PG.NrOfStrippedSequencesIdentified.Experiment.wide))) - } else { - filtdf$PG.NrOfStrippedSequencesIdentified.Experiment.wide <- NULL - } - if ("PG.Cscore" %in% colnames(filtdf) && !is.null(minScore)) { - filtdf <- filtdf %>% - dplyr::mutate(PG.Cscore = as.numeric((.data$PG.Cscore < minScore) | - is.na(.data$PG.Cscore))) - } else { - filtdf$PG.Cscore <- NULL - } - - keep <- seq_len(nrow(sce)) - if ("Reverse" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Reverse == "")) - } - if ("Contaminant" %in% colnames(rowData(sce))) { - keep <- intersect(keep, which(rowData(sce)$Contaminant == "")) - } - if ("PG.NrOfStrippedSequencesIdentified.Experiment.wide" %in% colnames(rowData(sce)) && - !is.null(minPeptides)) { - keep <- intersect( - keep, which(rowData(sce)$PG.NrOfStrippedSequencesIdentified.Experiment.wide >= minPeptides) - ) - } - if ("PG.Cscore" %in% colnames(rowData(sce)) && !is.null(minScore)) { - keep <- intersect(keep, which(rowData(sce)$PG.Cscore >= minScore)) - } - exclude <- rowData(sce[setdiff(seq_len(nrow(sce)), keep), ]) - sce <- sce[keep, ] - - if (nrow(filtdf[rowSums(filtdf) == 0, , drop = FALSE]) != nrow(sce)) { - ## This should not happen - #nocov start - stop("Something went wrong in the filtering - filtdf and sce are of ", - "different sizes") - #nocov end - } - .makeFilterPlot(filtdf = filtdf, plotUpset = plotUpset) - - if (!is.null(exclFile)) { - write.table(exclude, file = exclFile, quote = FALSE, sep = "\t", - row.names = FALSE, col.names = TRUE) +#' @rdname defaultFiltersSE +einprotSpectronautFilters <- list( + Contaminant = function(sce) { + if ("PG.ProteinGroups" %in% colnames(rowData(sce))) { + kp <- !grepl("^contam_", rowData(sce)$PG.ProteinGroups) & + !is.na(rowData(sce)$PG.ProteinGroups) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp + }, + Reverse = function(sce) { + if ("PG.ProteinGroups" %in% colnames(rowData(sce))) { + kp <- !grepl("_Decoy$", rowData(sce)$PG.ProteinGroups) & + !is.na(rowData(sce)$PG.ProteinGroups) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp + }, + Peptides = function(sce) { + if ("PG.NrOfStrippedSequencesIdentified.Experiment.wide" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$PG.NrOfStrippedSequencesIdentified.Experiment.wide >= 2 & + !is.na(rowData(sce)$PG.NrOfStrippedSequencesIdentified.Experiment.wide) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp + }, + Score = function(sce) { + if ("PG.Cscore" %in% colnames(rowData(sce))) { + kp <- rowData(sce)$PG.Cscore >= 2 & + !is.na(rowData(sce)$PG.Cscore) + } else { + kp <- rep(TRUE, nrow(sce)) + } + kp } - sce -} +) diff --git a/R/doImputation.R b/R/doImputation.R index 5712e8e8..a4e3156a 100644 --- a/R/doImputation.R +++ b/R/doImputation.R @@ -28,6 +28,107 @@ } } +#' @importFrom stats quantile median rnorm +#' @keywords internal +#' @noRd +#' +.minProbGlobalOffsetFun <- function(mat, lowQuantile = 0.01, multSigma = 1, + constOffset = NULL, relOffset = NULL) { + .assertVector(x = mat, type = "matrix") + .assertScalar(x = lowQuantile, type = "numeric", rngExcl = c(0, 1)) + .assertScalar(x = multSigma, type = "numeric") + .assertScalar(x = constOffset, type = "numeric", allowNULL = TRUE) + .assertScalar(x = relOffset, type = "numeric", allowNULL = TRUE) + if (!is.null(constOffset) && !is.null(relOffset)) { + stop("At most one of constOffset and relOffset can be specified") + } + + nMissing <- sum(is.na(c(mat))) + if (nMissing == 0) { + return(mat) + } else { + ## Get a global low quantile + globalMin <- stats::quantile(c(mat), prob = lowQuantile, na.rm = TRUE) + + ## Only use features observed in at least half the samples to calculate + ## the standard deviation + keepRows <- which(apply(!is.na(mat), 1, sum) / ncol(mat) > 0.5) + globalSd <- stats::median(apply(mat[keepRows, ], 1, sd, na.rm = TRUE), + na.rm = TRUE) * multSigma + print(globalSd) + + if (!is.null(constOffset)) { + globalMin <- globalMin + constOffset + } else if (!is.null(relOffset)) { + globalMin <- globalMin + relOffset * globalSd + } + + ## Generate random values and replace NAs + randValues <- stats::rnorm(nMissing, mean = globalMin, sd = globalSd) + mat[is.na(mat)] <- randValues + return(mat) + } +} + +#' @importFrom stats quantile median rnorm +#' @keywords internal +#' @noRd +#' +.minProbOffsetFun <- function(mat, lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = NULL) { + .assertVector(x = mat, type = "matrix") + .assertScalar(x = lowQuantile, type = "numeric", rngExcl = c(0, 1)) + .assertScalar(x = multSigma, type = "numeric") + .assertScalar(x = margin, type = "numeric", validValues = c(1, 2)) + .assertScalar(x = constOffset, type = "numeric", allowNULL = TRUE) + .assertScalar(x = relOffset, type = "numeric", allowNULL = TRUE) + if (!is.null(constOffset) && !is.null(relOffset)) { + stop("At most one of constOffset and relOffset can be specified") + } + + nMissing <- sum(is.na(c(mat))) + if (nMissing == 0) { + return(mat) + } else { + if (margin == 1) { + mat <- t(mat) + } + + ## Get a low quantile per sample + minPerSample <- apply(mat, MARGIN = 2, FUN = stats::quantile, + prob = lowQuantile, na.rm = TRUE) + + ## Only use features observed in at least half the samples to calculate + ## the standard deviation + keepRows <- which(apply(!is.na(mat), 1, sum) / ncol(mat) > 0.5) + globalSd <- stats::median(apply(mat[keepRows, ], 1, sd, na.rm = TRUE), + na.rm = TRUE) * multSigma + print(globalSd) + + if (!is.null(constOffset)) { + minPerSample <- minPerSample + constOffset + } else if (!is.null(relOffset)) { + minPerSample <- minPerSample + relOffset * globalSd + } + + ## Generate random values and replace NAs + for (i in seq_len(ncol(mat))) { + randValues <- stats::rnorm(nrow(mat), mean = minPerSample[i], + sd = globalSd) + naidx <- which(is.na(mat[, i])) + if (length(naidx) > 0) { + mat[naidx, i] <- randValues[naidx] + } + } + + if (margin == 1) { + mat <- t(mat) + } + + return(mat) + } +} + #' Perform imputation of NA values #' #' Perform imputation of missing values (represented by \code{NA}) in one assay @@ -35,12 +136,19 @@ #' complete data (including imputed values). #' #' @param sce A \code{SummarizedExperiment} object (or a derivative). -#' @param method Character scalar giving the imputation method. Currently, +#' @param imputeMethod Character scalar giving the imputation method. Currently, #' \code{"MinProb"} (provided in the \code{MsCoreUtils} package), -#' \code{"impSeqRob"} (provided in the \code{rrcovNA} package), and +#' \code{"impSeqRob"} (provided in the \code{rrcovNA} package), #' \code{"MinProbGlobal"} (a reimplementation of the MinProb algorithm -#' using a global mean value rather than sample-specific ones) are -#' supported. +#' using a global mean value rather than sample-specific ones), +#' \code{"MinProbGlobalOffset"} (like \code{"MinProbGlobal"}, but a +#' constant or relative offset can be specified to shift the mean of the +#' imputed values), and \code{"MinProbOffset"} (like +#' \code{"MinProbGlobalOffset"} but imputing separately for each row or +#' column) are supported. In addition, a custom function can be used by +#' setting \code{imputeMethod = "custom"} and providing the function in the +#' \code{FUN} argument (this will be passed on to +#' \code{MsCoreUtils::impute_matrix}). #' @param assayName Character scalar giving the name of the assay in \code{sce} #' to be imputed. The matrix should have missing values represented as #' \code{NA}. @@ -49,6 +157,29 @@ #' @param ... Additional arguments that will be passed on to the imputation #' function. #' +#' @details For the pre-defined imputation functions defined by einprot, +#' these are the available arguments: +#' \describe{ +#' \item{"MinProbGlobal":}{lowQuantile = 0.01, multSigma = 1 (similar to +#' \code{q} and \code{sigma} in +#' \code{MsCoreUtils::MsCoreUtils::impute_MinProb}).} +#' \item{"MinProbOffset":}{lowQuantile = 0.01, multSigma = 1, +#' margin = 2L, constOffset = NULL, relOffset = NULL. \code{margin} +#' indicates whether to impute along rows or columns. +#' \code{constOffset} defines a constant shift of the mean of the +#' imputed values relative to the low quantile. \code{relOffset} +#' instead defines the shift as a multiple of the standard deviation +#' of the distribution of imputed values.} +#' \item{"MinProbGlobalOffset":}{ lowQuantile = 0.01, multSigma = 1, +#' constOffset = NULL, relOffset = NULL. Similar interpretation as +#' for \code{"MinProbOffset"}.} +#' } +#' If \code{imputeMethod = "custom"}, any suitable function that accepts a +#' matrix as input and returns a matrix of the same shape can be provided to +#' the \code{FUN} argument. In addition, any argument to the function can +#' also be specified. The function and all arguments will be passed on to +#' \code{\link[MsCoreUtils]{impute_matrix}}. +#' #' @export #' @author Charlotte Soneson #' @@ -71,40 +202,71 @@ #' SummarizedExperiment::assay(sce, "log2_iBAQ"))] <- NA #' #' ## Impute missing values -#' sce <- doImputation(sce, method = "MinProb", assayName = "log2_iBAQ", +#' sce <- doImputation(sce, imputeMethod = "MinProb", assayName = "log2_iBAQ", #' imputedAssayName = "imputed_iBAQ") #' SummarizedExperiment::assayNames(sce) #' +#' ## Use another method from MsCoreUtils (specified as a custom function) +#' sce2 <- doImputation(sce, imputeMethod = "custom", assayName = "log2_iBAQ", +#' imputedAssayName = "imputed_iBAQ_knn", +#' FUN = MsCoreUtils::impute_knn) +#' ## Alternatively, just specify one of the methods supported by MsCoreUtils::impute_matrix +#' sce3 <- doImputation(sce, imputeMethod = "custom", assayName = "log2_iBAQ", +#' imputedAssayName = "imputed_iBAQ_knn", +#' method = "knn") +#' identical(SummarizedExperiment::assay(sce2, "imputed_iBAQ_knn"), +#' SummarizedExperiment::assay(sce3, "imputed_iBAQ_knn")) +#' #' @importFrom MsCoreUtils impute_matrix #' @importFrom rrcovNA impSeqRob #' @importFrom SummarizedExperiment assay assay<- #' @importFrom imputeLCMD impute.MinProb #' -doImputation <- function(sce, method, assayName, imputedAssayName, ...) { +doImputation <- function(sce, imputeMethod, assayName, imputedAssayName, ...) { .assertVector(x = sce, type = "SummarizedExperiment") - .assertScalar(x = method, type = "character", - validValues = c("MinProb", "impSeqRob", "MinProbGlobal")) + .assertScalar(x = imputeMethod, type = "character", + validValues = c("MinProb", "impSeqRob", "MinProbGlobal", + "MinProbOffset", "MinProbGlobalOffset", + "custom")) .assertScalar(x = assayName, type = "character", validValues = SummarizedExperiment::assayNames(sce)) .assertScalar(x = imputedAssayName, type = "character") - if (method == "MinProb") { + if (imputeMethod == "MinProb") { SummarizedExperiment::assay(sce, imputedAssayName) <- MsCoreUtils::impute_matrix( SummarizedExperiment::assay(sce, assayName), method = "MinProb", ... ) - } else if (method == "impSeqRob") { + } else if (imputeMethod == "impSeqRob") { tmp <- rrcovNA::impSeqRob( x = SummarizedExperiment::assay(sce, assayName), ... ) SummarizedExperiment::assay(sce, imputedAssayName) <- tmp$x - } else if (method == "MinProbGlobal") { + } else if (imputeMethod == "MinProbGlobal") { SummarizedExperiment::assay(sce, imputedAssayName) <- MsCoreUtils::impute_matrix( SummarizedExperiment::assay(sce, assayName), FUN = .minProbGlobalFun, ... ) + } else if (imputeMethod == "MinProbGlobalOffset") { + SummarizedExperiment::assay(sce, imputedAssayName) <- + MsCoreUtils::impute_matrix( + SummarizedExperiment::assay(sce, assayName), + FUN = .minProbGlobalOffsetFun, ... + ) + } else if (imputeMethod == "MinProbOffset") { + SummarizedExperiment::assay(sce, imputedAssayName) <- + MsCoreUtils::impute_matrix( + SummarizedExperiment::assay(sce, assayName), + FUN = .minProbOffsetFun, ... + ) + } else if (imputeMethod == "custom") { + SummarizedExperiment::assay(sce, imputedAssayName) <- + MsCoreUtils::impute_matrix( + SummarizedExperiment::assay(sce, assayName), + ... + ) } sce } diff --git a/R/doNormalization.R b/R/doNormalization.R index 1fcad555..73e43282 100644 --- a/R/doNormalization.R +++ b/R/doNormalization.R @@ -8,10 +8,12 @@ #' the methods from \code{MsCoreUtils::normalizeMethods()} are supported, #' together with "center.mean.shared" and "center.median.shared", #' subtracting the mean or median, respectively, across features that are -#' observed in all samples. +#' observed in all samples, and "diff.mean.shared" and "diff.median.shared", +#' which add back the grand mean or median across samples. #' If \code{spikeFeatures} is not \code{NULL}, only #' \code{"center.mean"}, \code{"center.median"}, \code{"div.mean"} and -#' \code{"div.median"} are supported. +#' \code{"div.median"} are supported. Note that in this case, the mean or +#' median of the spike features will be added/multiplied back. #' @param assayName Character scalar giving the name of the assay in \code{sce} #' to be normalized. #' @param normalizedAssayName Character scalar providing the name that will be @@ -60,8 +62,8 @@ doNormalization <- function(sce, method, assayName, normalizedAssayName, .assertVector(x = sce, type = "SummarizedExperiment") .assertScalar(x = method, type = "character", validValues = c(MsCoreUtils::normalizeMethods(), - "center.mean.shared", - "center.median.shared")) + "center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) .assertScalar(x = assayName, type = "character", validValues = SummarizedExperiment::assayNames(sce)) .assertScalar(x = normalizedAssayName, type = "character") @@ -99,22 +101,24 @@ doNormalization <- function(sce, method, assayName, normalizedAssayName, assayOut <- MsCoreUtils::normalize_matrix(assayIn, method = method) - } else if (method == "center.median.shared") { + } else if (method %in% c("center.median.shared", "center.mean.shared", + "diff.median.shared", "diff.mean.shared")) { idx <- which(rowSums(is.na(assayIn)) == 0) if (length(idx) == 0) { stop("No features observed in all samples") } - assayOut <- sweep(assayIn, MARGIN = 2, - STATS = apply(assayIn[idx, , drop = FALSE], 2, stats::median), - FUN = "-") - } else if (method == "center.mean.shared") { - idx <- which(rowSums(is.na(assayIn)) == 0) - if (length(idx) == 0) { - stop("No features observed in all samples") + if (method == "center.median.shared") { + stats <- apply(assayIn[idx, , drop = FALSE], 2, stats::median) + } else if (method == "center.mean.shared") { + stats <- apply(assayIn[idx, , drop = FALSE], 2, mean) + } else if (method == "diff.median.shared") { + medians <- apply(assayIn[idx, , drop = FALSE], 2, stats::median) + stats <- medians - stats::median(medians) + } else if (method == "diff.mean.shared") { + means <- apply(assayIn[idx, , drop = FALSE], 2, mean) + stats <- means - mean(means) } - assayOut <- sweep(assayIn, MARGIN = 2, - STATS = apply(assayIn[idx, , drop = FALSE], 2, mean), - FUN = "-") + assayOut <- sweep(assayIn, MARGIN = 2, STATS = stats, FUN = "-") } else { ## Should never end up here as we check the validity of method above #nocov start diff --git a/R/doPCA.R b/R/doPCA.R index d93fcaae..4be2fa7c 100644 --- a/R/doPCA.R +++ b/R/doPCA.R @@ -61,8 +61,9 @@ #' @importFrom dplyr bind_rows filter arrange mutate #' @importFrom scales percent_format #' @importFrom ggplot2 ggplot aes geom_point ggtitle coord_fixed labs geom_col -#' scale_fill_manual scale_y_continuous scale_x_continuous theme coord_flip -#' geom_text element_blank element_line scale_fill_gradient2 theme_bw +#' @importFrom ggplot2 scale_fill_manual scale_y_continuous scale_x_continuous +#' @importFrom ggplot2 theme coord_flip geom_text element_blank element_line +#' @importFrom ggplot2 scale_fill_gradient2 theme_bw #' @importFrom cowplot theme_cowplot plot_grid #' @importFrom BiocSingular ExactParam #' @importFrom SummarizedExperiment rowData colData diff --git a/R/geomEncircle.R b/R/geomEncircle.R index 9aed5459..9bfd4df4 100644 --- a/R/geomEncircle.R +++ b/R/geomEncircle.R @@ -8,7 +8,7 @@ #' @importFrom scales alpha #' @importFrom grid grobTree rectGrob #' @importFrom ggplot2 draw_key_path -draw_key_hack <- function(data, params, size) { +draw_key_hack <- function(data, params, size) { # nocov start data$fill <- alpha(data$fill, data$alpha) data$alpha <- 1 @@ -16,7 +16,7 @@ draw_key_hack <- function(data, params, size) { if (!is.na(data$fill)) rectGrob(gp = gpar(col = NA, fill = data$fill)), draw_key_path(data, params) ) -} +} # nocov end #' @noRd #' @keywords internal diff --git a/R/getIntensityColumns.R b/R/getIntensityColumns.R index d4ba11b4..abd7cfaa 100644 --- a/R/getIntensityColumns.R +++ b/R/getIntensityColumns.R @@ -142,5 +142,10 @@ getIntensityColumns <- function(inFile, iColPattern, "Abundances\\.Grouped\\.Count"), iCols)] } + ## ------------------------------------------------------------------------- + ## Don't consider 'iBAQ.peptides' column + ## ------------------------------------------------------------------------- + iCols <- iCols[!grepl("^iBAQ.peptides$", iCols)] + list(iColsAll = iColsAll, iCols = iCols) } diff --git a/R/importDIANN.R b/R/importDIANN.R index b78ad860..0a430f19 100644 --- a/R/importDIANN.R +++ b/R/importDIANN.R @@ -1,3 +1,35 @@ +#' Default filters (DF) +#' +#' einprot provides default filters for data imported from various tools. +#' To see the functions and thresholds used in each of these, print the +#' corresponding object below. +#' +#' @export +#' @name defaultFiltersDF +#' @rdname defaultFiltersDF +einprotDIANNFiltersDF <- list(Filter = function(df) { + if ("Proteotypic" %in% colnames(df)) { + df <- df |> dplyr::filter(Proteotypic == 1) + } + if ("PG.MaxLFQ.Quality" %in% colnames(df)) { + df <- df |> dplyr::filter(PG.MaxLFQ.Quality >= 0.7) + } + if ("Global.PG.Q.Value" %in% colnames(df)) { + df <- df |> dplyr::filter(Global.PG.Q.Value <= 0.01) + } + if ("Protein.Q.Value" %in% colnames(df)) { + df <- df |> dplyr::filter(Protein.Q.Value <= 0.005) + } + # df <- dplyr::collect(dplyr::compute(df)) + if (all(c("Protein.Ids", "Precursor.Id") %in% colnames(df))) { + df <- df |> dplyr::group_by(Protein.Ids) |> + dplyr::mutate(N.Proteotypic.Sequences = dplyr::n_distinct(Precursor.Id)) |> + dplyr::ungroup() |> + dplyr::filter(N.Proteotypic.Sequences >= 2) + } + df +}) + #' Import data from DIA-NN into a SingleCellExperiment object #' #' Import data from a DIA-NN quantification file into a @@ -6,9 +38,11 @@ #' interpret results with caution. #' #' @param inFile Path to a tab-delimited input text file from DIA-NN; either -#' \code{pg_matrix.tsv}, \code{pr_matrix.tsv} or the main \code{report.tsv}. +#' \code{*.parquet}, \code{pg_matrix.tsv}, \code{pr_matrix.tsv} or +#' \code{report.tsv}. #' @param fileType Character scalar indicating the type of input file; either -#' \code{"pg_matrix"}, \code{"pr_matrix"} or \code{"main_report"}. +#' \code{"parquet"}, \code{"pg_matrix"}, \code{"pr_matrix"} or +#' \code{"main_report"}. #' @param outLevel Character scalar indicating the desired output level; #' either \code{"pg"} (protein group) or \code{"pr"} (precursor). #' @param includeOnlySamples,excludeSamples Character vectors defining @@ -19,7 +53,14 @@ #' @param aName Character scalar giving the name of the main assay (if #' \code{fileType} is \code{"pg_matrix"} or \code{"pr_matrix"}), or the #' column from which to get the values for the main assay (if -#' \code{fileType} is \code{"main_report"}). +#' \code{fileType} is \code{"main_report"} or \code{"parquet"}). +#' @param filtersDF Named list where each element is a filtering function +#' that takes a \code{data.frame} (or \code{tibble}) as +#' input and returns a filtered object of the same class. No other +#' arguments are allowed. The filtering functions will be applied in the +#' order they are provided in the list, after reading the long-format text +#' file or parquet file, and before creating the wide-format assay. Only +#' applies if \code{fileType} is \code{"main_report"} or \code{"parquet"}. #' @param ... Additional arguments that will be passed on to #' \code{QFeatures::readSummarizedExperiment} (e.g., the number of rows #' to import). @@ -38,21 +79,42 @@ #' aName = "MaxLFQ") #' sceL #' +#' @importFrom tibble tibble +#' @importFrom dplyr select filter inner_join collect compute all_of group_by +#' @importFrom dplyr summarize count distinct +#' @importFrom tidyr pivot_wider +#' @importFrom QFeatures readSummarizedExperiment +#' @importFrom SummarizedExperiment assayNames colnames +#' @importFrom SingleCellExperiment SingleCellExperiment +#' @importFrom S4Vectors metadata DataFrame +#' @importFrom tools file_path_sans_ext +#' @importFrom methods as +#' @importFrom utils read.delim +#' @importFrom rlang .data importDIANN <- function(inFile, fileType = "pg_matrix", outLevel = "pg", includeOnlySamples = "", excludeSamples = "", stopIfEmpty = FALSE, - aName = "MaxLFQ", ...) { + aName = "PG.MaxLFQ", filtersDF = list(), ...) { ## Check input arguments .assertScalar(x = inFile, type = "character") stopifnot(file.exists(inFile)) .assertScalar(x = fileType, type = "character", - validValues = c("pg_matrix", "pr_matrix", "main_report")) + validValues = c("pg_matrix", "pr_matrix", "main_report", + "parquet")) .assertScalar(x = outLevel, type = "character", validValues = c("pg", "pr")) .assertVector(x = includeOnlySamples, type = "character") .assertVector(x = excludeSamples, type = "character") .assertScalar(x = stopIfEmpty, type = "logical") .assertScalar(x = aName, type = "character") + .assertVector(x = filtersDF, type = "list") + if (length(filtersDF) > 0) { + .assertVector(x = names(filtersDF), type = "character") + for (f in filtersDF) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } if (fileType == "pg_matrix" && outLevel == "pr") { stop("To obtain precursor output, please provide either the ", @@ -88,26 +150,52 @@ importDIANN <- function(inFile, fileType = "pg_matrix", outLevel = "pg", sce <- methods::as(sce, "SingleCellExperiment") return(list(sce = sce, aName = aName)) - } else if (fileType == "main_report") { - tmp <- read.delim(inFile, header = TRUE, sep = "\t") - stopifnot(aName %in% colnames(tmp)) - iColsAll <- unique(tmp$Run) + } else if (fileType %in% c("main_report", "parquet")) { + if (fileType == "main_report") { + tmp <- read.delim(inFile, header = TRUE, sep = "\t") + } else { + # read data as tibble + .assertPackagesAvailable("arrow") + tmp <- arrow::read_parquet(inFile, as_data_frame = TRUE) + } + iColsAll <- tmp |> dplyr::select("Run") |> distinct() |> pull() iCols <- .getiCols(iColsAll = iColsAll, includeOnlySamples = includeOnlySamples, excludeSamples = excludeSamples, stopIfEmpty = stopIfEmpty) - tmp <- tmp[tmp$Run %in% iCols, ] + tmp <- tmp |> dplyr::filter(.data$Run %in% iCols) + stopifnot(aName %in% colnames(tmp)) + + # Filter + for (f in filtersDF) { + tmp <- f(tmp) + } + # tmp <- dplyr::collect(dplyr::compute(tmp)) if (outLevel == "pg") { - tmp <- tmp[, unique(c("Run", "Protein.Group", "Protein.Ids", - aName, - grep("PG\\.", colnames(tmp), value = TRUE)))] - tmp <- tmp %>% - dplyr::group_by(dplyr::across(c(-"Protein.Ids"))) %>% - dplyr::summarize(Protein.Ids = - paste(unique(unlist(strsplit(.data$Protein.Ids, ";"))), collapse = ";"), - .groups = "drop") - tmp <- unique(tmp) + # if Genes and/or Protein.Names columns are not present, add NA + # columns + if (!"Genes" %in% colnames(tmp)) { + tmp$Genes <- NA_character_ + } + if (!"Protein.Names" %in% colnames(tmp)) { + tmp$Protein.Names <- NA_character_ + } + tmp <- tmp |> dplyr::select(all_of(c("Run", "Protein.Group", + "Genes", "Protein.Names", + "Protein.Ids", aName, + grep("^PG\\.", colnames(tmp), value = TRUE)))) + tmp <- tmp |> + dplyr::group_by(dplyr::across(-c("Protein.Ids", "Genes", "Protein.Names"))) %>% + dplyr::summarize( + Protein.Ids = + paste(unique(unlist(strsplit(.data$Protein.Ids, ";"))), collapse = ";"), + Protein.Names = + paste(unique(unlist(strsplit(.data$Protein.Names, ";"))), collapse = ";"), + Genes = + paste(unique(unlist(strsplit(.data$Genes, ";"))), collapse = ";"), + .groups = "drop") |> + dplyr::distinct() rd <- DataFrame(Protein.Group = unique(tmp$Protein.Group)) aL <- list() for (nm in setdiff(colnames(tmp), c("Run", "Protein.Group"))) { @@ -116,7 +204,7 @@ importDIANN <- function(inFile, fileType = "pg_matrix", outLevel = "pg", dplyr::select(dplyr::all_of(c("Protein.Group", nm))) tmpcount <- tmpsub %>% dplyr::count(.data$Protein.Group) - if (all(tmpcount$n == 1)) { + if (all(tmpcount$n == 1) && length(iCols) != 1) { ## One value per protein group -> annotation tmpsub <- tmpsub %>% dplyr::distinct() @@ -137,6 +225,15 @@ importDIANN <- function(inFile, fileType = "pg_matrix", outLevel = "pg", match(iCols, colnames(tmpsub)), drop = FALSE] } } + ## Add annotation columns corresponding to specific assays + for (aNm in c("Genes", "Protein.Names", "Protein.Ids")) { + if (aNm %in% names(aL)) { + ## Aggregate across columns for each row + rd[[aNm]] <- apply(aL[[aNm]], 1, function(x) { + paste(setdiff(unique(unlist(strsplit(x, ";"))), "0"), collapse = ";") + }) + } + } sce <- SingleCellExperiment::SingleCellExperiment( assays = aL, rowData = rd, diff --git a/R/importExperiment.R b/R/importExperiment.R index 7e6a128f..544a4d38 100644 --- a/R/importExperiment.R +++ b/R/importExperiment.R @@ -70,6 +70,8 @@ "Intensity" } else if (grepl("^.PG\\.", patmatch2)) { sub("^\\.", "", patmatch2) + } else if (grepl("^.PEP\\.", patmatch2)) { + sub("^\\.", "", patmatch2) } else { "ERROR" } @@ -183,7 +185,8 @@ importExperiment <- function(inFile, iColPattern, includeOnlySamples = "", "\\.PG\\.PEP\\.\\.Run\\.Wise\\.$", "\\.PG\\.PValue\\.\\.Run\\.Wise\\.$", "\\.PG\\.IsIdentified$", - "\\.PG\\.RunEvidenceCount$") + "\\.PG\\.RunEvidenceCount$", + "\\.PEP\\.Quantity$") ## Without the escaped characters patsexp <- gsub("\\", "", pats, fixed = TRUE) diff --git a/R/importSpectronaut.R b/R/importSpectronaut.R index 92997f6c..d0317884 100644 --- a/R/importSpectronaut.R +++ b/R/importSpectronaut.R @@ -23,6 +23,13 @@ #' @param aName Character scalar giving the column from which to get the #' values for the main assay. Only used if \code{fileType} is #' \code{"long_format"}. +#' @param filtersDF Named list where each element is a filtering function +#' that takes a \code{data.frame} as +#' input and returns a filtered \code{data.frame}. No other +#' arguments are allowed. The filtering functions will be applied in the +#' order they are provided in the list, after reading the long-format text +#' file, and before creating the wide-format assay. Only +#' applies if \code{fileType} is \code{"long_format"}. #' @param ... Additional arguments that will be passed on to #' \code{QFeatures::readSummarizedExperiment} (e.g., the number of rows #' to import). @@ -37,7 +44,7 @@ importSpectronaut <- function(inFile, fileType = "pg_pivot", outLevel = "pg", iColPattern = ".PG.Quantity$", includeOnlySamples = "", excludeSamples = "", stopIfEmpty = FALSE, - aName = "PG.Quantity", ...) { + aName = "PG.Quantity", filtersDF = list(), ...) { ## Check input arguments .assertScalar(x = inFile, type = "character") stopifnot(file.exists(inFile)) @@ -54,6 +61,14 @@ importSpectronaut <- function(inFile, fileType = "pg_pivot", outLevel = "pg", if (fileType == "long_format") { .assertScalar(x = aName, type = "character") } + .assertVector(x = filtersDF, type = "list") + if (length(filtersDF) > 0) { + .assertVector(x = names(filtersDF), type = "character") + for (f in filtersDF) { + stopifnot(is(f, "function")) + stopifnot(length(formals(f)) == 1) + } + } if (fileType == "long_format") { tmp <- read.delim(inFile, header = TRUE, sep = "\t") @@ -65,6 +80,11 @@ importSpectronaut <- function(inFile, fileType = "pg_pivot", outLevel = "pg", stopIfEmpty = stopIfEmpty) tmp <- tmp[tmp$R.FileName %in% iCols, ] + # Filter + for (f in filtersDF) { + tmp <- f(tmp) + } + if (outLevel == "pg") { tmp <- tmp[, unique(c("R.FileName", "PG.ProteinGroups", "PG.ProteinNames", aName, diff --git a/R/makeAbundanceExport.R b/R/makeAbundanceExport.R index b4565404..3c3666e7 100644 --- a/R/makeAbundanceExport.R +++ b/R/makeAbundanceExport.R @@ -22,7 +22,7 @@ #' head(abExp) #' #' @importFrom dplyr select filter starts_with contains if_any full_join -#' matches everything +#' @importFrom dplyr matches everything #' makeAbundanceExport <- function(testresList, abundancePrefix) { .assertVector(x = testresList, type = "list") diff --git a/R/makeAbundanceHeatmap.R b/R/makeAbundanceHeatmap.R index 3f84d05b..fa5962c2 100644 --- a/R/makeAbundanceHeatmap.R +++ b/R/makeAbundanceHeatmap.R @@ -10,6 +10,16 @@ #' #' Generate a heatmap from a defined assay. #' +#' @details +#' The predefined \code{settings} correspond to the following extra +#' arguments to \code{\link[ComplexHeatmap]{Heatmap}}: +#' \describe{ +#' \item{report: }{\code{show_row_names = FALSE}} +#' \item{export: }{\code{show_row_names = TRUE}, \code{show_row_dend = FALSE}, +#' \code{cluster_columns = TRUE}, \code{column_split = sce$group}, add +#' annotation for the fraction of NAs (imputed values) per feature.} +#' } +#' #' @export #' @author Charlotte Soneson #' @@ -23,6 +33,10 @@ #' settings used in \code{einprot} reports and when exporting the heatmap #' to a pdf. Setting it to \code{NULL} allows any argument to be passed to #' \code{ComplexHeatmap::Heatmap} via the \code{...} argument. +#' @param clusterRows Logical scalar. For \code{settings="report"} or +#' \code{"export"}, indicates whether rows should be clustered or not. +#' Typically set to \code{FALSE} for large experiments where clustering +#' rows would be prohibitive. #' @param ... If \code{settings} is \code{NULL}, additional arguments passed to #' \code{ComplexHeatmap::Heatmap}. #' @@ -44,13 +58,14 @@ #' @importFrom circlize colorRamp2 #' makeAbundanceHeatmap <- function(sce, assayToPlot, doCenter, - settings = "report", ...) { + settings = "report", clusterRows = TRUE, ...) { .assertVector(x = sce, type = "SummarizedExperiment") .assertScalar(x = assayToPlot, type = "character", validValues = SummarizedExperiment::assayNames(sce)) .assertScalar(x = doCenter, type = "logical") .assertScalar(x = settings, type = "character", allowNULL = TRUE, validValues = c("report", "export")) + .assertScalar(x = clusterRows, type = "logical") if (!"pNA" %in% colnames(SummarizedExperiment::rowData(sce))) { SummarizedExperiment::rowData(sce)$pNA <- NA_real_ @@ -73,6 +88,7 @@ makeAbundanceHeatmap <- function(sce, assayToPlot, doCenter, mat, name = nm, show_row_names = FALSE, + cluster_rows = clusterRows, use_raster = TRUE, top_annotation = ComplexHeatmap::columnAnnotation( group = sce$group, @@ -83,6 +99,7 @@ makeAbundanceHeatmap <- function(sce, assayToPlot, doCenter, mat, name = nm, show_row_names = TRUE, show_row_dend = FALSE, + cluster_rows = clusterRows, cluster_columns = TRUE, column_split = sce$group, use_raster = TRUE, top_annotation = ComplexHeatmap::columnAnnotation( diff --git a/R/makeComplexDB.R b/R/makeComplexDB.R index 6972f1cc..3b708bda 100644 --- a/R/makeComplexDB.R +++ b/R/makeComplexDB.R @@ -225,55 +225,55 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, ## ------------------------------------------------------------------------- if (!is.null(Cyc2008Db)) { YEAST.in <- Cyc2008Db - } else { + } else { # nocov start YEAST.in <- .getCyc2008Db(dbDir = dbDir) - } + } # nocov end if (!is.null(CorumDb)) { CORUM.in <- CorumDb - } else { + } else { # nocov start CORUM.in <- .getCorumDb(dbDir = dbDir) - } + } # nocov end if (!is.null(PombaseDb)) { SCHPO.in <- PombaseDb - } else { + } else { # nocov start SCHPO.in <- .getPombaseDb(dbDir = dbDir) - } + } # nocov end if (!is.null(HuMAP2Db)) { HUMAP2.in <- HuMAP2Db - } else { + } else { # nocov start HUMAP2.in <- .getHuMAP2Db(dbDir = dbDir) - } + } # nocov end if (!is.null(CPortal9606Db)) { CPortal9606.in <- CPortal9606Db - } else { + } else { # nocov start CPortal9606.in <- .getComplexPortalDb(dbDir = dbDir, species = getSpeciesInfo(9606)$speciesCommon) - } + } # nocov end if (!is.null(CPortal10090Db)) { CPortal10090.in <- CPortal10090Db - } else { + } else { # nocov start CPortal10090.in <- .getComplexPortalDb(dbDir = dbDir, species = getSpeciesInfo(10090)$speciesCommon) - } + } # nocov end if (!is.null(CPortal6239Db)) { CPortal6239.in <- CPortal6239Db - } else { + } else { # nocov start CPortal6239.in <- .getComplexPortalDb(dbDir = dbDir, species = getSpeciesInfo(6239)$speciesCommon) - } + } # nocov end if (!is.null(CPortal284812Db)) { CPortal284812.in <- CPortal284812Db - } else { + } else { # nocov start CPortal284812.in <- .getComplexPortalDb(dbDir = dbDir, species = getSpeciesInfo(284812)$speciesCommon) - } + } # nocov end ### custom complexes source: please provide. ## (format: c("Complex.name", "Gene.names", "Species.common", "Source") @@ -305,9 +305,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, S4Vectors::mcols(YEAST.chl)$PMID <- YEAST.pmid$PubMed_id[match(names(YEAST.chl), YEAST.pmid$Complex)] - } else { + } else { # nocov start YEAST.chl <- NULL - } + } # nocov end ## CORUM if (!is.null(CORUM.in)) { @@ -339,9 +339,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, l$ComplexName))] l0 }) - } else { + } else { # nocov start CORUM.chl <- NULL - } + } # nocov end ## S. pombe if (!is.null(SCHPO.in)) { @@ -367,9 +367,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, S4Vectors::mcols(SCHPO.chl)$PMID <- SCHPO.pmid$source[match(names(SCHPO.chl), SCHPO.pmid$GO_name)] - } else { + } else { # nocov start SCHPO.chl <- NULL - } + } # nocov end ## HuMAP2 if (!is.null(HUMAP2.in)) { @@ -384,9 +384,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, Source = "HuMAP2", PMID = "" ) - } else { + } else { # nocov start HUMAP2.chl <- NULL - } + } # nocov end ## ComplexPortal if (!is.null(CPortal9606.in)) { @@ -408,9 +408,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, Source = "ComplexPortal", PMID = "" ) - } else { + } else { # nocov start CPortal9606.chl <- NULL - } + } # nocov end if (!is.null(CPortal10090.in)) { mapdf <- getUniProtToIDMapping(10090, targetId = "Gene_Name") @@ -431,9 +431,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, Source = "ComplexPortal", PMID = "" ) - } else { + } else { # nocov start CPortal10090.chl <- NULL - } + } # nocov end if (!is.null(CPortal284812.in)) { mapdf <- getUniProtToIDMapping(284812, targetId = "Gene_Name") @@ -454,9 +454,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, Source = "ComplexPortal", PMID = "" ) - } else { + } else { # nocov start CPortal284812.chl <- NULL - } + } # nocov end if (!is.null(CPortal6239.in)) { mapdf <- getUniProtToIDMapping(6239, targetId = "Gene_Name") @@ -477,9 +477,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, Source = "ComplexPortal", PMID = "" ) - } else { + } else { # nocov start CPortal6239.chl <- NULL - } + } # nocov end ## Custom if (!is.null(custom.in)) { @@ -501,9 +501,9 @@ makeComplexDB <- function(dbDir, customComplexTxt = NULL, Cyc2008Db = NULL, PMID = NA_character_ ) } - } else { + } else { # nocov start custom.chl <- NULL - } + } # nocov end ## ------------------------------------------------------------------------- ## Combine diff --git a/R/plotImputation.R b/R/plotImputation.R index b2411e69..e2de2dfc 100644 --- a/R/plotImputation.R +++ b/R/plotImputation.R @@ -28,7 +28,7 @@ #' @importFrom tidyr gather #' @importFrom dplyr left_join mutate #' @importFrom ggplot2 ggplot aes geom_histogram theme_bw facet_wrap labs -#' scale_fill_manual +#' @importFrom ggplot2 scale_fill_manual #' @importFrom rlang .data #' plotImputationDistribution <- function(sce, assayToPlot, assayImputation, diff --git a/R/plotMissingValues.R b/R/plotMissingValues.R index 12a295fe..9037e972 100644 --- a/R/plotMissingValues.R +++ b/R/plotMissingValues.R @@ -12,7 +12,10 @@ #' include rows with at least one missing (\code{TRUE}) value. #' @param settings Character scalar or \code{NULL}. Setting this to #' \code{"clustered"} creates a heatmap with rows and columns -#' clustered (used in the \code{einprot} report). +#' clustered (used in the \code{einprot} report). Setting it to +#' \code{"sorted"} sorts the rows first by the row sums across all columns, +#' then successively by the value in each column. This is typically used +#' for large matrices, where clustering rows would be prohibitive. #' Setting it to \code{NULL} allows any argument to be passed to #' \code{ComplexHeatmap::Heatmap} via the \code{...} argument. #' @param ... Additional arguments passed to \code{ComplexHeatmap::Heatmap}. @@ -47,7 +50,8 @@ plotMissingValuesHeatmap <- function(sce, assayMissing, stop("Assay contains missing values") } .assertScalar(x = onlyRowsWithMissing, type = "logical") - .assertScalar(x = settings, type = "character", validValues = "clustered", + .assertScalar(x = settings, type = "character", + validValues = c("clustered", "sorted"), allowNULL = TRUE) ## rows to plot @@ -64,6 +68,18 @@ plotMissingValuesHeatmap <- function(sce, assayMissing, column_title = "Missing value pattern (white = missing)", cluster_rows = TRUE, cluster_columns = TRUE, show_row_names = FALSE, show_heatmap_legend = FALSE) + } else if (!is.null(settings) && settings == "sorted") { + # sort by row sum, then by value in columns + col_fun <- circlize::colorRamp2(c(0, 1), c("grey50", "white")) + tmp <- SummarizedExperiment::assay(sce, assayMissing)[idx, ] + 0 + ordr <- do.call(order, c(list(rowSums(tmp, na.rm = TRUE)), + lapply(seq_len(ncol(tmp)), function(i) tmp[, i]))) + ComplexHeatmap::Heatmap( + tmp[rev(ordr), , drop = FALSE], + col = col_fun, name = "imputed", + column_title = "Missing value pattern (white = missing)", + cluster_rows = FALSE, cluster_columns = TRUE, show_row_names = FALSE, + show_heatmap_legend = FALSE) } else if (is.null(settings)) { ComplexHeatmap::Heatmap( SummarizedExperiment::assay(sce, assayMissing)[idx, ] + 0, ... @@ -83,6 +99,11 @@ plotMissingValuesHeatmap <- function(sce, assayMissing, #' @param dfNA A \code{DFrame} or \code{data.frame} with at least columns #' named \code{"name"} and \code{"pNA"} representing the sample name and #' the fraction of missing values. +#' @param valueType A \code{character} scalar indicating whether the values +#' in the \code{"pNA"} column represent fractions +#' (\code{valueType = "fraction"}, values in [0, 1]) or +#' percentages (\code{valueType = "percentage"}, values in [0, 100]). If +#' \code{NULL}, the type will be guessed from the observed values. #' #' @export #' @author Charlotte Soneson @@ -92,26 +113,45 @@ plotMissingValuesHeatmap <- function(sce, assayMissing, #' @examples #' sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds", #' package = "einprot")) -#' plotFractionDetectedPerSample(SummarizedExperiment::colData(sce)) +#' plotFractionDetectedPerSample(SummarizedExperiment::colData(sce), +#' valueType = "percentage") #' #' @importFrom ggplot2 ggplot aes theme geom_bar theme_bw labs expand_limits -#' geom_text +#' @importFrom ggplot2 geom_text #' @importFrom dplyr filter %>% #' @importFrom rlang .data #' @importFrom methods is #' -plotFractionDetectedPerSample <- function(dfNA) { +plotFractionDetectedPerSample <- function(dfNA, valueType = NULL) { if (methods::is(dfNA, "DFrame")) { dfNA <- as.data.frame(dfNA) } .assertVector(x = dfNA, type = "data.frame") stopifnot(all(c("sample", "pNA") %in% colnames(dfNA))) + .assertScalar(x = valueType, type = "character", + validValues = c("fraction", "percentage"), allowNULL = TRUE) + if (!is.null(valueType) && valueType == "fraction") { + .assertVector(x = dfNA$pNA, type = "numeric", rngIncl = c(0, 1)) + } + if (!is.null(valueType) && valueType == "percentage") { + .assertVector(x = dfNA$pNA, type = "numeric", rngIncl = c(0, 100)) + } - ## Guess whether pNA are proportions or percentages - if (all(dfNA$pNA <= 1)) { - multfact <- 100 + if (is.null(valueType)) { + ## Guess whether pNA are proportions or percentages + if (all(dfNA$pNA <= 1)) { + message("Inferred valueType: fraction") + multfact <- 100 + } else { + message("Inferred valueType: percentage") + multfact <- 1 + } } else { - multfact <- 1 + if (valueType == "percentage") { + multfact <- 1 + } else if (valueType == "fraction") { + multfact <- 100 + } } ggplot2::ggplot(dfNA, ggplot2::aes(x = .data$sample, y = 100 - multfact * .data$pNA, @@ -131,6 +171,11 @@ plotFractionDetectedPerSample <- function(dfNA) { #' @param dfNA A \code{DFrame} or \code{data.frame} with at least columns #' \code{"name"}, \code{"nNA"} and \code{"pNA"}, representing the feature #' name and the number and fraction of missing values. +#' @param valueType A \code{character} scalar indicating whether the values +#' in the \code{"pNA"} column represent fractions +#' (\code{valueType = "fraction"}, values in [0, 1]) or +#' percentages (\code{valueType = "percentage"}, values in [0, 100]). If +#' \code{NULL}, the type will be guessed from the observed values. #' #' @export #' @author Charlotte Soneson @@ -140,25 +185,44 @@ plotFractionDetectedPerSample <- function(dfNA) { #' @examples #' sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds", #' package = "einprot")) -#' plotDetectedInSamples(SummarizedExperiment::rowData(sce)) +#' plotDetectedInSamples(SummarizedExperiment::rowData(sce), +#' valueType = "percentage") #' #' @importFrom ggplot2 ggplot aes geom_bar labs #' @importFrom rlang .data #' @importFrom dplyr filter %>% group_by tally pull mutate #' @importFrom methods is #' -plotDetectedInSamples <- function(dfNA) { +plotDetectedInSamples <- function(dfNA, valueType = NULL) { if (methods::is(dfNA, "DFrame")) { dfNA <- as.data.frame(dfNA) } .assertVector(x = dfNA, type = "data.frame") stopifnot(all(c("pNA", "nNA") %in% colnames(dfNA))) + .assertScalar(x = valueType, type = "character", + validValues = c("fraction", "percentage"), allowNULL = TRUE) + if (!is.null(valueType) && valueType == "fraction") { + .assertVector(x = dfNA$pNA, type = "numeric", rngIncl = c(0, 1)) + } + if (!is.null(valueType) && valueType == "percentage") { + .assertVector(x = dfNA$pNA, type = "numeric", rngIncl = c(0, 100)) + } - ## Guess whether pNA are proportions or percentages - if (all(dfNA$pNA <= 1)) { - multfact <- 1 + if (is.null(valueType)) { + ## Guess whether pNA are proportions or percentages + if (all(dfNA$pNA <= 1)) { + message("Inferred valueType: fraction") + multfact <- 1 + } else { + message("Inferred valueType: percentage") + multfact <- 100 + } } else { - multfact <- 100 + if (valueType == "percentage") { + multfact <- 100 + } else if (valueType == "fraction") { + multfact <- 1 + } } ## Get the total number of samples totN <- dfNA %>% diff --git a/R/plotVolcano.R b/R/plotVolcano.R index 9412af14..0b10fb8a 100644 --- a/R/plotVolcano.R +++ b/R/plotVolcano.R @@ -81,13 +81,13 @@ getComplexesToPlot <- function(featureCollections, #' @noRd #' @keywords internal #' @importFrom dplyr filter select mutate left_join %>% matches -#' group_by summarize all_of +#' @importFrom dplyr group_by summarize all_of #' @importFrom tidyr gather #' @importFrom rlang .data #' @importFrom SummarizedExperiment colData #' @importFrom ggplot2 ggplot aes geom_bar position_jitterdodge geom_errorbar -#' theme_bw theme element_text labs scale_fill_manual geom_jitter -#' position_dodge facet_grid +#' @importFrom ggplot2 theme_bw theme element_text labs scale_fill_manual +#' @importFrom ggplot2 geom_jitter position_dodge facet_grid #' @importFrom stats sd #' .complexBarPlot <- function(res, prs, sce, cplx, colpat, groupmap) { @@ -114,49 +114,75 @@ getComplexesToPlot <- function(featureCollections, } else { bardata$mergegroup <- bardata$group } - ggbar <- ggplot( - bardata %>% dplyr::group_by(.data$pid, .data$mergegroup, - .data$direction) %>% - dplyr::summarize( - mean_abundance = mean(.data$Abundance, na.rm = TRUE), - sd_abundance = stats::sd(.data$Abundance, na.rm = TRUE), - .groups = "drop"), - aes(x = .data$pid, y = .data$mean_abundance, - fill = .data$mergegroup)) + - geom_bar(position = position_dodge(), stat = "identity", - colour = "black", linewidth = 0.3) + - geom_errorbar(aes(ymin = .data$mean_abundance - .data$sd_abundance, - ymax = .data$mean_abundance + .data$sd_abundance), - linewidth = 0.3, width = 0.2, - position = position_dodge(width = 0.9)) + - theme_bw() + - theme(axis.text.x = element_text(size = 12, angle = 90, - hjust = 1, vjust = 0.5), - axis.text.y = element_text(size = 12), - axis.title = element_text(size = 14), - title = element_text(size = 14)) + - labs(x = "", y = paste0("Mean +/- SD ", colpat), title = cplx) + - scale_fill_manual(name = "", values = c("steelblue", "firebrick2")) + - facet_grid(~ direction, scales = "free", space = "free") - if (length(unique(bardata$sample)) <= 6) { - ggbar <- ggbar + - geom_jitter(data = bardata, aes(y = .data$Abundance, - shape = .data$sample, - group = .data$mergegroup), size = 2, - position = position_jitterdodge(dodge.width = 0.9, - jitter.width = 0.2, - jitter.height = 0)) + if (all(is.na(bardata$Abundance))) { + return(NULL) } else { - ggbar <- ggbar + - geom_jitter(data = bardata, aes(y = .data$Abundance, - group = .data$mergegroup), size = 2, - position = position_jitterdodge(dodge.width = 0.9, - jitter.width = 0.2, - jitter.height = 0)) + ggbar <- ggplot( + bardata %>% dplyr::group_by(.data$pid, .data$mergegroup, + .data$direction) %>% + dplyr::summarize( + mean_abundance = mean(.data$Abundance, na.rm = TRUE), + sd_abundance = stats::sd(.data$Abundance, na.rm = TRUE), + .groups = "drop"), + aes(x = .data$pid, y = .data$mean_abundance, + fill = .data$mergegroup)) + + geom_bar(position = position_dodge(), stat = "identity", + colour = "black", linewidth = 0.3) + + geom_errorbar(aes(ymin = .data$mean_abundance - .data$sd_abundance, + ymax = .data$mean_abundance + .data$sd_abundance), + linewidth = 0.3, width = 0.2, + position = position_dodge(width = 0.9)) + + theme_bw() + + theme(axis.text.x = element_text(size = 12, angle = 90, + hjust = 1, vjust = 0.5), + axis.text.y = element_text(size = 12), + axis.title = element_text(size = 14), + title = element_text(size = 14)) + + labs(x = "", y = paste0("Mean +/- SD ", colpat), title = cplx) + + scale_fill_manual(name = "", values = c("steelblue", "firebrick2")) + + facet_grid(~ direction, scales = "free", space = "free") + if (length(unique(bardata$sample)) <= 6) { + ggbar <- ggbar + + geom_jitter(data = bardata, aes(y = .data$Abundance, + shape = .data$sample, + group = .data$mergegroup), size = 2, + position = position_jitterdodge(dodge.width = 0.9, + jitter.width = 0.2, + jitter.height = 0)) + } else { + ggbar <- ggbar + + geom_jitter(data = bardata, aes(y = .data$Abundance, + group = .data$mergegroup), size = 2, + position = position_jitterdodge(dodge.width = 0.9, + jitter.width = 0.2, + jitter.height = 0)) + } + return(ggbar) } - ggbar } +#' @author Charlotte Soneson +#' @noRd +#' @keywords internal +#' @importFrom ggplot2 ggplot aes geom_histogram theme_bw labs +#' +.makePvalueHistogram <- function(res, xv = "P.Value", xlab = "PValue", + title = "", nbins = 20) { + .assertVector(x = res, type = "data.frame") + .assertScalar(x = xv, type = "character", validValues = colnames(res)) + .assertScalar(x = nbins, type = "numeric") + .assertVector(x = res[[xv]][!is.na(res[[xv]])], type = "numeric", + rngIncl = c(0, 1)) + + ggplot2::ggplot(res, ggplot2::aes(x = .data[[xv]])) + + ggplot2::geom_histogram(fill = "lightgrey", color = "grey", + binwidth = 1 / nbins, boundary = 0, + closed = "left") + + ggplot2::theme_bw() + + ggplot2::labs(x = xlab, title = title) +} + + #' @author Charlotte Soneson #' @noRd #' @keywords internal @@ -164,8 +190,8 @@ getComplexesToPlot <- function(featureCollections, #' @importFrom forcats fct_reorder #' @importFrom rlang .data #' @importFrom ggplot2 ggplot aes geom_col coord_flip geom_text theme_minimal -#' theme element_blank ggtitle element_line scale_y_continuous -#' scale_fill_gradient2 +#' @importFrom ggplot2 theme element_blank ggtitle element_line scale_y_continuous +#' @importFrom ggplot2 scale_fill_gradient2 #' @importFrom scales muted #' .makeWaterfallPlot <- function(res, ntop, xv = "logFC", @@ -237,7 +263,7 @@ getComplexesToPlot <- function(featureCollections, #' @noRd #' @keywords internal #' @importFrom ggplot2 ggplot aes theme_bw theme annotate labs coord_cartesian -#' element_text geom_line +#' @importFrom ggplot2 element_text geom_line #' @importFrom rlang .data #' .makeBaseVolcano <- function(res, testType, xv, yv, plotnote, plottitle, @@ -290,6 +316,7 @@ getComplexesToPlot <- function(featureCollections, xvma <- "AveExpr" apv <- "adj.P.Val" tv <- NULL + pv <- "P.Value" volcind <- "showInVolcano" } else if (testType == "ttest") { xv <- "logFC" @@ -297,6 +324,7 @@ getComplexesToPlot <- function(featureCollections, xvma <- NULL apv <- "adj.P.Val" tv <- "sam" + pv <- "P.Value" volcind <- "showInVolcano" } else if (testType == "proDA") { xv <- "logFC" @@ -304,6 +332,7 @@ getComplexesToPlot <- function(featureCollections, xvma <- NULL apv <- "adj.P.Val" tv <- NULL + pv <- "P.Value" volcind <- "showInVolcano" } else if (testType == "welch") { ## PTM test (limma/welch) @@ -312,9 +341,11 @@ getComplexesToPlot <- function(featureCollections, xvma <- NULL apv <- "adj.P.Val" tv <- NULL + pv <- "P.Value" volcind <- "showInVolcano" } - list(xv = xv, yv = yv, xvma = xvma, apv = apv, volcind = volcind, tv = tv) + list(xv = xv, yv = yv, xvma = xvma, apv = apv, volcind = volcind, tv = tv, + pv = pv) } #' Make volcano plots @@ -339,6 +370,9 @@ getComplexesToPlot <- function(featureCollections, #' column of \code{res} should be used as the x-axis for an MA plot. The #' y-axis column will be \code{xv}. If \code{NULL}, no MA plot is #' generated. +#' @param pv If not \code{NULL}, a character scalar indicating which column +#' of \code{res} should be used to create p-value histograms. If +#' \code{NULL}, will be determined based on \code{testType}. #' @param volcind Character scalar indicating which column in \code{res} that #' represents the "significance" column. This should be a logical #' column; rows with a value equal to \code{TRUE} will be colored @@ -425,7 +459,7 @@ getComplexesToPlot <- function(featureCollections, #' @author Charlotte Soneson #' @export #' @importFrom ggplot2 geom_point aes labs geom_hline theme_bw coord_cartesian -#' theme element_text +#' @importFrom ggplot2 theme element_text #' @importFrom ggrepel geom_text_repel #' @importFrom ggiraph geom_point_interactive opts_hover girafe_options #' @importFrom dplyr filter arrange between row_number desc @@ -434,7 +468,7 @@ getComplexesToPlot <- function(featureCollections, #' @importFrom grDevices pdf dev.off #' plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, - volcind = NULL, plotnote = "", plottitle = "", + pv = NULL, volcind = NULL, plotnote = "", plottitle = "", plotsubtitle = "", volcanoFeaturesToLabel = c(""), volcanoMaxFeatures = 25, volcanoLabelSign = "both", baseFileName = NULL, @@ -483,11 +517,15 @@ plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, if (!is.null(volcind)) { cols$volcind <- volcind } + if (!is.null(pv)) { + cols$pv <- pv + } .assertScalar(x = cols$xv, type = "character", validValues = colnames(res)) .assertScalar(x = cols$yv, type = "character", validValues = colnames(res)) .assertScalar(x = cols$xvma, type = "character", allowNULL = TRUE, validValues = colnames(res)) + .assertScalar(x = cols$pv, type = "character", validValues = colnames(res)) .assertScalar(x = cols$volcind, type = "character", validValues = colnames(res)) .assertScalar(x = plotnote, type = "character") @@ -719,6 +757,12 @@ plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, ggwf <- NULL } + ## ------------------------------------------------------------------------- + ## p-value histogram + ## ------------------------------------------------------------------------- + ggp <- .makePvalueHistogram(res = res, xv = cols$pv, xlab = "PValue", + title = plottitle, nbins = 20) + ## ------------------------------------------------------------------------- ## Bar plot of significant features ## ------------------------------------------------------------------------- @@ -750,7 +794,7 @@ plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, ## Need to redo the filtering of res here - can't use labeldfVolcano ## since we don't want to include non-significant proteins (including ## those that are manually labeled). - if (!is.null(stringDb) && "IDsForSTRING" %in% colnames(res)) { + if (!is.null(stringDb) && "IDsForSTRING" %in% colnames(res)) { #nocov start res0 <- res %>% dplyr::filter(.data[[cols$volcind]] & .data$allowedSign) %>% dplyr::arrange(dplyr::desc(abs(.data[[cols$xv]]) + @@ -769,7 +813,7 @@ plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, res0 %>% dplyr::filter(.data[[cols$xv]] < 0) %>% dplyr::pull("STRING_id")) } - } + } #nocov end if (!is.null(ggbar)) { for (ggb in ggbar) { @@ -779,6 +823,7 @@ plotVolcano <- function(sce, res, testType, xv = NULL, yv = NULL, xvma = NULL, if (!is.null(ggwf)) { print(ggwf) } + print(ggp) grDevices::dev.off() } diff --git a/R/prepareFinalSCE.R b/R/prepareFinalSCE.R index 5fcd4ef4..767da137 100644 --- a/R/prepareFinalSCE.R +++ b/R/prepareFinalSCE.R @@ -23,7 +23,7 @@ #' @importFrom tibble rownames_to_column #' @importFrom dplyr filter #' @importFrom iSEEu registerLogFCFields registerAveAbFields -#' registerPValueFields registerFeatureSetCollections +#' @importFrom iSEEu registerPValueFields registerFeatureSetCollections #' @importFrom utils write.table #' @importFrom SingleCellExperiment SingleCellExperiment #' @@ -33,7 +33,7 @@ prepareFinalSCE <- function(sce, baseFileName, featureCollections, expType) { .assertVector(x = featureCollections, type = "list", allowNULL = TRUE) .assertScalar(x = expType, type = "character", validValues = c("MaxQuant", "ProteomeDiscoverer", - "FragPipe", "DIANN", "Spectronaut")) + "FragPipe", "DIANN", "Spectronaut", "SE")) if (expType == "MaxQuant") { ## If not already there, also include log-transformed iBAQ values @@ -73,6 +73,8 @@ prepareFinalSCE <- function(sce, baseFileName, featureCollections, expType) { colsToRemove <- c() } else if (expType == "Spectronaut") { colsToRemove <- c() + } else if (expType == "SE") { + colsToRemove <- c() } ## Write removed columns to text file @@ -94,8 +96,10 @@ prepareFinalSCE <- function(sce, baseFileName, featureCollections, expType) { sce, setdiff( grep("logFC$", colnames(SummarizedExperiment::rowData(sce)), value = TRUE), - grep("se\\.logFC$", colnames(SummarizedExperiment::rowData(sce)), - value = TRUE)) + # don't just grep for se.logFC, as the group name could end with se + sub("P\\.Value$", "se.logFC", + grep("P\\.Value$", colnames(SummarizedExperiment::rowData(sce)), + value = TRUE))) ) sce <- iSEEu::registerAveAbFields( sce, grep("AveExpr$", colnames(SummarizedExperiment::rowData(sce)), diff --git a/R/readFragPipeInfo.R b/R/readFragPipeInfo.R index 6c1fdf81..472d29e9 100755 --- a/R/readFragPipeInfo.R +++ b/R/readFragPipeInfo.R @@ -224,6 +224,16 @@ readFragPipeInfo <- function(fragpipeDir) { # fpContaminants <- NULL } + ## ------------------------------------------------------------------------- + ## MSBooster + ## ------------------------------------------------------------------------- + if (!is.null(dataDf)) { + fpBooster <- dataDf$value[which(dataDf$parameter == + "msbooster.run-msbooster")] + } else { + fpBooster <- NULL + } + ## ------------------------------------------------------------------------- ## Masses ## ------------------------------------------------------------------------- @@ -362,6 +372,7 @@ readFragPipeInfo <- function(fragpipeDir) { "Enzymes" = fpEnzymes, "Variable modifications" = fpVariableModifications, "Fixed modifications" = fpFixedModifications, - "Database decoy tag" = fpDecoyTag) + "Database decoy tag" = fpDecoyTag, + "MSBooster" = fpBooster) l[vapply(l, length, 0) > 0] } diff --git a/R/runDIANNAnalysis.R b/R/runDIANNAnalysis.R index f4d2219e..2af94c84 100644 --- a/R/runDIANNAnalysis.R +++ b/R/runDIANNAnalysis.R @@ -7,26 +7,28 @@ #' @inheritParams runMaxQuantAnalysis #' #' @param diannFile Character string pointing to the DIA-NN -#' \code{pg_matrix.tsv}, \code{pr_matrix.tsv} or main \code{report.tsv} -#' file. File paths will be expressed in canonical form (using -#' \code{normalizePath()}) before they are processed. +#' \code{pg_matrix.tsv}, \code{pr_matrix.tsv}, main \code{report.tsv} or +#' \code{*.parquet} file. File paths will be expressed in canonical form +#' (using \code{normalizePath()}) before they are processed. #' @param diannFileType Character string indicating what type of input file #' \code{diannFile} represents. Either \code{"pg_matrix"}, -#' \code{"pr_matrix"} or \code{"main_report"}. +#' \code{"pr_matrix"}, \code{"main_report"} or \code{"parquet"}. #' @param outLevel Character string indicating the desired output level. #' Either \code{"pg"} or \code{"pr"}. +#' @param filtersDF Named list where each element is a filtering function +#' that takes a \code{data.frame} (or \code{tibble}) as +#' input and returns a filtered object of the same class. No other +#' arguments are allowed. The filtering functions will be applied in the +#' order they are provided in the list, after reading the long-format text +#' file or parquet file, and before creating the wide-format assay. Only +#' applies if \code{diannFileType} is \code{"main_report"} or \code{"parquet"}. #' @param diannLogFile Character string pointing to the DIA-NN log file. #' File paths will be expressed in canonical form (using #' \code{normalizePath()}) before they are processed. #' @param aName Character scalar indicating the desired name of the main #' assay (if \code{diannFileType} is \code{"pg_matrix"} or #' \code{"pr_matrix"}), or the column to use for the main assay (if -#' \code{diannFileType} is \code{"main_report"}). -#' @param minScore Numeric, minimum score for a protein to be retained in the -#' analysis. Set to \code{NULL} if no score filtering is desired. -#' @param minPeptides Numeric, minimum number of peptides for a protein to be -#' retained in the analysis. Set to \code{NULL} if no filtering on the -#' number of peptides is desired. +#' \code{diannFileType} is \code{"main_report"} or \code{"parquet"}). #' #' @export #' @author Charlotte Soneson @@ -97,11 +99,11 @@ #' @importFrom cowplot plot_grid theme_cowplot #' @importFrom htmltools tagList #' @importFrom dplyr %>% select starts_with full_join filter matches everything -#' mutate +#' @importFrom dplyr mutate #' @importFrom knitr current_input #' @importFrom ComplexUpset upset #' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom tibble rownames_to_column #' @importFrom S4Vectors metadata #' @importFrom scater runPCA @@ -128,10 +130,9 @@ runDIANNAnalysis <- function( "Majority.protein.IDs"), combineWhen = "missing", makeUnique = FALSE), - extraFeatureCols = NULL, - sampleAnnot, - includeOnlySamples = "", excludeSamples = "", - minScore = 10, minPeptides = 2, imputeMethod = "MinProb", + extraFeatureCols = NULL, sampleAnnot, + includeOnlySamples = "", excludeSamples = "", imputeMethod = "MinProb", + imputeArgs = list(), filtersDF = einprotDIANNFiltersDF, filtersSE = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, @@ -180,8 +181,8 @@ runDIANNAnalysis <- function( proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, extraFeatureCols = extraFeatureCols, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, filtersDF = filtersDF, filtersSE = filtersSE, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, @@ -217,7 +218,9 @@ runDIANNAnalysis <- function( ## Normalize paths ## ------------------------------------------------------------------------- diannFile <- normalizePath(diannFile) - diannLogFile <- normalizePath(diannLogFile) + if (!is.null(diannLogFile)) { + diannLogFile <- normalizePath(diannLogFile) + } ## ------------------------------------------------------------------------- ## Copy Rmd template and insert arguments @@ -235,9 +238,9 @@ runDIANNAnalysis <- function( reportTitle = reportTitle, reportAuthor = reportAuthor, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, filtersDF = filtersDF, + filtersSE = filtersSE, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, diff --git a/R/runFragPipeAnalysis.R b/R/runFragPipeAnalysis.R index ffca915f..07676432 100755 --- a/R/runFragPipeAnalysis.R +++ b/R/runFragPipeAnalysis.R @@ -12,11 +12,6 @@ #' @param iColPattern Regular expression identifying the columns of the FragPipe #' \code{combined_protein.tsv} file to use for the analysis. Typically #' \code{"\\.MaxLFQ\\.Intensity$"}. -#' @param minScore Numeric, minimum score for a protein to be retained in the -#' analysis. Set to \code{NULL} if no score filtering is desired. -#' @param minPeptides Numeric, minimum number of peptides for a protein to be -#' retained in the analysis. Set to \code{NULL} if no filtering on the -#' number of peptides is desired. #' #' @export #' @author Charlotte Soneson @@ -50,11 +45,11 @@ #' @importFrom cowplot plot_grid theme_cowplot #' @importFrom htmltools tagList #' @importFrom dplyr %>% select starts_with full_join filter matches everything -#' mutate +#' @importFrom dplyr mutate #' @importFrom knitr current_input #' @importFrom ComplexUpset upset #' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom tibble rownames_to_column #' @importFrom S4Vectors metadata #' @importFrom scater runPCA @@ -79,10 +74,9 @@ runFragPipeAnalysis <- function( "Protein.ID"), combineWhen = "missing", makeUnique = FALSE), - extraFeatureCols = NULL, - iColPattern, sampleAnnot, - includeOnlySamples = "", excludeSamples = "", - minScore = 10, minPeptides = 2, imputeMethod = "MinProb", + extraFeatureCols = NULL, filtersSE = einprotFragPipeFilters, + iColPattern, sampleAnnot, includeOnlySamples = "", excludeSamples = "", + imputeMethod = "MinProb", imputeArgs = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, @@ -128,11 +122,10 @@ runFragPipeAnalysis <- function( fragpipeDir = fragpipeDir, idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, extraFeatureCols = extraFeatureCols, - iColPattern = iColPattern, + filtersSE = filtersSE, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, @@ -182,11 +175,10 @@ runFragPipeAnalysis <- function( reportTitle = reportTitle, reportAuthor = reportAuthor, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, - addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, - mergeGroups = mergeGroups, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, + filtersSE = filtersSE, addAbundanceValues = addAbundanceValues, + addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, allPairwiseComparisons = allPairwiseComparisons, singleFit = singleFit, diff --git a/R/runMaxQuantAnalysis.R b/R/runMaxQuantAnalysis.R index 9546b24e..f90744e4 100644 --- a/R/runMaxQuantAnalysis.R +++ b/R/runMaxQuantAnalysis.R @@ -65,15 +65,19 @@ #' input file, after removing the \code{iColPattern}. #' @param includeOnlySamples,excludeSamples Character vectors defining specific #' samples to include or exclude from all analyses. -#' @param minScore Numeric, minimum score for a protein to be retained in the -#' analysis. Set to \code{NULL} if no score filtering is desired. -#' @param minPeptides Numeric, minimum number of peptides for a protein to be -#' retained in the analysis. Set to \code{NULL} if no filtering on the -#' number of peptides is desired. +#' @param filtersSE A named \code{list}, where each element is a function +#' that takes a \code{SummarizedExperiment} object as input and returns +#' a logical vector of the same length as the number of rows in \code{sce}, +#' and where \code{TRUE} implies that the row should be retained. Default +#' sets of filtering functions for input data from different tools are +#' provided (see \code{?defaultFiltersSE}). #' @param imputeMethod Character string defining the imputation method to use. -#' Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -#' \code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -#' more details about the methods. +#' Currently, \code{"impSeqRob"}, \code{"MinProb"}, +#' \code{"MinProbGlobal"}, \code{"MinProbOffset"} and +#' \code{"MinProbGlobalOffset"} are supported. +#' See \code{\link{doImputation}} for more details about the methods. +#' @param imputeArgs List with additional arguments to the imputation method. +#' Will be passed to \link{doImputation}. #' @param assaysForExport Character vector defining the name(s) of the assays #' to use for exported abundances and barplots. This could, for example, #' be set to an assay containing 'absolute' abundances, if available, even @@ -113,8 +117,12 @@ #' average value across all samples in the \code{baselineGroup} from the #' same batch as the original sample. #' @param normMethod Character scalar indicating the normalization method to -#' use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -#' or \code{"none"} are valid values. +#' use. Currently, \code{"center.mean"}, \code{"center.median"}, +#' \code{"diff.median"}, \code{"center.mean.shared"}, +#' \code{"center.median.shared"}, \code{"diff.mean.shared"}, +#' \code{"diff.median.shared"} (applied on the log-transformed values), +#' \code{"vsn"} (applied on the natural-scale values), +#' and \code{"none"}, are valid values. #' @param spikeFeatures Character vector indicating the 'spike-in' features #' to use for estimation of normalization factors. If \code{NULL} #' (default), all features are used. @@ -236,11 +244,11 @@ #' @importFrom cowplot plot_grid theme_cowplot #' @importFrom htmltools tagList #' @importFrom dplyr %>% select starts_with full_join filter matches everything -#' mutate +#' @importFrom dplyr mutate #' @importFrom knitr current_input #' @importFrom ComplexUpset upset #' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom tibble rownames_to_column #' @importFrom S4Vectors metadata #' @importFrom scater runPCA @@ -266,11 +274,10 @@ runMaxQuantAnalysis <- function( "Majority.protein.IDs"), combineWhen = "missing", makeUnique = FALSE), - extraFeatureCols = NULL, + extraFeatureCols = NULL, filtersSE = einprotMQFilters, iColPattern, sampleAnnot, - includeOnlySamples = "", excludeSamples = "", - minScore = 10, minPeptides = 2, imputeMethod = "MinProb", - assaysForExport = c("iBAQ", "Top3"), + includeOnlySamples = "", excludeSamples = "", imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = c("iBAQ", "Top3"), addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, @@ -316,12 +323,11 @@ runMaxQuantAnalysis <- function( mqFile = mqFile, mqParameterFile = mqParameterFile, idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, - extraFeatureCols = extraFeatureCols, + extraFeatureCols = extraFeatureCols, filtersSE = filtersSE, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, @@ -369,13 +375,12 @@ runMaxQuantAnalysis <- function( mqFile = mqFile, mqParameterFile = mqParameterFile, idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, - extraFeatureCols = extraFeatureCols, + extraFeatureCols = extraFeatureCols, filtersSE = filtersSE, reportTitle = reportTitle, reportAuthor = reportAuthor, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, diff --git a/R/runPDTMTAnalysis.R b/R/runPDTMTAnalysis.R index 84263827..ee98f45b 100644 --- a/R/runPDTMTAnalysis.R +++ b/R/runPDTMTAnalysis.R @@ -37,17 +37,6 @@ #' \code{inputLevel} is "PeptideGroups". #' @param iColPattern Regular expression identifying the columns of the PD #' \code{Proteins.txt} file to use for the analysis. -#' @param minScore,minDeltaScore Numeric, minimum score for a protein (or -#' delta score for a peptide group) to be retained in the analysis. -#' Set to \code{NULL} if no score filtering is desired. -#' @param minPeptides,minPSMs Numeric, minimum number of peptides for a protein -#' (or PSMs for a peptide group) to be retained in the analysis. -#' Set to \code{NULL} if no filtering on the number of peptides/PTMs is -#' desired. -#' @param masterProteinsOnly Logical scalar indicating whether only master -#' proteins (where the \code{Master} column value is -#' \code{IsMasterProtein}) should be retained. Only used if -#' \code{inputLevel} is \code{"Proteins"}. #' #' @export #' @author Charlotte Soneson @@ -93,11 +82,11 @@ #' @importFrom cowplot plot_grid theme_cowplot #' @importFrom htmltools tagList #' @importFrom dplyr %>% select starts_with full_join filter matches everything -#' mutate relocate last_col +#' @importFrom dplyr mutate relocate last_col #' @importFrom knitr current_input #' @importFrom ComplexUpset upset #' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom tibble rownames_to_column #' @importFrom S4Vectors metadata #' @importFrom scater runPCA @@ -125,11 +114,11 @@ runPDTMTAnalysis <- function( combineWhen = "missing", makeUnique = FALSE), extraFeatureCols = NULL, + filtersSE = if (inputLevel == "Proteins") einprotPDTMTProteinFilters else einprotPDTMTPeptideGroupFilters, modificationsCol = "Modifications", excludeUnmodifiedPeptides = FALSE, keepModifications = NULL, iColPattern, sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 2, minDeltaScore = 0.2, minPeptides = 2, minPSMs = 2, - masterProteinsOnly = FALSE, imputeMethod = "MinProb", + imputeMethod = "MinProb", imputeArgs = imputeArgs, assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, @@ -178,16 +167,13 @@ runPDTMTAnalysis <- function( pdAnalysisFile = pdAnalysisFile, idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, extraFeatureCols = extraFeatureCols, - modificationsCol = modificationsCol, + filtersSE = filtersSE, modificationsCol = modificationsCol, excludeUnmodifiedPeptides = excludeUnmodifiedPeptides, keepModifications = keepModifications, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, - minScore = minScore, minDeltaScore = minDeltaScore, - minPeptides = minPeptides, minPSMs = minPSMs, - masterProteinsOnly = masterProteinsOnly, - imputeMethod = imputeMethod, assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, allPairwiseComparisons = allPairwiseComparisons, @@ -237,17 +223,14 @@ runPDTMTAnalysis <- function( idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, extraFeatureCols = extraFeatureCols, - modificationsCol = modificationsCol, + filtersSE = filtersSE, modificationsCol = modificationsCol, excludeUnmodifiedPeptides = excludeUnmodifiedPeptides, keepModifications = keepModifications, reportTitle = reportTitle, reportAuthor = reportAuthor, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, - minScore = minScore, minDeltaScore = minDeltaScore, - minPeptides = minPeptides, minPSMs = minPSMs, - masterProteinsOnly = masterProteinsOnly, - imputeMethod = imputeMethod, assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, diff --git a/R/runPDTMTptmAnalysis.R b/R/runPDTMTptmAnalysis.R index b18b2872..8f9590e6 100644 --- a/R/runPDTMTptmAnalysis.R +++ b/R/runPDTMTptmAnalysis.R @@ -121,7 +121,7 @@ #' @importFrom ComplexUpset upset #' @importFrom tibble rownames_to_column #' @importFrom ggplot2 ggplot aes geom_abline theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom ggrepel geom_text_repel #' runPDTMTptmAnalysis <- function( diff --git a/R/runSEAnalysis.R b/R/runSEAnalysis.R new file mode 100644 index 00000000..96d29f0f --- /dev/null +++ b/R/runSEAnalysis.R @@ -0,0 +1,299 @@ +#' Run analysis on pre-imported data +#' +#' Launch an analysis workflow on data stored in a +#' \code{\link[SummarizedExperiment]{SummarizedExperiment}} object, generated +#' from arbitrary source data. +#' +#' @inheritParams runMaxQuantAnalysis +#' +#' @param inFile Character string pointing to an \code{.rds} file containing +#' a serialized \code{\link[SummarizedExperiment]{SummarizedExperiment}} +#' object (or a derivative, such as +#' \code{\link[SingleCellExperiment]{SingleCellExperiment}}, with features +#' (e.g. proteins) in rows and samples in columns. The object +#' must have at least one assay (\code{aName}), containing raw intensity +#' values or equivalent (these will be automatically log-transformed by +#' einprot). +#' @param summaryInfo Named list with information about the identification +#' and quantification workflow. This information will be displayed in +#' table format in the report, under the 'Analysis summary' header. einprot +#' provides functions to generate such lists for common processing tools, +#' such as \code{\link{readMaxQuantXML}}, \code{\link{readFragPipeInfo}}, +#' \code{\link{readProteomeDiscovererInfo}} and \code{\link{readDIANNInfo}}. +#' @param aName Character scalar providing the name of the assay of the +#' \code{SummarizedExperiment} object in \code{inputFile} that should be +#' used as the main assay for the analysis. +#' The assay should contain values on the "raw intensity scale" (i.e., +#' they will be log-transformed as part of the analysis workflow). Missing +#' values should be represented by either zeros or NA values. +#' +#' @export +#' @author Charlotte Soneson +#' +#' @returns Invisibly, the path to the compiled html report. +#' +#' @examples +#' if (interactive()) { +#' sampleAnnot <- read.delim( +#' system.file("extdata/mq_example/1356_sampleAnnot.txt", +#' package = "einprot")) +#' se <- importExperiment( +#' system.file("extdata/mq_example/1356_proteinGroups.txt", +#' package = "einprot"), +#' iColPattern = "^LFQ.intensity.")$sce +#' se <- addSampleAnnots(se, sampleAnnot) +#' tmpf <- tempfile(fileext = ".rds") +#' saveRDS(se, file = tmpf) +#' settings <- readMaxQuantXML( +#' system.file("extdata/mq_example/1356_mqpar.xml", +#' package = "einprot")) +#' +#' ## Basic analysis +#' out <- runSEAnalysis( +#' outputDir = tempdir(), +#' outputBaseName = "MQ_LFQ_basic", +#' species = "mouse", +#' inFile = tmpf, +#' summaryInfo = settings, +#' aName = "LFQ.intensity", +#' idCol = function(df) getFirstId(df, "Majority.protein.IDs", ";"), +#' labelCol = function(df) getFirstId(df, "Majority.protein.IDs", ";"), +#' filtersSE = list() +#' ) +#' ## Output file +#' out +#' } +#' +#' @importFrom xfun Rscript_call +#' @importFrom rmarkdown render +#' @importFrom readr read_file write_file +#' @import STRINGdb +#' @importFrom SummarizedExperiment rowData colData assay assayNames +#' @importFrom DT datatable +#' @importFrom limma removeBatchEffect +#' @importFrom ExploreModelMatrix VisualizeDesign +#' @importFrom cowplot plot_grid theme_cowplot +#' @importFrom htmltools tagList +#' @importFrom dplyr %>% select starts_with full_join filter matches everything +#' @importFrom dplyr mutate +#' @importFrom knitr current_input +#' @importFrom ComplexUpset upset +#' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme +#' @importFrom ggplot2 element_text geom_point ggtitle +#' @importFrom tibble rownames_to_column +#' @importFrom S4Vectors metadata +#' @importFrom scater runPCA +#' @importFrom SingleCellExperiment reducedDim +#' @importFrom BiocSingular ExactParam +#' @importFrom plotly ggplotly +#' @importFrom ComplexHeatmap Heatmap columnAnnotation draw +#' +runSEAnalysis <- function( + templateRmd = system.file("extdata/process_basic_template.Rmd", + package = "einprot"), + outputDir = ".", outputBaseName = "SEAnalysis", + reportTitle = "Pregenerated data processing", reportAuthor = "", + forceOverwrite = FALSE, + experimentInfo = list(), species, + inFile, summaryInfo = NULL, aName, + idCol, labelCol = idCol, geneIdCol = NULL, proteinIdCol = NULL, stringIdCol = NULL, + extraFeatureCols = NULL, filtersSE = list(), imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = c("iBAQ", "Top3"), + addAbundanceValues = TRUE, addHeatmaps = TRUE, + mergeGroups = list(), comparisons = list(), + ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, + subtractBaseline = FALSE, baselineGroup = "", normMethod = "none", + spikeFeatures = NULL, stattest = "limma", minNbrValidValues = 2, + minlFC = 0, samSignificance = TRUE, nperm = 250, volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, volcanoMaxFeatures = 25, volcanoLabelSign = "both", + volcanoS0 = 0.1, volcanoFeaturesToLabel = "", + addInteractiveVolcanos = FALSE, interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, maxComplexSimilarity = 1, seed = 42, + includeFeatureCollections = c(), minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", complexDbPath = NULL, stringVersion = "11.5", + stringDir = NULL, linkTableColumns = c(), customYml = NULL, doRender = TRUE +) { + ## ------------------------------------------------------------------------- + ## Fix ctrlGroup/mergeGroups + ## ------------------------------------------------------------------------- + ## For backward compatibility: If mergeGroups is list(), and ctrlGroup + ## is a vector (the way things were specified before v0.3.2), add the + ## merged ctrl group to mergeGroups. Raise an error if mergeGroups is + ## not empty and ctrlGroup is a vector. + if (length(mergeGroups) > 0 && length(ctrlGroup) > 1) { + stop("If 'mergeGroups' is specified, 'ctrlGroup' should not ", + "be a vector.") + } + if (length(mergeGroups) == 0 && length(ctrlGroup) > 1) { + mergeGroups <- list() + newCtrlName <- paste(ctrlGroup, collapse = ".") + mergeGroups[[newCtrlName]] <- ctrlGroup + ctrlGroup <- newCtrlName + } + + ## ------------------------------------------------------------------------- + ## Check arguments + ## ------------------------------------------------------------------------- + .checkArgumentsSE( + templateRmd = templateRmd, outputDir = outputDir, + outputBaseName = outputBaseName, reportTitle = reportTitle, + reportAuthor = reportAuthor, forceOverwrite = forceOverwrite, + experimentInfo = experimentInfo, species = species, + inFile = inFile, summaryInfo = summaryInfo, aName = aName, + idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, + proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, + extraFeatureCols = extraFeatureCols, filtersSE = filtersSE, + imputeMethod = imputeMethod, imputeArgs = imputeArgs, + assaysForExport = assaysForExport, + addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, + mergeGroups = mergeGroups, + comparisons = comparisons, ctrlGroup = ctrlGroup, + allPairwiseComparisons = allPairwiseComparisons, singleFit = singleFit, + subtractBaseline = subtractBaseline, baselineGroup = baselineGroup, + normMethod = normMethod, spikeFeatures = spikeFeatures, + stattest = stattest, minNbrValidValues = minNbrValidValues, + minlFC = minlFC, samSignificance = samSignificance, + nperm = nperm, volcanoAdjPvalThr = volcanoAdjPvalThr, + volcanoLog2FCThr = volcanoLog2FCThr, + volcanoMaxFeatures = volcanoMaxFeatures, + volcanoLabelSign = volcanoLabelSign, + volcanoS0 = volcanoS0, volcanoFeaturesToLabel = volcanoFeaturesToLabel, + addInteractiveVolcanos = addInteractiveVolcanos, + interactiveDisplayColumns = interactiveDisplayColumns, + interactiveGroupColumn = interactiveGroupColumn, + complexFDRThr = complexFDRThr, + maxNbrComplexesToPlot = maxNbrComplexesToPlot, + maxComplexSimilarity = maxComplexSimilarity, seed = seed, + includeFeatureCollections = includeFeatureCollections, + minSizeToKeepSet = minSizeToKeepSet, + customComplexes = customComplexes, complexSpecies = complexSpecies, + complexDbPath = complexDbPath, stringVersion = stringVersion, + stringDir = stringDir, linkTableColumns = linkTableColumns, + customYml = customYml, doRender = doRender) + + ## If pandoc is not available, don't run it (just generate .md file) + ## Gives a warning if pandoc and/or pandoc-citeproc is not available + pandocOK <- .checkPandoc(ignorePandoc = TRUE) + + ## ------------------------------------------------------------------------- + ## Normalize paths + ## ------------------------------------------------------------------------- + inFile <- normalizePath(inFile) + + ## ------------------------------------------------------------------------- + ## Copy Rmd template and insert arguments + ## ------------------------------------------------------------------------- + confighook <- "ConfigParameters" + + ## Concatenate Rmd chunk yml + configchunk <- .generateConfigChunk( + list(experimentInfo = experimentInfo, species = species, + inFile = inFile, summaryInfo = summaryInfo, aName = aName, + idCol = idCol, labelCol = labelCol, geneIdCol = geneIdCol, + proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, + extraFeatureCols = extraFeatureCols, filtersSE = filtersSE, + reportTitle = reportTitle, reportAuthor = reportAuthor, + imputeMethod = imputeMethod, imputeArgs = imputeArgs, + assaysForExport = assaysForExport, + addAbundanceValues = addAbundanceValues, + addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, + comparisons = comparisons, ctrlGroup = ctrlGroup, + allPairwiseComparisons = allPairwiseComparisons, + singleFit = singleFit, + subtractBaseline = subtractBaseline, baselineGroup = baselineGroup, + normMethod = normMethod, spikeFeatures = spikeFeatures, + stattest = stattest, minNbrValidValues = minNbrValidValues, + minlFC = minlFC, samSignificance = samSignificance, + nperm = nperm, volcanoAdjPvalThr = volcanoAdjPvalThr, + volcanoLog2FCThr = volcanoLog2FCThr, + volcanoMaxFeatures = volcanoMaxFeatures, + volcanoLabelSign = volcanoLabelSign, + volcanoS0 = volcanoS0, + volcanoFeaturesToLabel = volcanoFeaturesToLabel, + addInteractiveVolcanos = addInteractiveVolcanos, + interactiveDisplayColumns = interactiveDisplayColumns, + interactiveGroupColumn = interactiveGroupColumn, + complexFDRThr = complexFDRThr, + maxNbrComplexesToPlot = maxNbrComplexesToPlot, + maxComplexSimilarity = maxComplexSimilarity, seed = seed, + includeFeatureCollections = includeFeatureCollections, + minSizeToKeepSet = minSizeToKeepSet, + customComplexes = customComplexes, complexSpecies = complexSpecies, + complexDbPath = complexDbPath, stringVersion = stringVersion, + stringDir = stringDir, linkTableColumns = linkTableColumns, + expType = "SE") + ) + + ## Read Rmd + rmd <- readr::read_file(templateRmd) + + ## Determine where to insert the config chunk + ## From https://community.rstudio.com/t/how-to-write-r-script-into-rmd-as-functioning-code-chunk/37453/2 + # header_regex <- sprintf("\\{\\{%sStart\\}\\}(.*?)\\{\\{%sEnd\\}\\}", + # confighook, + # confighook) + header_regex <- sprintf("{{%sStart}}\n\n{{%sEnd}}", + confighook, + confighook) + + ## Replace hooks with config chunk + output <- sub(header_regex, configchunk, rmd, fixed = TRUE) + + ## Similarly, add any custom yaml + ymlhook <- "YmlParameters" + # header_regex_yml <- sprintf("\\{\\{%sStart\\}\\}(.*?)\\{\\{%sEnd\\}\\}", + # ymlhook, + # ymlhook) + header_regex_yml <- sprintf("{{%sStart}}\n\n{{%sEnd}}", + ymlhook, + ymlhook) + if (!is.null(customYml)) { + customYml <- paste(readLines(customYml), collapse = "\n") + } else { + customYml <- "" + } + output <- sub(header_regex_yml, customYml, output, fixed = TRUE) + + ## Write output to file + if (!dir.exists(outputDir)) { + dir.create(outputDir, recursive = TRUE) + } + outputFile <- file.path(outputDir, paste0(outputBaseName, ".Rmd")) + if (file.exists(outputFile) && !forceOverwrite) { + stop(outputFile, + " already exists and forceOverwrite = FALSE, stopping.") + } else if (file.exists(outputFile) && forceOverwrite) { + message(outputFile, + " already exists but forceOverwrite = TRUE, overwriting.") + } + readr::write_file(output, file = outputFile) + + ## ------------------------------------------------------------------------- + ## Render the Rmd file + ## ------------------------------------------------------------------------- + args <- list() + args$input <- outputFile + args$output_format <- "html_document" + args$output_dir <- outputDir + args$intermediates_dir <- outputDir + args$quiet <- FALSE + args$run_pandoc <- pandocOK + + if (doRender) { + #nocov start + outputReport <- xfun::Rscript_call( + rmarkdown::render, + args + ) + #nocov end + } else { + outputReport <- outputFile + } + + ## ------------------------------------------------------------------------- + ## Return (invisibly) the path to the rendered html file + ## ------------------------------------------------------------------------- + invisible(outputReport) +} diff --git a/R/runSpectronautAnalysis.R b/R/runSpectronautAnalysis.R index 67db4d8e..987bffc5 100644 --- a/R/runSpectronautAnalysis.R +++ b/R/runSpectronautAnalysis.R @@ -15,6 +15,13 @@ #' or \code{"long_format"}. #' @param outLevel Character string indicating the desired output level. #' Currently only \code{"pg"} is supported. +#' @param filtersDF Named list where each element is a filtering function +#' that takes a \code{data.frame} (or \code{tibble}) as +#' input and returns a filtered object of the same class. No other +#' arguments are allowed. The filtering functions will be applied in the +#' order they are provided in the list, after reading the long-format text +#' file, and before creating the wide-format assay. Only +#' applies if \code{spectronautFileType} is \code{"long_format"}. #' @param spectronautLogFile Character string pointing to the Spectronaut #' setup.txt log file. File paths will be expressed in canonical form (using #' \code{normalizePath()}) before they are processed. @@ -24,11 +31,6 @@ #' \code{".PG.IBAQ$"}. #' @param aName Character scalar indicating the column to use for the main #' assay. -#' @param minScore Numeric, minimum score for a protein to be retained in the -#' analysis. Set to \code{NULL} if no score filtering is desired. -#' @param minPeptides Numeric, minimum number of peptides for a protein to be -#' retained in the analysis. Set to \code{NULL} if no filtering on the -#' number of peptides is desired. #' #' @export #' @author Charlotte Soneson @@ -46,11 +48,11 @@ #' @importFrom cowplot plot_grid theme_cowplot #' @importFrom htmltools tagList #' @importFrom dplyr %>% select starts_with full_join filter matches everything -#' mutate +#' @importFrom dplyr mutate #' @importFrom knitr current_input #' @importFrom ComplexUpset upset #' @importFrom ggplot2 ggplot aes geom_bar coord_flip theme_bw labs theme -#' element_text geom_point ggtitle +#' @importFrom ggplot2 element_text geom_point ggtitle #' @importFrom tibble rownames_to_column #' @importFrom S4Vectors metadata #' @importFrom scater runPCA @@ -78,10 +80,9 @@ runSpectronautAnalysis <- function( combineWhen = "missing", makeUnique = FALSE), extraFeatureCols = NULL, iColPattern = ".PG.Quantity$", - sampleAnnot, - includeOnlySamples = "", excludeSamples = "", - minScore = 10, minPeptides = 2, imputeMethod = "MinProb", - assaysForExport = NULL, addAbundanceValues = TRUE, + sampleAnnot, includeOnlySamples = "", excludeSamples = "", + imputeMethod = "MinProb", imputeArgs = list(), filtersDF = list(), + filtersSE = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), ctrlGroup = "", allPairwiseComparisons = TRUE, singleFit = TRUE, @@ -131,8 +132,8 @@ runSpectronautAnalysis <- function( proteinIdCol = proteinIdCol, stringIdCol = stringIdCol, extraFeatureCols = extraFeatureCols, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, filtersDF = filtersDF, filtersSE = filtersSE, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, @@ -187,9 +188,9 @@ runSpectronautAnalysis <- function( reportTitle = reportTitle, reportAuthor = reportAuthor, iColPattern = iColPattern, sampleAnnot = sampleAnnot, includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples, minScore = minScore, - minPeptides = minPeptides, imputeMethod = imputeMethod, - assaysForExport = assaysForExport, + excludeSamples = excludeSamples, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, filtersDF = filtersDF, + filtersSE = filtersSE, assaysForExport = assaysForExport, addAbundanceValues = addAbundanceValues, addHeatmaps = addHeatmaps, mergeGroups = mergeGroups, comparisons = comparisons, ctrlGroup = ctrlGroup, diff --git a/R/runTests.R b/R/runTests.R index 0b68f523..21602ceb 100644 --- a/R/runTests.R +++ b/R/runTests.R @@ -301,11 +301,11 @@ #' @importFrom SummarizedExperiment assay rowData colData #' @importFrom stats model.matrix p.adjust #' @importFrom limma lmFit treat topTreat cameraPR ids2indices eBayes -#' topTable +#' @importFrom limma topTable #' @importFrom proDA proDA test_diff #' @importFrom tibble rownames_to_column #' @importFrom dplyr %>% mutate select contains arrange filter left_join -#' across everything rename +#' @importFrom dplyr across everything rename #' @importFrom rlang .data #' @importFrom S4Vectors mcols #' @importFrom genefilter rowttests diff --git a/R/seqLogoApp.R b/R/seqLogoApp.R index a030c4aa..2f083367 100644 --- a/R/seqLogoApp.R +++ b/R/seqLogoApp.R @@ -28,8 +28,8 @@ #' } #' #' @importFrom shiny fluidPage fluidPage sidebarLayout sidebarPanel -#' mainPanel downloadButton plotOutput renderPlot reactive downloadHandler -#' shinyApp textOutput renderText +#' @importFrom shiny mainPanel downloadButton plotOutput renderPlot reactive +#' @importFrom shiny downloadHandler shinyApp textOutput renderText #' @importFrom motifStack pcm2pfm colorset #' @importFrom Biostrings consensusMatrix AAStringSet #' @importFrom DT DTOutput renderDT diff --git a/R/summaryPlots.R b/R/summaryPlots.R index 680bfc13..93830ed1 100644 --- a/R/summaryPlots.R +++ b/R/summaryPlots.R @@ -34,7 +34,7 @@ #' ylab = "log intensity") #' #' @importFrom ggplot2 ggplot aes geom_boxplot theme_bw scale_y_log10 -#' theme_bw theme labs element_text rel +#' @importFrom ggplot2 theme_bw theme labs element_text rel #' @importFrom tidyr gather #' @importFrom dplyr left_join #' @importFrom tibble rownames_to_column @@ -161,7 +161,7 @@ makeMeanSDPlot <- function(sce, assayName, xlab = "Mean", ylab = "SD") { #' @author Charlotte Soneson #' #' @importFrom ggplot2 ggplot geom_point geom_line aes labs coord_cartesian -#' theme_bw +#' @importFrom ggplot2 theme_bw #' @importFrom cowplot plot_grid #' makeSAPlot <- function(testList) { diff --git a/R/textSnippets.R b/R/textSnippets.R index 6a02cfb1..c9d24542 100644 --- a/R/textSnippets.R +++ b/R/textSnippets.R @@ -209,7 +209,7 @@ expDesignText <- function(testType) { introText <- function(expType) { .assertScalar(x = expType, type = "character", validValues = c("MaxQuant", "ProteomeDiscoverer", - "FragPipe", "DIANN", "Spectronaut")) + "FragPipe", "DIANN", "Spectronaut", "SE")) if (expType == "MaxQuant") { paste0("This report describes a reproducible end-to-end analysis of ", @@ -235,12 +235,19 @@ introText <- function(expType) { "a proteomics dataset quantified with ", "[Spectronaut](https://biognosys.com/resources/spectronaut-", "a-groundbreaking-increase-in-identifications/).") + } else if (expType == "SE") { + paste0("This report describes a reproducible end-to-end analysis of ", + "a proteomics dataset loaded as a pre-imported ", + "SummarizedExperiment object.") } } #' @rdname textSnippets #' @export filterByModText <- function(excludeUnmodifiedPeptides, keepModifications) { + .assertScalar(x = excludeUnmodifiedPeptides, type = "logical") + .assertVector(x = keepModifications, type = "character", allowNULL = TRUE) + if (excludeUnmodifiedPeptides && !is.null(keepModifications)) { paste0("Next, we filter out unmodified peptides and peptides ", "without any of the requested modifications ", @@ -262,7 +269,7 @@ inputText <- function(expTypeLevel) { .assertScalar(x = expTypeLevel, type = "character", validValues = c("MaxQuant", "ProteomeDiscovererProteins", "ProteomeDiscovererPeptideGroups", - "FragPipe", "DIANN", "Spectronaut")) + "FragPipe", "DIANN", "Spectronaut", "SE")) if (expTypeLevel == "MaxQuant") { paste0("The input to this workflow is a `proteinGroups.txt` file ", @@ -300,12 +307,17 @@ inputText <- function(expTypeLevel) { "Spectronaut intensities into `R` and store them in a ", "[SingleCellExperiment](https://bioconductor.org/packages/SingleCellExperiment/) ", "object. ") + } else if (expTypeLevel == "SE") { + paste0("The input to this workflow is a serialized SummarizedExperiment ", + "object (or a derivative, such as a SingleCellExperiment object).") } } #' @rdname textSnippets #' @export featureCollectionText <- function(featureCollections) { + .assertVector(x = featureCollections, type = "character", allowNULL = TRUE) + if (length(featureCollections) == 0) { out <- paste0("No feature collections were tested.") } else { diff --git a/inst/extdata/mq_example/1356_sce_init.rds b/inst/extdata/mq_example/1356_sce_init.rds new file mode 100644 index 00000000..48a61099 Binary files /dev/null and b/inst/extdata/mq_example/1356_sce_init.rds differ diff --git a/inst/extdata/process_basic_template.Rmd b/inst/extdata/process_basic_template.Rmd index 1a0028d3..c6a63cc7 100644 --- a/inst/extdata/process_basic_template.Rmd +++ b/inst/extdata/process_basic_template.Rmd @@ -77,7 +77,7 @@ available from [GitHub](https://fmicompbio.github.io/einprot/). ```{r get-basic-info} ## Get species info and define STRINGdb object speciesInfo <- getSpeciesInfo(species) -if (expType %in% c("MaxQuant", "FragPipe", "DIANN", "Spectronaut") || +if (expType %in% c("MaxQuant", "FragPipe", "DIANN", "Spectronaut", "SE") || (expType == "ProteomeDiscoverer" && inputLevel == "Proteins")) { if (is.null(stringDir)) stringDir <- "" if (is.null(stringIdCol) || is.na(speciesInfo$taxId)) { @@ -157,6 +157,8 @@ if (expType == "MaxQuant") { tb <- readSpectronautSetup(spectronautSetupFile = spectronautLogFile) tb <- c(list("Spectronaut file" = spectronautFile, "Analysis level" = outLevel), tb) +} else if (expType == "SE") { + tb <- c(list("Input file" = inFile), summaryInfo) } else { stop("Unknown 'expType'") } @@ -182,12 +184,9 @@ running `einprot`. ```{r settings-table} settingsList <- list( - "Include only samples (if applicable)" = paste(includeOnlySamples, - collapse = ", "), - "Exclude samples" = paste(excludeSamples, collapse = ", "), - "Min. number of peptides" = minPeptides, - "Min. protein score" = minScore, + "Filter names (SE)" = paste(names(filtersSE), collapse = ", "), "Imputation method" = imputeMethod, + "Additional imputation arguments (names)" = names(imputeArgs), "Assays(s) to use for exported values" = paste(assaysForExport, collapse = ", "), "Add abundance values" = addAbundanceValues, "Show heatmaps" = addHeatmaps, @@ -233,6 +232,14 @@ settingsList <- list( "Interactive group column" = interactiveGroupColumn ) +if (expType != "SE") { + settingsList <- c( + list("Include only samples (if applicable)" = paste(includeOnlySamples, + collapse = ", "), + "Exclude samples" = paste(excludeSamples, collapse = ", ")), + settingsList + ) +} if (stattest == "ttest") { settingsList <- settingsList[!(names(settingsList) %in% c("Minimal fold change (limma/treat)", @@ -252,26 +259,23 @@ if (expType %in% c("MaxQuant", "FragPipe", "ProteomeDiscoverer")) { if (expType == "ProteomeDiscoverer") { settingsList <- c(settingsList, list("Input type" = inputLevel, - "Min. number of PSMs" = minPSMs, - "Min. delta score" = minDeltaScore, - "Only retain master proteins" = masterProteinsOnly, "Modifications column" = modificationsCol, "Exclude unmodified peptides" = excludeUnmodifiedPeptides, "Modifications to keep" = paste(keepModifications, collapse = ", "))) if (inputLevel == "Proteins") { settingsList <- settingsList[!(names(settingsList) %in% - c("Min. number of PSMs", - "Min. delta score", - "Modifications column", + c("Modifications column", "Exclude unmodified peptides", "Modifications to keep"))] } - if (inputLevel == "PeptideGroups") { - settingsList <- settingsList[!(names(settingsList) %in% - c("Min. number of peptides", - "Min. protein score", - "Only retain master proteins"))] - } +} +if (expType %in% c("Spectronaut", "DIANN")) { + settingsList <- c(settingsList, + list("Filter names (DF)" = paste(names(filtersDF), collapse = ", "))) +} +if (expType == "SE") { + settingsList <- c(settingsList, + list("Assay name" = aName)) } makeTableFromList(settingsList) @@ -295,44 +299,49 @@ At this point, the SingleCellExperiment object holds assays with the different types of intensities and annotations from the input file. ```{r read-data} -if (expType == "MaxQuant") { - ## Read MaxQuant output - tmp <- importExperiment(inFile = mqFile, iColPattern = iColPattern, - includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples) -} else if (expType == "FragPipe") { - ## Read FragPipe output - tmp <- importExperiment(inFile = file.path(fragpipeDir, "combined_protein.tsv"), - iColPattern = iColPattern, - includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples) -} else if (expType == "ProteomeDiscoverer") { - ## Read Proteome Discoverer output - tmp <- importExperiment(inFile = pdFile, iColPattern = iColPattern, - includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples) -} else if (expType == "DIANN") { - ## Read DIA-NN output - tmp <- importDIANN(inFile = diannFile, fileType = diannFileType, - outLevel = outLevel, - stopIfEmpty = FALSE, aName = aName, - includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples) -} else if (expType == "Spectronaut") { - ## Read Spectronaut output - tmp <- importSpectronaut(inFile = spectronautFile, - fileType = spectronautFileType, outLevel = outLevel, - iColPattern = iColPattern, - stopIfEmpty = FALSE, aName = aName, - includeOnlySamples = includeOnlySamples, - excludeSamples = excludeSamples) +if (expType == "SE") { + sce <- as(readRDS(inFile), "SingleCellExperiment") } else { - stop("Unknown 'expType'") + if (expType == "MaxQuant") { + ## Read MaxQuant output + tmp <- importExperiment(inFile = mqFile, iColPattern = iColPattern, + includeOnlySamples = includeOnlySamples, + excludeSamples = excludeSamples) + } else if (expType == "FragPipe") { + ## Read FragPipe output + tmp <- importExperiment(inFile = file.path(fragpipeDir, "combined_protein.tsv"), + iColPattern = iColPattern, + includeOnlySamples = includeOnlySamples, + excludeSamples = excludeSamples) + } else if (expType == "ProteomeDiscoverer") { + ## Read Proteome Discoverer output + tmp <- importExperiment(inFile = pdFile, iColPattern = iColPattern, + includeOnlySamples = includeOnlySamples, + excludeSamples = excludeSamples) + } else if (expType == "DIANN") { + ## Read DIA-NN output + tmp <- importDIANN(inFile = diannFile, fileType = diannFileType, + outLevel = outLevel, + stopIfEmpty = FALSE, aName = aName, + includeOnlySamples = includeOnlySamples, + excludeSamples = excludeSamples, filtersDF = filtersDF) + } else if (expType == "Spectronaut") { + ## Read Spectronaut output + tmp <- importSpectronaut(inFile = spectronautFile, + fileType = spectronautFileType, outLevel = outLevel, + iColPattern = iColPattern, + stopIfEmpty = FALSE, aName = aName, + includeOnlySamples = includeOnlySamples, + excludeSamples = excludeSamples, + filtersDF = filtersDF) + } else { + stop("Unknown 'expType'") + } + + sce <- tmp$sce + aName <- tmp$aName } -sce <- tmp$sce -aName <- tmp$aName - sce ``` @@ -357,9 +366,11 @@ section below for more details about the fitted model(s). Please check that the table below correspond to your expectations. -```{r add-sampleinfo} +```{r add-sampleinfo, eval=(expType != "SE"), echo=(expType != "SE")} sce <- addSampleAnnots(sce, sampleAnnot = sampleAnnot) +``` +```{r print-sampleinfo} DT::datatable(as.data.frame(colData(sce)), options = list(scrollX = TRUE, pageLength = 20)) ``` @@ -422,39 +433,9 @@ filtered out based on the different criteria (vertical bars). ```{r filter-features} nbrFeaturesBefore <- nrow(sce) -if (expType == "MaxQuant") { - sce <- filterMaxQuant(sce = sce, minScore = minScore, minPeptides = minPeptides, - plotUpset = TRUE, - exclFile = sub("\\.Rmd$", paste0("_filtered_out_features.txt"), - knitr::current_input(dir = TRUE))) -} else if (expType == "FragPipe") { - sce <- filterFragPipe(sce = sce, minPeptides = minPeptides, - plotUpset = TRUE, - revPattern = paste0("^", tb[["Database decoy tag"]]), - exclFile = sub("\\.Rmd$", paste0("_filtered_out_features.txt"), - knitr::current_input(dir = TRUE))) -} else if (expType == "ProteomeDiscoverer") { - ## At this point, don't filter by modification type - this will be done later - sce <- filterPDTMT(sce = sce, inputLevel = inputLevel, minScore = minScore, - minPeptides = minPeptides, minDeltaScore = minDeltaScore, - minPSMs = minPSMs, masterProteinsOnly = masterProteinsOnly, - modificationsCol = modificationsCol, - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = sub("\\.Rmd$", paste0("_filtered_out_features.txt"), - knitr::current_input(dir = TRUE))) -} else if (expType == "Spectronaut") { - sce <- filterSpectronaut(sce = sce, minScore = minScore, - minPeptides = minPeptides, plotUpset = TRUE, - revPattern = "_Decoy$", - contamPattern = "^contam_", - exclFile = sub("\\.Rmd$", paste0("_filtered_out_features.txt"), - knitr::current_input(dir = TRUE))) -} else if (expType == "DIANN") { - sce <- sce -} else { - stop("Unknown 'expType'") -} +sce <- filterFeaturesSE(sce = sce, filtersSE = filtersSE, plotUpset = TRUE, + exclFile = sub("\\.Rmd$", paste0("_filtered_out_features.txt"), + knitr::current_input(dir = TRUE))) nbrFeaturesAfter <- nrow(sce) if (nbrFeaturesAfter == 0) { @@ -547,6 +528,7 @@ assay(sce, aNames$assayImputIndic) <- !is.finite(assay(sce, aNames$assayLog2With ## Replace zeros/-Inf values by explicit NA values in the assays assay(sce, aNames$assayInput)[assay(sce, aNames$assayInput) == 0] <- NA +assay(sce, aNames$assayInput)[!is.finite(assay(sce, aNames$assayInput))] <- NA assay(sce, aNames$assayLog2WithNA)[!is.finite(assay(sce, aNames$assayLog2WithNA))] <- NA sce @@ -559,15 +541,38 @@ cat(normText(normMethod = normMethod)) ``` ```{r normalize, echo=(normMethod != "none"), eval=(normMethod != "none"), message=FALSE, fig.width = min(14, max(7, 0.5 * ncol(sce))), fig.height = 5/7 * min(14, max(7, 0.5 * ncol(sce)))} -sce <- doNormalization(sce, method = normMethod, - assayName = aNames$assayLog2WithNA, - normalizedAssayName = aNames$assayLog2NormWithNA, - spikeFeatures = spikeFeatures) +if (normMethod == "vsn") { + # natural-scale input -> log-scale output + sce <- doNormalization(sce, method = normMethod, + assayName = aNames$assayInput, + normalizedAssayName = aNames$assayLog2NormWithNA, + spikeFeatures = spikeFeatures) +} else { + # center.median, center.mean, diff.median, center.mean.shared, + # center.median.shared, diff.mean.shared, diff.median.shared + # log-scale input -> log-scale output + sce <- doNormalization(sce, method = normMethod, + assayName = aNames$assayLog2WithNA, + normalizedAssayName = aNames$assayLog2NormWithNA, + spikeFeatures = spikeFeatures) +} makeIntensityBoxplots(sce = sce, assayName = aNames$assayLog2NormWithNA, doLog = FALSE, ylab = aNames$assayLog2NormWithNA, maxNGroups = 25) +if (normMethod %in% c("center.mean.shared", "center.median.shared", + "diff.mean.shared", "diff.median.shared")) { + # plot distribution of shared features + sharedFeats <- which(rowSums(is.na(assay(sce, aNames$assayLog2NormWithNA))) == 0) + if (length(sharedFeats) > 0) { + makeIntensityBoxplots(sce = sce[sharedFeats, ], assayName = aNames$assayLog2NormWithNA, + doLog = FALSE, + ylab = paste0(aNames$assayLog2NormWithNA, " (", + length(sharedFeats), " shared features)"), + maxNGroups = 25) + } +} ``` ```{r text-filter-by-mod, results="asis", echo=FALSE, eval=(expType == "ProteomeDiscoverer" && inputLevel == "PeptideGroups")} @@ -578,14 +583,31 @@ cat(filterByModText(excludeUnmodifiedPeptides = excludeUnmodifiedPeptides, ```{r filter-by-mod} if (expType == "ProteomeDiscoverer" && inputLevel == "PeptideGroups") { ## Filter by modification type - sce <- filterPDTMT(sce = sce, inputLevel = inputLevel, minScore = minScore, - minPeptides = minPeptides, minDeltaScore = minDeltaScore, - minPSMs = minPSMs, masterProteinsOnly = masterProteinsOnly, - modificationsCol = modificationsCol, - excludeUnmodifiedPeptides = excludeUnmodifiedPeptides, - keepModifications = keepModifications, plotUpset = TRUE, - exclFile = sub("\\.Rmd$", paste0("_filtered_out_features_modifications.txt"), - knitr::current_input(dir = TRUE))) + sce <- filterFeaturesSE( + sce = sce, + filtersSE = list( + ExclUnmod = function(se) { + if (modificationsCol %in% colnames(rowData(sce)) && + excludeUnmodifiedPeptides) { + rowData(sce)[[modificationsCol]] != "" & + !is.na(rowData(sce)[[modificationsCol]]) + } else { + rep(TRUE, nrow(sce)) + } + }, + KeepMods = function(se) { + if (modificationsCol %in% colnames(rowData(sce)) && + !is.null(keepModifications)) { + grepl(keepModifications, rowData(sce)[[modificationsCol]]) & + !is.na(rowData(sce)[[modificationsCol]]) + } else { + rep(TRUE, nrow(sce)) + } + } + ), + plotUpset = TRUE, + exclFile = sub("\\.Rmd$", paste0("_filtered_out_features_modifications.txt"), + knitr::current_input(dir = TRUE))) } ``` @@ -603,14 +625,16 @@ colData(sce)$pNA <- 100 * sce$nNA/nrow(sce) rowData(sce)$nNA <- rowSums(is.na(assay(sce, aNames$assayInput))) rowData(sce)$pNA <- 100 * rowData(sce)$nNA/ncol(sce) -plotFractionDetectedPerSample(dfNA = as.data.frame(colData(sce)[, c("sample", "nNA", "pNA")])) +plotFractionDetectedPerSample(dfNA = as.data.frame(colData(sce)[, c("sample", "nNA", "pNA")]), + valueType = "percentage") ``` We also plot the number of features that are detected in a given number of samples. ```{r missing-values-2, fig.width = min(14, max(7, 0.5 * ncol(sce))), fig.height = 5/7 * min(14, max(7, 0.5 * ncol(sce)))} -plotDetectedInSamples(dfNA = as.data.frame(rowData(sce)[, c("nNA", "pNA")])) +plotDetectedInSamples(dfNA = as.data.frame(rowData(sce)[, c("nNA", "pNA")]), + valueType = "percentage") ``` Finally we show the full missing value structure in the data matrix. The white @@ -620,7 +644,7 @@ values correspond to missing values, and the grey ones to observed intensities. if (addHeatmaps) { plotMissingValuesHeatmap(sce, assayMissing = aNames$assayImputIndic, onlyRowsWithMissing = FALSE, - settings = "clustered") + settings = ifelse(nrow(sce) <= 10000, "clustered", "sorted")) } ``` @@ -669,9 +693,11 @@ non-imputed values in each sample. ```{r plot-imputation, message = FALSE, fig.width = min(14, max(7, 0.5 * ncol(sce))), fig.height = min(14, max(7, 0.5 * ncol(sce)))} set.seed(seed) -sce <- doImputation(sce, method = imputeMethod, - assayName = aNames$assayLog2NormWithNA, - imputedAssayName = aNames$assayImputed) +sce <- do.call(doImputation, + c(list(sce = sce, imputeMethod = imputeMethod, + assayName = aNames$assayLog2NormWithNA, + imputedAssayName = aNames$assayImputed), + imputeArgs)) plotImputationDistribution(sce, assayToPlot = aNames$assayImputed, assayImputation = aNames$assayImputIndic, xlab = aNames$assayImputed, plotType = "histogram") @@ -960,7 +986,7 @@ interactiveVolcanos <- htmltools::tagList() for (nm in names(testres$tests)) { plots <- plotVolcano( sce = sce, res = testres$tests[[nm]], testType = stattest, - xv = NULL, yv = NULL, xvma = NULL, volcind = NULL, + xv = NULL, yv = NULL, xvma = NULL, volcind = NULL, pv = NULL, plotnote = testres$plotnotes[[nm]], plottitle = testres$plottitles[[nm]], plotsubtitle = testres$plotsubtitles[[nm]], @@ -1225,6 +1251,7 @@ addmeta <- list( aNames = aNames, aName = aNames$assayInput, imputeMethod = imputeMethod, + imputeArgs = imputeArgs, ctrlGroup = ctrlGroup, allPairwiseComparisons = allPairwiseComparisons, normMethod = normMethod, @@ -1248,6 +1275,8 @@ if (expType == "MaxQuant") { addmeta$keepModifications <- keepModifications } else if (expType == "Spectronaut") { addmeta$spectronautFile <- spectronautFile +} else if (expType == "SE") { + addmeta$inFile <- inFile } S4Vectors::metadata(sce) <- c( @@ -1306,12 +1335,12 @@ the values for each protein have been centered to mean 0. ```{r heatmap, message=FALSE, fig.width = min(14, max(7, 0.5 * ncol(sce))), fig.height = 8/7 * min(14, max(7, 0.5 * ncol(sce)))} if (addHeatmaps) { ht <- makeAbundanceHeatmap(sce, assayToPlot = aNames$assayImputed, doCenter = FALSE, - settings = "report") + settings = "report", clusterRows = (nrow(sce) <= 10000)) draw(ht, merge_legends = TRUE) ## Centered ht <- makeAbundanceHeatmap(sce, assayToPlot = aNames$assayImputed, doCenter = TRUE, - settings = "report") + settings = "report", clusterRows = (nrow(sce) <= 10000)) draw(ht, merge_legends = TRUE) } ``` @@ -1328,7 +1357,7 @@ if (addHeatmaps) { pdf(sub("\\.Rmd$", "_heatmap_centered.pdf", knitr::current_input(dir = TRUE)), width = ncol(sce)/3.3 + 3.375, height = nrow(sce)/6.33 + 4) ht <- makeAbundanceHeatmap(sce, assayToPlot = aNames$assayImputed, doCenter = TRUE, - settings = "export") + settings = "export", clusterRows = (nrow(sce) <= 10000)) draw(ht, merge_legends = TRUE, heatmap_legend_side = "bottom", annotation_legend_side = "bottom") dev.off() diff --git a/inst/extdata/spectronaut_example/PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt b/inst/extdata/spectronaut_example/PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt new file mode 100644 index 00000000..67348a3b --- /dev/null +++ b/inst/extdata/spectronaut_example/PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt @@ -0,0 +1,3162 @@ +Spectronaut 20.4.260109.92449 +Computer Name: cmp +User Domain Name: dom +User Name: user +Analysis Mode: UI +Analysis Type: directDIA +Analysis Date: 19-February-2026 15:08:07 UTC +01:00 + + +[BEGIN-SETTINGS] +Settings Used: PAF_einprot (default BGS) + ├─ DIA Analysis\Calibration + │ ├─ MZ Extraction Strategy: Maximum Intensity + │ ├─ Precision iRT: True + │ │ ├─ Exclude De-amidated Peptides: True + │ │ └─ iRT <-> RT Regression Type: Local (Non-Linear) Regression + │ ├─ MS1 Mass Tolerance Strategy: System Default + │ └─ MS2 Mass Tolerance Strategy: System Default + ├─ DIA Analysis\Identification + │ ├─ Precursor Qvalue Cutoff: 0.01 + │ ├─ Precursor Qvalue Cutoff (Experiment): 0.01 + │ ├─ Precursor PEP Cutoff: 0.2 + │ ├─ Protein Qvalue Cutoff (Experiment): 0.01 + │ ├─ Protein Qvalue Cutoff (Run): 0.05 + │ ├─ Protein PEP Cutoff: 0.75 + │ ├─ Single Hit Definition: By Stripped Sequence + │ ├─ Single Hit Protein Rule: Stratified Single Hit Protein FDR + │ ├─ Run-Level Protein Scoring: Highest Scoring Observation (SN19 default) + │ ├─ Exclude Duplicate Assays: True + │ ├─ Exclude Predicted Fragment Scores: False + │ ├─ Generate Decoys: True + │ │ ├─ Decoy Generation Method: Mutated + │ │ │ └─ Preferred Fragment Source: NN Predicted Fragments + │ │ └─ Decoy Limit Strategy: Dynamic + │ │ └─ Library Size Fraction: 0.1 + │ ├─ ISF Filter Rule: Keep "Likely In-Source Fragmented" Peptides + │ └─ Pvalue Estimator: Kernel Density Estimator + ├─ DIA Analysis\Pipeline Mode + │ ├─ Export All XICs: False + │ ├─ Export report in Parquet format: True + │ ├─ Generate SNE File: True + │ │ └─ Store Ion traces in SNE: False + │ ├─ Post Analysis Reports: + │ │ ├─ Binned CVs: True + │ │ ├─ Binned Identification: True + │ │ ├─ CV Density Line Chart: True + │ │ ├─ CVs Below X Bar Chart: True + │ │ ├─ Data Completeness Bar Chart: True + │ │ ├─ Modification Enrichment: True + │ │ ├─ Run Identifications Bar Chart: True + │ │ ├─ Scoring Histograms: True + │ │ └─ TIC Overlay: True + │ ├─ PTM Report Schema: + │ ├─ Report Schema: einprot_Pivot_PG_reduced (Pivot) + │ └─ Reporting Unit: Across Experiment + ├─ DIA Analysis\Post Analysis + │ ├─ Differential Abundance Testing: Unpaired t-test + │ │ ├─ Assume Equal Variance: False + │ │ ├─ Group-Wise Testing Correction: False + │ │ ├─ Log2 Ratio Candidate Filter: 0.58 + │ │ └─ Confidence Candidate Filter: Qvalue + │ │ └─ Confidence: 0.05 + │ ├─ Differential Abundance Grouping: Major Group (Quantification Settings) + │ │ └─ Smallest Quantitative Unit: Major Group (Quantification Settings) + │ │ └─ Use All MS-Level Quantities: True + │ ├─ Calculate Explained TIC: None + │ ├─ Calculate Sample Correlation Matrix: False + │ ├─ Gene Ontology: C:\Users\user\AppData\Roaming\Spectronaut\geneOntology\Ontologies\bgs_default_go-basic.obo + │ └─ Hierarchical Clustering: True + │ ├─ Distance Metric: Manhattan Distance + │ ├─ Linkage Strategy: Ward's Method + │ ├─ Order Runs by Clustering: True + │ └─ Z-score Transformation: False + ├─ DIA Analysis\Protein Inference + │ └─ Protein Inference Workflow: Automatic + │ └─ Inference Algorithm: IDPicker + ├─ DIA Analysis\PTM Workflow + │ ├─ Input Normalization Strategy: None + │ └─ PTM Localization: False + ├─ DIA Analysis\Quantification + │ ├─ Precursor Filtering: Identified (Qvalue) + │ │ ├─ Imputation Strategy: None + │ │ └─ Multi Channel Qvalue Filter: Group Qvalue + │ ├─ Proteotypicity Filter: None + │ ├─ Protein LFQ Method: Automatic + │ ├─ Quantity MS Level: MS2 + │ ├─ Quantity Type: Area + │ ├─ Cross-Run Normalization: False + │ ├─ Perform background noise removal: True + │ ├─ Quantification window: Synchronized + │ ├─ Interference Correction: True + │ │ ├─ Only Identified Peptides: True + │ │ ├─ Exclude All Multi-Channel Interferences: True + │ │ ├─ MS1 Min: 2 + │ │ └─ MS2 Min: 3 + │ ├─ Major (Protein) Grouping: by Protein Group Id + │ ├─ Minor (Peptide) Grouping: by Stripped Sequence + │ ├─ Major Group Quantity: Mean peptide quantity + │ ├─ Major Group Top N: True + │ │ ├─ Max: 3 + │ │ └─ Min: 1 + │ ├─ Minor Group Quantity: Mean precursor quantity + │ ├─ Minor Group Top N: True + │ │ ├─ Max: 3 + │ │ └─ Min: 1 + │ └─ Use Log2 Quantity Filter: True + │ └─ Minimum Log2 Precursor Quantity: 0 + ├─ DIA Analysis\Workflow + │ ├─ Method Evaluation: False + │ ├─ Profiling Strategy: None + │ ├─ Run Limit for directDIA Library: -1 + │ ├─ Hybrid (DDA + DIA) Library: False + │ └─ Unify Peptide Peaks Strategy: None + ├─ DIA Analysis\XIC Extraction + │ ├─ XIC IM Extraction Window: Dynamic + │ │ └─ Correction Factor: 1 + │ ├─ XIC RT Extraction Window: Dynamic + │ │ └─ Correction Factor: 1 + │ ├─ MS1 Mass Tolerance Strategy: Dynamic + │ │ └─ Correction Factor: 1 + │ └─ MS2 Mass Tolerance Strategy: Dynamic + │ └─ Correction Factor: 1 + ├─ Pulsar Search\Identification + │ ├─ Grouped Peptide FDR: None + │ ├─ PSM FDR: 0.01 + │ ├─ Peptide FDR: 0.01 + │ ├─ Protein Group FDR: 0.01 + │ ├─ directDIA Workflow: directDIA+ (Deep) + │ │ ├─ IM Sampling Reduction: 7 + │ │ └─ RT Sampling Reduction: 1 + │ ├─ PTM Localization Filter: False + │ └─ Semi-Specific Pipeline: Smart Enumeration (SN20) + ├─ Pulsar Search\iRT Calibration + │ ├─ Calibrate from Empirical RT: False + │ ├─ iRT Reference Strategy: Deep Learning Assisted iRT Regression + │ └─ Minimum Rsquare: 0.8 + ├─ Pulsar Search\Labeling + │ └─ Channels: + │ ├─ Channel 1: False + │ ├─ Channel 2: False + │ ├─ Channel 3: False + │ ├─ Channel 4: False + │ └─ Channel 5: False + ├─ Pulsar Search\Modifications + │ └─ Search Mode: Closed Search + │ ├─ Max Variable Modifications: 5 + │ ├─ Fixed Modifications:: Carbamidomethyl (C) + │ └─ Variable Modifications:: Acetyl (Protein N-term), Oxidation (M) + ├─ Pulsar Search\Peptides + │ ├─ Enzymes / Cleavage Rules: Trypsin/P + │ ├─ Digest Type: Specific + │ ├─ Decoy Generation Rule: KR + │ ├─ Max Peptide Length: 52 + │ ├─ Min Peptide Length: 7 + │ ├─ Missed Cleavages: 2 + │ └─ Toggle N-terminal M: True + ├─ Pulsar Search\Result Filters + │ ├─ Fragment Ions: + │ │ ├─ Ion AA Length: True + │ │ │ └─ N: 3 + │ │ ├─ Ion Charge: False + │ │ ├─ Ion Loss Type: False + │ │ ├─ Ion Type: False + │ │ ├─ m/z : True + │ │ │ ├─ Max: 3000 + │ │ │ └─ Min: 200 + │ │ ├─ Overlapping between Channels: False + │ │ └─ Relative Intensity: True + │ │ └─ Min: 1 + │ └─ Precursors: + │ ├─ Amino Acids: False + │ ├─ Best N Fragments per Peptide: True + │ │ ├─ Max: 6 + │ │ └─ Min: 3 + │ ├─ Best N Peptides per Protein Group: False + │ ├─ Channel Count: False + │ ├─ FASTA Matched: False + │ ├─ Missed Cleavage: False + │ ├─ Modifications: None + │ ├─ Peptide Charge: False + │ └─ Proteotypicity: False + ├─ Pulsar Search\Speed-Up + │ ├─ MS2 Index: Automatic + │ └─ diaPASEF Pre-Processing: Automatic + ├─ Pulsar Search\Tolerances + │ └─ Tolerance Parameters: + │ ├─ Thermo IonTrap: + │ │ ├─ Calibration Search: Dynamic + │ │ │ ├─ MS1 Correction Factor: 1 + │ │ │ └─ MS2 Correction Factor: 1 + │ │ └─ Main Search: Dynamic + │ │ ├─ MS1 Correction Factor: 1 + │ │ └─ MS2 Correction Factor: 1 + │ ├─ Thermo Orbitrap: + │ │ ├─ Calibration Search: Dynamic + │ │ │ ├─ MS1 Correction Factor: 1 + │ │ │ └─ MS2 Correction Factor: 1 + │ │ └─ Main Search: Dynamic + │ │ ├─ MS1 Correction Factor: 1 + │ │ └─ MS2 Correction Factor: 1 + │ └─ TOF: + │ ├─ Calibration Search: Dynamic + │ │ ├─ MS1 Correction Factor: 1 + │ │ └─ MS2 Correction Factor: 1 + │ └─ Main Search: Dynamic + │ ├─ MS1 Correction Factor: 1 + │ └─ MS2 Correction Factor: 1 + └─ Pulsar Search\Workflow + ├─ Fragment Ion Selection Strategy: Intensity Based + ├─ In-Silico Generate Missing Channels: False + └─ Use DNN Predicted Ion Mobility: Auto +[END-SETTINGS] + +[BEGIN-SETUP] +Run: LFQ_24min_500ng_2Th_3ms_A_01.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_A_01 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_A_01.raw" + ├─ Condition: Mix_A + ├─ Replicate: 1 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +Run: LFQ_24min_500ng_2Th_3ms_A_02.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_A_02 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_A_02.raw" + ├─ Condition: Mix_A + ├─ Replicate: 2 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +Run: LFQ_24min_500ng_2Th_3ms_A_03.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_A_03 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_A_03.raw" + ├─ Condition: Mix_A + ├─ Replicate: 3 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +Run: LFQ_24min_500ng_2Th_3ms_B_01.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_B_01 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_B_01.raw" + ├─ Condition: Mix_B + ├─ Replicate: 1 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +Run: LFQ_24min_500ng_2Th_3ms_B_02.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_B_02 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_B_02.raw" + ├─ Condition: Mix_B + ├─ Replicate: 2 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +Run: LFQ_24min_500ng_2Th_3ms_B_03.raw + ├─ Vendor: Thermo + ├─ File: LFQ_24min_500ng_2Th_3ms_B_03 + ├─ Path: "LFQ_24min_500ng_2Th_3ms_B_03.raw" + ├─ Condition: Mix_B + ├─ Replicate: 3 + ├─ HTRMS Version: 20.4.260109.92449 + ├─ Protein Databases Used + │ ├─ ECOLI__250312 + │ │ ├─ Protein Entries: 4’273 + │ │ ├─ Original File: ECOLI__250312.fasta + │ │ ├─ Date Created: 30-October-2025 16:07:09 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ ├─ HUMAN__230321 + │ │ ├─ Protein Entries: 20’591 + │ │ ├─ Original File: HUMAN__230321.fasta + │ │ ├─ Date Created: 04-March-2025 12:31:56 UTC +01:00 + │ │ ├─ Date Modified: 17-February-2026 17:25:48 UTC +01:00 + │ │ └─ Parsing Rule: UniProt FASTA + │ └─ YEAST__230321 + │ ├─ Protein Entries: 6’060 + │ ├─ Original File: YEAST__230321.fasta + │ ├─ Date Created: 28-January-2026 14:06:11 UTC +01:00 + │ ├─ Date Modified: 17-February-2026 17:25:50 UTC +01:00 + │ └─ Parsing Rule: UniProt FASTA + └─ MS2 Method + ├─ [380.4 - 382.4] + ├─ [382.4 - 384.4] + ├─ [384.4 - 386.4] + ├─ [386.4 - 388.4] + ├─ [388.4 - 390.4] + ├─ [390.4 - 392.4] + ├─ [392.4 - 394.4] + ├─ [394.4 - 396.4] + ├─ [396.4 - 398.4] + ├─ [398.4 - 400.4] + ├─ [400.4 - 402.4] + ├─ [402.4 - 404.4] + ├─ [404.4 - 406.4] + ├─ [406.4 - 408.4] + ├─ [408.4 - 410.4] + ├─ [410.4 - 412.4] + ├─ [412.4 - 414.4] + ├─ [414.4 - 416.4] + ├─ [416.4 - 418.4] + ├─ [418.4 - 420.4] + ├─ [420.4 - 422.4] + ├─ [422.4 - 424.4] + ├─ [424.4 - 426.4] + ├─ [426.4 - 428.4] + ├─ [428.4 - 430.4] + ├─ [430.4 - 432.4] + ├─ [432.4 - 434.4] + ├─ [434.4 - 436.4] + ├─ [436.4 - 438.4] + ├─ [438.4 - 440.5] + ├─ [440.5 - 442.5] + ├─ [442.5 - 444.5] + ├─ [444.5 - 446.5] + ├─ [446.5 - 448.5] + ├─ [448.5 - 450.5] + ├─ [450.5 - 452.5] + ├─ [452.5 - 454.5] + ├─ [454.5 - 456.5] + ├─ [456.5 - 458.5] + ├─ [458.5 - 460.5] + ├─ [460.5 - 462.5] + ├─ [462.5 - 464.5] + ├─ [464.5 - 466.5] + ├─ [466.5 - 468.5] + ├─ [468.5 - 470.5] + ├─ [470.5 - 472.5] + ├─ [472.5 - 474.5] + ├─ [474.5 - 476.5] + ├─ [476.5 - 478.5] + ├─ [478.5 - 480.5] + ├─ [480.5 - 482.5] + ├─ [482.5 - 484.5] + ├─ [484.5 - 486.5] + ├─ [486.5 - 488.5] + ├─ [488.5 - 490.5] + ├─ [490.5 - 492.5] + ├─ [492.5 - 494.5] + ├─ [494.5 - 496.5] + ├─ [496.5 - 498.5] + ├─ [498.5 - 500.5] + ├─ [500.5 - 502.5] + ├─ [502.5 - 504.5] + ├─ [504.5 - 506.5] + ├─ [506.5 - 508.5] + ├─ [508.5 - 510.5] + ├─ [510.5 - 512.5] + ├─ [512.5 - 514.5] + ├─ [514.5 - 516.5] + ├─ [516.5 - 518.5] + ├─ [518.5 - 520.5] + ├─ [520.5 - 522.5] + ├─ [522.5 - 524.5] + ├─ [524.5 - 526.5] + ├─ [526.5 - 528.5] + ├─ [528.5 - 530.5] + ├─ [530.5 - 532.5] + ├─ [532.5 - 534.5] + ├─ [534.5 - 536.5] + ├─ [536.5 - 538.5] + ├─ [538.5 - 540.5] + ├─ [540.5 - 542.5] + ├─ [542.5 - 544.5] + ├─ [544.5 - 546.5] + ├─ [546.5 - 548.5] + ├─ [548.5 - 550.5] + ├─ [550.5 - 552.5] + ├─ [552.5 - 554.5] + ├─ [554.5 - 556.5] + ├─ [556.5 - 558.5] + ├─ [558.5 - 560.5] + ├─ [560.5 - 562.5] + ├─ [562.5 - 564.5] + ├─ [564.5 - 566.5] + ├─ [566.5 - 568.5] + ├─ [568.5 - 570.5] + ├─ [570.5 - 572.5] + ├─ [572.5 - 574.5] + ├─ [574.5 - 576.5] + ├─ [576.5 - 578.5] + ├─ [578.5 - 580.5] + ├─ [580.5 - 582.5] + ├─ [582.5 - 584.5] + ├─ [584.5 - 586.5] + ├─ [586.5 - 588.5] + ├─ [588.5 - 590.5] + ├─ [590.5 - 592.5] + ├─ [592.5 - 594.5] + ├─ [594.5 - 596.5] + ├─ [596.5 - 598.5] + ├─ [598.5 - 600.5] + ├─ [600.5 - 602.5] + ├─ [602.5 - 604.5] + ├─ [604.5 - 606.5] + ├─ [606.5 - 608.5] + ├─ [608.5 - 610.5] + ├─ [610.5 - 612.5] + ├─ [612.5 - 614.5] + ├─ [614.5 - 616.5] + ├─ [616.5 - 618.5] + ├─ [618.5 - 620.5] + ├─ [620.5 - 622.5] + ├─ [622.5 - 624.5] + ├─ [624.5 - 626.5] + ├─ [626.5 - 628.5] + ├─ [628.5 - 630.5] + ├─ [630.5 - 632.5] + ├─ [632.5 - 634.5] + ├─ [634.5 - 636.5] + ├─ [636.5 - 638.5] + ├─ [638.5 - 640.5] + ├─ [640.5 - 642.5] + ├─ [642.5 - 644.5] + ├─ [644.5 - 646.5] + ├─ [646.5 - 648.5] + ├─ [648.5 - 650.5] + ├─ [650.5 - 652.5] + ├─ [652.5 - 654.5] + ├─ [654.5 - 656.5] + ├─ [656.5 - 658.5] + ├─ [658.5 - 660.6] + ├─ [660.6 - 662.6] + ├─ [662.6 - 664.6] + ├─ [664.6 - 666.6] + ├─ [666.6 - 668.6] + ├─ [668.6 - 670.6] + ├─ [670.6 - 672.6] + ├─ [672.6 - 674.6] + ├─ [674.6 - 676.6] + ├─ [676.6 - 678.6] + ├─ [678.6 - 680.6] + ├─ [680.6 - 682.6] + ├─ [682.6 - 684.6] + ├─ [684.6 - 686.6] + ├─ [686.6 - 688.6] + ├─ [688.6 - 690.6] + ├─ [690.6 - 692.6] + ├─ [692.6 - 694.6] + ├─ [694.6 - 696.6] + ├─ [696.6 - 698.6] + ├─ [698.6 - 700.6] + ├─ [700.6 - 702.6] + ├─ [702.6 - 704.6] + ├─ [704.6 - 706.6] + ├─ [706.6 - 708.6] + ├─ [708.6 - 710.6] + ├─ [710.6 - 712.6] + ├─ [712.6 - 714.6] + ├─ [714.6 - 716.6] + ├─ [716.6 - 718.6] + ├─ [718.6 - 720.6] + ├─ [720.6 - 722.6] + ├─ [722.6 - 724.6] + ├─ [724.6 - 726.6] + ├─ [726.6 - 728.6] + ├─ [728.6 - 730.6] + ├─ [730.6 - 732.6] + ├─ [732.6 - 734.6] + ├─ [734.6 - 736.6] + ├─ [736.6 - 738.6] + ├─ [738.6 - 740.6] + ├─ [740.6 - 742.6] + ├─ [742.6 - 744.6] + ├─ [744.6 - 746.6] + ├─ [746.6 - 748.6] + ├─ [748.6 - 750.6] + ├─ [750.6 - 752.6] + ├─ [752.6 - 754.6] + ├─ [754.6 - 756.6] + ├─ [756.6 - 758.6] + ├─ [758.6 - 760.6] + ├─ [760.6 - 762.6] + ├─ [762.6 - 764.6] + ├─ [764.6 - 766.6] + ├─ [766.6 - 768.6] + ├─ [768.6 - 770.6] + ├─ [770.6 - 772.6] + ├─ [772.6 - 774.6] + ├─ [774.6 - 776.6] + ├─ [776.6 - 778.6] + ├─ [778.6 - 780.6] + ├─ [780.6 - 782.6] + ├─ [782.6 - 784.6] + ├─ [784.6 - 786.6] + ├─ [786.6 - 788.6] + ├─ [788.6 - 790.6] + ├─ [790.6 - 792.6] + ├─ [792.6 - 794.6] + ├─ [794.6 - 796.6] + ├─ [796.6 - 798.6] + ├─ [798.6 - 800.6] + ├─ [800.6 - 802.6] + ├─ [802.6 - 804.6] + ├─ [804.6 - 806.6] + ├─ [806.6 - 808.6] + ├─ [808.6 - 810.6] + ├─ [810.6 - 812.6] + ├─ [812.6 - 814.6] + ├─ [814.6 - 816.6] + ├─ [816.6 - 818.6] + ├─ [818.6 - 820.6] + ├─ [820.6 - 822.6] + ├─ [822.6 - 824.6] + ├─ [824.6 - 826.6] + ├─ [826.6 - 828.6] + ├─ [828.6 - 830.6] + ├─ [830.6 - 832.6] + ├─ [832.6 - 834.6] + ├─ [834.6 - 836.6] + ├─ [836.6 - 838.6] + ├─ [838.6 - 840.6] + ├─ [840.6 - 842.6] + ├─ [842.6 - 844.6] + ├─ [844.6 - 846.6] + ├─ [846.6 - 848.6] + ├─ [848.6 - 850.6] + ├─ [850.6 - 852.6] + ├─ [852.6 - 854.6] + ├─ [854.6 - 856.6] + ├─ [856.6 - 858.6] + ├─ [858.6 - 860.6] + ├─ [860.6 - 862.6] + ├─ [862.6 - 864.6] + ├─ [864.6 - 866.6] + ├─ [866.6 - 868.6] + ├─ [868.6 - 870.6] + ├─ [870.6 - 872.6] + ├─ [872.6 - 874.6] + ├─ [874.6 - 876.6] + ├─ [876.6 - 878.6] + ├─ [878.6 - 880.7] + ├─ [880.7 - 882.7] + ├─ [882.7 - 884.7] + ├─ [884.7 - 886.7] + ├─ [886.7 - 888.7] + ├─ [888.7 - 890.7] + ├─ [890.7 - 892.7] + ├─ [892.7 - 894.7] + ├─ [894.7 - 896.7] + ├─ [896.7 - 898.7] + ├─ [898.7 - 900.7] + ├─ [900.7 - 902.7] + ├─ [902.7 - 904.7] + ├─ [904.7 - 906.7] + ├─ [906.7 - 908.7] + ├─ [908.7 - 910.7] + ├─ [910.7 - 912.7] + ├─ [912.7 - 914.7] + ├─ [914.7 - 916.7] + ├─ [916.7 - 918.7] + ├─ [918.7 - 920.7] + ├─ [920.7 - 922.7] + ├─ [922.7 - 924.7] + ├─ [924.7 - 926.7] + ├─ [926.7 - 928.7] + ├─ [928.7 - 930.7] + ├─ [930.7 - 932.7] + ├─ [932.7 - 934.7] + ├─ [934.7 - 936.7] + ├─ [936.7 - 938.7] + ├─ [938.7 - 940.7] + ├─ [940.7 - 942.7] + ├─ [942.7 - 944.7] + ├─ [944.7 - 946.7] + ├─ [946.7 - 948.7] + ├─ [948.7 - 950.7] + ├─ [950.7 - 952.7] + ├─ [952.7 - 954.7] + ├─ [954.7 - 956.7] + ├─ [956.7 - 958.7] + ├─ [958.7 - 960.7] + ├─ [960.7 - 962.7] + ├─ [962.7 - 964.7] + ├─ [964.7 - 966.7] + ├─ [966.7 - 968.7] + ├─ [968.7 - 970.7] + ├─ [970.7 - 972.7] + ├─ [972.7 - 974.7] + ├─ [974.7 - 976.7] + ├─ [976.7 - 978.7] + └─ [978.7 - 980.7] + +[END-SETUP] + +[BEGIN-LOG] +INFO: [17/02/2026 17:28:59] -> Initializing Pipeline... +INFO: [17/02/2026 17:29:00] -> Loading... +INFO: [17/02/2026 17:29:00] -> Loading SNE File: 20260217_171737_4438_3ProteomeMix_Astral_SN20_4_filteredBZ.sne +INFO: [17/02/2026 17:17:38] -> Initializing Pipeline... +INFO: [17/02/2026 17:17:38] -> Loading... +INFO: [17/02/2026 17:17:38] -> Loading SNE File: 20260128_151258_4438_3ProteomeMix_Astral_SN20_4\20260128_151258_4438_3ProteomeMix_Astral_SN20_4.sne +INFO: [29/01/2026 12:33:50] -> Initializing Pipeline... +INFO: [29/01/2026 12:33:50] -> Preprocessing Run #1 of 6... +INFO: [29/01/2026 12:33:51] -> Searching DIA with Pulsar... +INFO: [29/01/2026 12:33:52] -> Initialize Pipeline... +INFO: [29/01/2026 12:33:52] -> Initialize Pipeline +INFO: [29/01/2026 12:34:18] -> Initialize Pipeline... +INFO: [29/01/2026 12:34:18] -> Creating Experiment Environment +INFO: [29/01/2026 12:34:18] -> SuperRun 1/6: Initializing (LFQ_24min_500ng_2Th_3ms_A_01.raw) +INFO: [29/01/2026 12:34:18] -> Run 1/6: Organizing Data from Run +INFO: [29/01/2026 12:34:18] -> Run 1/6: Creating Calibration Search Space... +INFO: [29/01/2026 12:34:20] -> Collecting Search Space Parameters... +INFO: [29/01/2026 12:34:23] -> Creating the Search Space... +INFO: [29/01/2026 12:34:24] -> Run 1/6: Creating Search Space... +INFO: [29/01/2026 12:34:24] -> Collecting Search Space Parameters... +INFO: [29/01/2026 12:34:50] -> Creating the Search Space... +INFO: [29/01/2026 12:34:51] -> Size of search space [MB]: 0 +INFO: [29/01/2026 12:34:51] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 12:34:51] -> Run 1/6: MS2 Index Generation +INFO: [29/01/2026 12:37:08] -> MS2 Index Generation Time: 2.29m +INFO: [29/01/2026 12:37:08] -> Run 1/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 12:37:09] -> Initializing... +INFO: [29/01/2026 12:39:53] -> Finalizing HTRMS File... +INFO: [29/01/2026 12:46:43] -> Processed in 9.6m +INFO: [29/01/2026 12:46:47] -> Done +INFO: [29/01/2026 12:46:48] -> Run 1/6: Process Raw File... +INFO: [29/01/2026 12:52:59] -> Run 1/6: Preparing Partitions... +INFO: [29/01/2026 12:52:59] -> Part 1/1 - Run 1/6: Preparing Calibration Searches... +INFO: [29/01/2026 12:53:00] -> Part 1/1 - Run 1/6: First Pass Calibration Search... +INFO: [29/01/2026 12:53:24] -> Part 1/1 - Run 1/6: Calibration Search... +INFO: [29/01/2026 12:53:39] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5101 [14.8s] +INFO: [29/01/2026 12:53:44] -> Part 1/1 - Run 1/6: Preparing Main Search... +INFO: [29/01/2026 12:53:45] -> Part 1/1 - Run 1/6: Main Search... +INFO: [29/01/2026 12:58:40] -> Extracting 555174 MS1 XICs +INFO: [29/01/2026 13:02:03] -> Run 1/6: Cleaning Up Run... +INFO: [29/01/2026 13:02:04] -> SuperRun 2/6: Initializing (LFQ_24min_500ng_2Th_3ms_A_02.raw) +INFO: [29/01/2026 13:02:04] -> Run 2/6: Organizing Data from Run +INFO: [29/01/2026 13:02:04] -> Run 2/6: Creating Calibration Search Space... +INFO: [29/01/2026 13:02:04] -> Run 2/6: Creating Search Space... +INFO: [29/01/2026 13:02:04] -> Size of search space [MB]: 0 +INFO: [29/01/2026 13:02:04] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 13:02:04] -> Run 2/6: MS2 Index Generation +INFO: [29/01/2026 13:02:05] -> MS2 Index Generation Time: 606.41ms +INFO: [29/01/2026 13:02:05] -> Run 2/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 13:02:06] -> Initializing... +INFO: [29/01/2026 13:04:27] -> Finalizing HTRMS File... +INFO: [29/01/2026 13:10:20] -> Processed in 8.2m +INFO: [29/01/2026 13:10:22] -> Done +INFO: [29/01/2026 13:10:22] -> Run 2/6: Process Raw File... +INFO: [29/01/2026 13:15:48] -> Run 2/6: Preparing Partitions... +INFO: [29/01/2026 13:15:48] -> Part 1/1 - Run 2/6: Preparing Calibration Searches... +INFO: [29/01/2026 13:15:49] -> Part 1/1 - Run 2/6: First Pass Calibration Search... +INFO: [29/01/2026 13:16:14] -> Part 1/1 - Run 2/6: Calibration Search... +INFO: [29/01/2026 13:16:27] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5500 [13.5s] +INFO: [29/01/2026 13:16:33] -> Part 1/1 - Run 2/6: Preparing Main Search... +INFO: [29/01/2026 13:16:34] -> Part 1/1 - Run 2/6: Main Search... +INFO: [29/01/2026 13:20:17] -> Extracting 495297 MS1 XICs +INFO: [29/01/2026 13:23:22] -> Run 2/6: Cleaning Up Run... +INFO: [29/01/2026 13:23:23] -> SuperRun 3/6: Initializing (LFQ_24min_500ng_2Th_3ms_A_03.raw) +INFO: [29/01/2026 13:23:23] -> Run 3/6: Organizing Data from Run +INFO: [29/01/2026 13:23:23] -> Run 3/6: Creating Calibration Search Space... +INFO: [29/01/2026 13:23:23] -> Run 3/6: Creating Search Space... +INFO: [29/01/2026 13:23:23] -> Size of search space [MB]: 0 +INFO: [29/01/2026 13:23:23] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 13:23:23] -> Run 3/6: MS2 Index Generation +INFO: [29/01/2026 13:23:24] -> MS2 Index Generation Time: 653.51ms +INFO: [29/01/2026 13:23:24] -> Run 3/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 13:23:25] -> Initializing... +INFO: [29/01/2026 13:25:45] -> Finalizing HTRMS File... +INFO: [29/01/2026 13:31:51] -> Processed in 8.4m +INFO: [29/01/2026 13:31:53] -> Done +INFO: [29/01/2026 13:31:53] -> Run 3/6: Process Raw File... +INFO: [29/01/2026 13:37:23] -> Run 3/6: Preparing Partitions... +INFO: [29/01/2026 13:37:23] -> Part 1/1 - Run 3/6: Preparing Calibration Searches... +INFO: [29/01/2026 13:37:24] -> Part 1/1 - Run 3/6: First Pass Calibration Search... +INFO: [29/01/2026 13:37:48] -> Part 1/1 - Run 3/6: Calibration Search... +INFO: [29/01/2026 13:38:02] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5190 [13.3s] +INFO: [29/01/2026 13:38:07] -> Part 1/1 - Run 3/6: Preparing Main Search... +INFO: [29/01/2026 13:38:07] -> Part 1/1 - Run 3/6: Main Search... +INFO: [29/01/2026 13:41:46] -> Extracting 487241 MS1 XICs +INFO: [29/01/2026 13:44:50] -> Run 3/6: Cleaning Up Run... +INFO: [29/01/2026 13:44:50] -> SuperRun 4/6: Initializing (LFQ_24min_500ng_2Th_3ms_B_01.raw) +INFO: [29/01/2026 13:44:50] -> Run 4/6: Organizing Data from Run +INFO: [29/01/2026 13:44:50] -> Run 4/6: Creating Calibration Search Space... +INFO: [29/01/2026 13:44:50] -> Run 4/6: Creating Search Space... +INFO: [29/01/2026 13:44:50] -> Size of search space [MB]: 0 +INFO: [29/01/2026 13:44:50] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 13:44:50] -> Run 4/6: MS2 Index Generation +INFO: [29/01/2026 13:44:51] -> MS2 Index Generation Time: 643.46ms +INFO: [29/01/2026 13:44:51] -> Run 4/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 13:44:52] -> Initializing... +INFO: [29/01/2026 13:47:29] -> Finalizing HTRMS File... +INFO: [29/01/2026 13:54:22] -> Processed in 9.5m +INFO: [29/01/2026 13:54:25] -> Done +INFO: [29/01/2026 13:54:25] -> Run 4/6: Process Raw File... +INFO: [29/01/2026 14:00:39] -> Run 4/6: Preparing Partitions... +INFO: [29/01/2026 14:00:39] -> Part 1/1 - Run 4/6: Preparing Calibration Searches... +INFO: [29/01/2026 14:00:39] -> Part 1/1 - Run 4/6: First Pass Calibration Search... +INFO: [29/01/2026 14:01:05] -> Part 1/1 - Run 4/6: Calibration Search... +INFO: [29/01/2026 14:01:22] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5098 [17s] +INFO: [29/01/2026 14:01:27] -> Part 1/1 - Run 4/6: Preparing Main Search... +INFO: [29/01/2026 14:01:27] -> Part 1/1 - Run 4/6: Main Search... +INFO: [29/01/2026 14:06:29] -> Extracting 573728 MS1 XICs +INFO: [29/01/2026 14:10:00] -> Run 4/6: Cleaning Up Run... +INFO: [29/01/2026 14:10:00] -> SuperRun 5/6: Initializing (LFQ_24min_500ng_2Th_3ms_B_02.raw) +INFO: [29/01/2026 14:10:00] -> Run 5/6: Organizing Data from Run +INFO: [29/01/2026 14:10:00] -> Run 5/6: Creating Calibration Search Space... +INFO: [29/01/2026 14:10:00] -> Run 5/6: Creating Search Space... +INFO: [29/01/2026 14:10:00] -> Size of search space [MB]: 0 +INFO: [29/01/2026 14:10:00] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 14:10:00] -> Run 5/6: MS2 Index Generation +INFO: [29/01/2026 14:10:00] -> MS2 Index Generation Time: 650.1ms +INFO: [29/01/2026 14:10:00] -> Run 5/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 14:10:02] -> Initializing... +INFO: [29/01/2026 14:12:42] -> Finalizing HTRMS File... +INFO: [29/01/2026 14:18:51] -> Processed in 8.8m +INFO: [29/01/2026 14:18:54] -> Done +INFO: [29/01/2026 14:18:54] -> Run 5/6: Process Raw File... +INFO: [29/01/2026 14:24:16] -> Run 5/6: Preparing Partitions... +INFO: [29/01/2026 14:24:16] -> Part 1/1 - Run 5/6: Preparing Calibration Searches... +INFO: [29/01/2026 14:24:16] -> Part 1/1 - Run 5/6: First Pass Calibration Search... +INFO: [29/01/2026 14:24:42] -> Part 1/1 - Run 5/6: Calibration Search... +INFO: [29/01/2026 14:24:56] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5700 [14s] +INFO: [29/01/2026 14:25:01] -> Part 1/1 - Run 5/6: Preparing Main Search... +INFO: [29/01/2026 14:25:02] -> Part 1/1 - Run 5/6: Main Search... +INFO: [29/01/2026 14:28:45] -> Extracting 494505 MS1 XICs +INFO: [29/01/2026 14:32:03] -> Run 5/6: Cleaning Up Run... +INFO: [29/01/2026 14:32:03] -> SuperRun 6/6: Initializing (LFQ_24min_500ng_2Th_3ms_B_03.raw) +INFO: [29/01/2026 14:32:03] -> Run 6/6: Organizing Data from Run +INFO: [29/01/2026 14:32:03] -> Run 6/6: Creating Calibration Search Space... +INFO: [29/01/2026 14:32:03] -> Run 6/6: Creating Search Space... +INFO: [29/01/2026 14:32:03] -> Size of search space [MB]: 0 +INFO: [29/01/2026 14:32:03] -> Number of IMPGs in search space: 0 +INFO: [29/01/2026 14:32:03] -> Run 6/6: MS2 Index Generation +INFO: [29/01/2026 14:32:04] -> MS2 Index Generation Time: 653.77ms +INFO: [29/01/2026 14:32:04] -> Run 6/6: Method-Specific Pre-Processing... +INFO: [29/01/2026 14:32:05] -> Initializing... +INFO: [29/01/2026 14:34:43] -> Finalizing HTRMS File... +INFO: [29/01/2026 14:40:46] -> Processed in 8.7m +INFO: [29/01/2026 14:40:49] -> Done +INFO: [29/01/2026 14:40:49] -> Run 6/6: Process Raw File... +INFO: [29/01/2026 14:46:19] -> Run 6/6: Preparing Partitions... +INFO: [29/01/2026 14:46:19] -> Part 1/1 - Run 6/6: Preparing Calibration Searches... +INFO: [29/01/2026 14:46:20] -> Part 1/1 - Run 6/6: First Pass Calibration Search... +INFO: [29/01/2026 14:46:43] -> Part 1/1 - Run 6/6: Calibration Search... +INFO: [29/01/2026 14:46:57] -> The number of PSMs identified during calibration with FDR <= 0.01 is 5716 [13.8s] +INFO: [29/01/2026 14:47:02] -> Part 1/1 - Run 6/6: Preparing Main Search... +INFO: [29/01/2026 14:47:03] -> Part 1/1 - Run 6/6: Main Search... +INFO: [29/01/2026 14:50:49] -> Extracting 497534 MS1 XICs +INFO: [29/01/2026 14:53:56] -> Run 6/6: Cleaning Up Run... +INFO: [29/01/2026 14:54:22] -> Remove Aborted Runs (if any) from the Experiment... +INFO: [29/01/2026 14:54:22] -> Score Post-Processing +INFO: [29/01/2026 14:58:48] -> Score Post-Processing: 4.43m +INFO: [29/01/2026 14:58:48] -> PSM FDR... +INFO: [29/01/2026 15:00:06] -> PSM FDR: 1.3m +INFO: [29/01/2026 15:00:06] -> Converting to non-redundant data structure... +INFO: [29/01/2026 15:00:52] -> Performing Peptide FDR... +INFO: [29/01/2026 15:01:04] -> Performing Protein Inference... +INFO: [29/01/2026 15:01:09] -> Performing Protein FDR... +INFO: [29/01/2026 15:01:10] -> Calculating Result Values at Run and Experiment Level... +INFO: [29/01/2026 15:01:37] -> Pulsar identified 510028 PSMs, 108426 stripped sequences, 126701 peptide precursors, 11289 protein groups. +INFO: [29/01/2026 15:01:37] -> iRT Calibration... +INFO: [29/01/2026 15:01:43] -> Performing directDIA+ search fine tuning... +INFO: [29/01/2026 15:05:45] -> Performing directDIA+ search... +INFO: [29/01/2026 15:05:46] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_A_01.raw +INFO: [29/01/2026 15:10:36] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_A_02.raw +INFO: [29/01/2026 15:13:20] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_A_03.raw +INFO: [29/01/2026 15:17:27] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_B_01.raw +INFO: [29/01/2026 15:23:37] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_B_02.raw +INFO: [29/01/2026 15:26:46] -> directDIA+ search: LFQ_24min_500ng_2Th_3ms_B_03.raw +INFO: [29/01/2026 15:29:34] -> Total nr of Searched Peptides: 1,817,496 of 2,709,933 +INFO: [29/01/2026 15:29:34] -> Initializing Combined Protein Inference... +INFO: [29/01/2026 15:29:37] -> Performing Protein Inference... +INFO: [29/01/2026 15:29:47] -> Performing Protein FDR... +INFO: [29/01/2026 15:29:48] -> Calculating Result Values at Run and Experiment Level... +INFO: [29/01/2026 15:30:04] -> Pulsar identified 510031 PSMs, 108428 stripped sequences, 126703 peptide precursors, 11321 protein groups. +INFO: [29/01/2026 15:30:04] -> Calculating Summary... +INFO: [29/01/2026 15:30:15] -> Identifying Calibration Peptides... +INFO: [29/01/2026 15:30:18] -> Performing directDIA+ Post Processing... +INFO: [29/01/2026 15:30:33] -> Combining Protein-Group FDR Results... +INFO: [29/01/2026 15:30:34] -> Combined Protein-Group Identifications at 1% Qvalue: 13,801 +INFO: [29/01/2026 15:30:34] -> Writing experiment store.. +INFO: [29/01/2026 15:31:13] -> Assigning iRT Source... +INFO: [29/01/2026 15:31:13] -> Calculating iRT... +INFO: [29/01/2026 15:31:13] -> Cleaning Up Experiment... +INFO: [29/01/2026 15:31:14] -> Summarizing Identifications +INFO: [29/01/2026 15:36:05] -> Identifiying Significant Precursors... +INFO: [29/01/2026 15:37:13] -> Predicting Ion Mobility +INFO: [29/01/2026 15:37:29] -> Calculating Median iRT +INFO: [29/01/2026 15:37:32] -> Building BGS Protein Grouping... +INFO: [29/01/2026 15:37:33] -> Digesting Fasta... +INFO: [29/01/2026 15:37:33] -> Annotating Proteins... +INFO: [29/01/2026 15:37:34] -> Grouping Proteins... +INFO: [29/01/2026 15:37:38] -> Calculating Run Summary Statistics... +INFO: [29/01/2026 15:40:07] -> Building Consensus Fragment Spectra... +INFO: [29/01/2026 15:43:04] -> Selecting best fragment ions +INFO: [29/01/2026 15:53:10] -> Protein Groups: 13791 (13995), Protein Id: 13929 (14121), Modified Peptides: 191699, Precursors: 228573, Peptides: 190204, Fragments: 1368730 +INFO: [29/01/2026 15:53:48] -> Initializing Experiment... +INFO: [29/01/2026 15:53:48] -> Loading Spectral Libraries... +INFO: [29/01/2026 15:56:11] -> Initialize Scoring... +INFO: [29/01/2026 15:56:11] -> Generating Scan Map... +INFO: [29/01/2026 15:56:11] -> Initializing Workpackages... +INFO: [29/01/2026 15:56:11] -> Performing Basic Calibration... +INFO: [29/01/2026 15:56:13] -> Calibration successful +INFO: [29/01/2026 15:56:13] -> Identifying Calibration Peptides... +INFO: [29/01/2026 15:56:13] -> Calibration successful +INFO: [29/01/2026 15:56:13] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 15:56:21] -> Initializing Pipeline... +INFO: [29/01/2026 15:56:21] -> Preprocessing Run #1 of 6... +INFO: [29/01/2026 15:56:21] -> Initialize Scoring... +INFO: [29/01/2026 15:56:21] -> Extracting Ion Currents... +INFO: [29/01/2026 15:57:11] -> Machine Learning... +INFO: [29/01/2026 15:57:17] -> Pipeline executed in 55.54s - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 15:57:22] -> Calibration successful +INFO: [29/01/2026 15:57:32] -> Initializing Pipeline... +INFO: [29/01/2026 15:57:32] -> Preprocessing Run #1 of 6... +INFO: [29/01/2026 15:57:32] -> Initialize Scoring... +INFO: [29/01/2026 15:57:32] -> Extracting Ion Currents... +INFO: [29/01/2026 15:59:26] -> Machine Learning... +INFO: [29/01/2026 15:59:51] -> Pipeline executed in 2.31m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:00:40] -> Calibration successful +INFO: [29/01/2026 16:00:40] -> Initialize Scoring... +INFO: [29/01/2026 16:00:40] -> Preprocessing Run #2 of 6... +INFO: [29/01/2026 16:00:40] -> Searching DIA with Pulsar... +INFO: [29/01/2026 16:00:40] -> Initializing Experiment... +INFO: [29/01/2026 16:00:40] -> Loading Spectral Libraries... +INFO: [29/01/2026 16:00:40] -> Initialize Scoring... +INFO: [29/01/2026 16:00:40] -> Generating Scan Map... +INFO: [29/01/2026 16:00:40] -> Initializing Workpackages... +INFO: [29/01/2026 16:00:40] -> Performing Basic Calibration... +INFO: [29/01/2026 16:00:41] -> Calibration successful +INFO: [29/01/2026 16:00:41] -> Identifying Calibration Peptides... +INFO: [29/01/2026 16:00:41] -> Calibration successful +INFO: [29/01/2026 16:00:41] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 16:00:48] -> Initializing Pipeline... +INFO: [29/01/2026 16:00:48] -> Preprocessing Run #2 of 6... +INFO: [29/01/2026 16:00:48] -> Initialize Scoring... +INFO: [29/01/2026 16:00:48] -> Extracting Ion Currents... +INFO: [29/01/2026 16:01:44] -> Machine Learning... +INFO: [29/01/2026 16:01:48] -> Pipeline executed in 1m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:01:53] -> Calibration successful +INFO: [29/01/2026 16:02:02] -> Initializing Pipeline... +INFO: [29/01/2026 16:02:02] -> Preprocessing Run #2 of 6... +INFO: [29/01/2026 16:02:02] -> Initialize Scoring... +INFO: [29/01/2026 16:02:02] -> Extracting Ion Currents... +INFO: [29/01/2026 16:04:00] -> Machine Learning... +INFO: [29/01/2026 16:04:25] -> Pipeline executed in 2.38m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:05:11] -> Calibration successful +INFO: [29/01/2026 16:05:11] -> Initialize Scoring... +INFO: [29/01/2026 16:05:11] -> Preprocessing Run #3 of 6... +INFO: [29/01/2026 16:05:11] -> Searching DIA with Pulsar... +INFO: [29/01/2026 16:05:11] -> Initializing Experiment... +INFO: [29/01/2026 16:05:11] -> Loading Spectral Libraries... +INFO: [29/01/2026 16:05:11] -> Initialize Scoring... +INFO: [29/01/2026 16:05:11] -> Generating Scan Map... +INFO: [29/01/2026 16:05:11] -> Initializing Workpackages... +INFO: [29/01/2026 16:05:11] -> Performing Basic Calibration... +INFO: [29/01/2026 16:05:13] -> Calibration successful +INFO: [29/01/2026 16:05:13] -> Identifying Calibration Peptides... +INFO: [29/01/2026 16:05:13] -> Calibration successful +INFO: [29/01/2026 16:05:13] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 16:05:23] -> Initializing Pipeline... +INFO: [29/01/2026 16:05:23] -> Preprocessing Run #3 of 6... +INFO: [29/01/2026 16:05:23] -> Initialize Scoring... +INFO: [29/01/2026 16:05:23] -> Extracting Ion Currents... +INFO: [29/01/2026 16:06:13] -> Machine Learning... +INFO: [29/01/2026 16:06:18] -> Pipeline executed in 55.01s - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:06:23] -> Calibration successful +INFO: [29/01/2026 16:06:31] -> Initializing Pipeline... +INFO: [29/01/2026 16:06:31] -> Preprocessing Run #3 of 6... +INFO: [29/01/2026 16:06:31] -> Initialize Scoring... +INFO: [29/01/2026 16:06:31] -> Extracting Ion Currents... +INFO: [29/01/2026 16:08:26] -> Machine Learning... +INFO: [29/01/2026 16:08:50] -> Pipeline executed in 2.33m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:09:38] -> Calibration successful +INFO: [29/01/2026 16:09:38] -> Initialize Scoring... +INFO: [29/01/2026 16:09:38] -> Preprocessing Run #4 of 6... +INFO: [29/01/2026 16:09:38] -> Searching DIA with Pulsar... +INFO: [29/01/2026 16:09:38] -> Initializing Experiment... +INFO: [29/01/2026 16:09:38] -> Loading Spectral Libraries... +INFO: [29/01/2026 16:09:38] -> Initialize Scoring... +INFO: [29/01/2026 16:09:38] -> Generating Scan Map... +INFO: [29/01/2026 16:09:38] -> Initializing Workpackages... +INFO: [29/01/2026 16:09:38] -> Performing Basic Calibration... +INFO: [29/01/2026 16:09:39] -> Calibration successful +INFO: [29/01/2026 16:09:39] -> Identifying Calibration Peptides... +INFO: [29/01/2026 16:09:39] -> Calibration successful +INFO: [29/01/2026 16:09:39] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 16:09:49] -> Initializing Pipeline... +INFO: [29/01/2026 16:09:49] -> Preprocessing Run #4 of 6... +INFO: [29/01/2026 16:09:49] -> Initialize Scoring... +INFO: [29/01/2026 16:09:49] -> Extracting Ion Currents... +INFO: [29/01/2026 16:10:39] -> Machine Learning... +INFO: [29/01/2026 16:10:48] -> Pipeline executed in 58.74s - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:10:53] -> Calibration successful +INFO: [29/01/2026 16:11:01] -> Initializing Pipeline... +INFO: [29/01/2026 16:11:01] -> Preprocessing Run #4 of 6... +INFO: [29/01/2026 16:11:01] -> Initialize Scoring... +INFO: [29/01/2026 16:11:01] -> Extracting Ion Currents... +INFO: [29/01/2026 16:12:54] -> Machine Learning... +INFO: [29/01/2026 16:13:18] -> Pipeline executed in 2.28m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:14:08] -> Calibration successful +INFO: [29/01/2026 16:14:08] -> Initialize Scoring... +INFO: [29/01/2026 16:14:08] -> Preprocessing Run #5 of 6... +INFO: [29/01/2026 16:14:08] -> Searching DIA with Pulsar... +INFO: [29/01/2026 16:14:08] -> Initializing Experiment... +INFO: [29/01/2026 16:14:08] -> Loading Spectral Libraries... +INFO: [29/01/2026 16:14:08] -> Initialize Scoring... +INFO: [29/01/2026 16:14:08] -> Generating Scan Map... +INFO: [29/01/2026 16:14:08] -> Initializing Workpackages... +INFO: [29/01/2026 16:14:08] -> Performing Basic Calibration... +INFO: [29/01/2026 16:14:09] -> Calibration successful +INFO: [29/01/2026 16:14:09] -> Identifying Calibration Peptides... +INFO: [29/01/2026 16:14:09] -> Calibration successful +INFO: [29/01/2026 16:14:09] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 16:14:18] -> Initializing Pipeline... +INFO: [29/01/2026 16:14:18] -> Preprocessing Run #5 of 6... +INFO: [29/01/2026 16:14:18] -> Initialize Scoring... +INFO: [29/01/2026 16:14:18] -> Extracting Ion Currents... +INFO: [29/01/2026 16:15:12] -> Machine Learning... +INFO: [29/01/2026 16:15:17] -> Pipeline executed in 59.1s - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:15:22] -> Calibration successful +INFO: [29/01/2026 16:15:32] -> Initializing Pipeline... +INFO: [29/01/2026 16:15:32] -> Preprocessing Run #5 of 6... +INFO: [29/01/2026 16:15:32] -> Initialize Scoring... +INFO: [29/01/2026 16:15:32] -> Extracting Ion Currents... +INFO: [29/01/2026 16:17:28] -> Machine Learning... +INFO: [29/01/2026 16:17:52] -> Pipeline executed in 2.34m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:18:40] -> Calibration successful +INFO: [29/01/2026 16:18:40] -> Initialize Scoring... +INFO: [29/01/2026 16:18:40] -> Preprocessing Run #6 of 6... +INFO: [29/01/2026 16:18:40] -> Searching DIA with Pulsar... +INFO: [29/01/2026 16:18:40] -> Initializing Experiment... +INFO: [29/01/2026 16:18:40] -> Loading Spectral Libraries... +INFO: [29/01/2026 16:18:40] -> Initialize Scoring... +INFO: [29/01/2026 16:18:40] -> Generating Scan Map... +INFO: [29/01/2026 16:18:40] -> Initializing Workpackages... +INFO: [29/01/2026 16:18:40] -> Performing Basic Calibration... +INFO: [29/01/2026 16:18:42] -> Calibration successful +INFO: [29/01/2026 16:18:42] -> Identifying Calibration Peptides... +INFO: [29/01/2026 16:18:42] -> Calibration successful +INFO: [29/01/2026 16:18:42] -> Correcting Gradient Fine Structure... +INFO: [29/01/2026 16:18:50] -> Initializing Pipeline... +INFO: [29/01/2026 16:18:50] -> Preprocessing Run #6 of 6... +INFO: [29/01/2026 16:18:50] -> Initialize Scoring... +INFO: [29/01/2026 16:18:50] -> Extracting Ion Currents... +INFO: [29/01/2026 16:19:46] -> Machine Learning... +INFO: [29/01/2026 16:19:51] -> Pipeline executed in 1.02m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:19:56] -> Calibration successful +INFO: [29/01/2026 16:20:04] -> Initializing Pipeline... +INFO: [29/01/2026 16:20:04] -> Preprocessing Run #6 of 6... +INFO: [29/01/2026 16:20:04] -> Initialize Scoring... +INFO: [29/01/2026 16:20:04] -> Extracting Ion Currents... +INFO: [29/01/2026 16:22:01] -> Machine Learning... +INFO: [29/01/2026 16:22:25] -> Pipeline executed in 2.35m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [29/01/2026 16:23:12] -> Calibration successful +INFO: [29/01/2026 16:23:12] -> Initialize Scoring... +INFO: [29/01/2026 16:23:12] -> Initializing QC... +INFO: [29/01/2026 16:23:12] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:23:12] -> Assigning ML Features... +INFO: [29/01/2026 16:23:14] -> Generating Decoys... +INFO: [29/01/2026 16:23:30] -> Extracting Ion Currents... +INFO: [29/01/2026 16:25:25] -> Releasing Raw Files... +INFO: [29/01/2026 16:25:25] -> Machine Learning... +INFO: [29/01/2026 16:27:17] -> Initializing HTRMS... +INFO: [29/01/2026 16:27:17] -> Releasing Run Resources... +INFO: [29/01/2026 16:27:46] -> Reducing Score Cache... +INFO: [29/01/2026 16:28:11] -> Calculating Qvalues... +INFO: [29/01/2026 16:28:18] -> Unique precursors: 218,264 of 228,573 | modified peptides: 184,889 of 191,699 | peptides: 183,422 of 190,204 | protein groups: 13,736 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_A_01.raw] +INFO: [29/01/2026 16:28:18] -> Calibration successful +INFO: [29/01/2026 16:28:18] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:28:20] -> Collapsing Search Tree... +INFO: [29/01/2026 16:28:20] -> Processed in 5.14m +INFO: [29/01/2026 16:28:20] -> Initializing QC... +INFO: [29/01/2026 16:28:20] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:28:21] -> Assigning ML Features... +INFO: [29/01/2026 16:28:21] -> Generating Decoys... +INFO: [29/01/2026 16:28:22] -> Extracting Ion Currents... +INFO: [29/01/2026 16:30:36] -> Releasing Raw Files... +INFO: [29/01/2026 16:30:36] -> Machine Learning... +INFO: [29/01/2026 16:32:30] -> Initializing HTRMS... +INFO: [29/01/2026 16:32:30] -> Releasing Run Resources... +INFO: [29/01/2026 16:32:58] -> Reducing Score Cache... +INFO: [29/01/2026 16:33:24] -> Calculating Qvalues... +INFO: [29/01/2026 16:33:30] -> Unique precursors: 216,905 of 228,573 | modified peptides: 183,806 of 191,699 | peptides: 182,351 of 190,204 | protein groups: 13,734 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_A_02.raw] +INFO: [29/01/2026 16:33:30] -> Calibration successful +INFO: [29/01/2026 16:33:30] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:33:32] -> Collapsing Search Tree... +INFO: [29/01/2026 16:33:32] -> Processed in 5.2m +INFO: [29/01/2026 16:33:32] -> Initializing QC... +INFO: [29/01/2026 16:33:32] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:33:33] -> Assigning ML Features... +INFO: [29/01/2026 16:33:33] -> Generating Decoys... +INFO: [29/01/2026 16:33:35] -> Extracting Ion Currents... +INFO: [29/01/2026 16:35:55] -> Releasing Raw Files... +INFO: [29/01/2026 16:35:55] -> Machine Learning... +INFO: [29/01/2026 16:37:47] -> Initializing HTRMS... +INFO: [29/01/2026 16:37:47] -> Releasing Run Resources... +INFO: [29/01/2026 16:38:15] -> Reducing Score Cache... +INFO: [29/01/2026 16:38:40] -> Calculating Qvalues... +INFO: [29/01/2026 16:38:46] -> Unique precursors: 217,766 of 228,573 | modified peptides: 184,255 of 191,699 | peptides: 182,798 of 190,204 | protein groups: 13,737 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_A_03.raw] +INFO: [29/01/2026 16:38:46] -> Calibration successful +INFO: [29/01/2026 16:38:46] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:38:47] -> Collapsing Search Tree... +INFO: [29/01/2026 16:38:47] -> Processed in 5.26m +INFO: [29/01/2026 16:38:47] -> Initializing QC... +INFO: [29/01/2026 16:38:48] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:38:48] -> Assigning ML Features... +INFO: [29/01/2026 16:38:48] -> Generating Decoys... +INFO: [29/01/2026 16:38:49] -> Extracting Ion Currents... +INFO: [29/01/2026 16:41:03] -> Releasing Raw Files... +INFO: [29/01/2026 16:41:03] -> Machine Learning... +INFO: [29/01/2026 16:42:54] -> Initializing HTRMS... +INFO: [29/01/2026 16:42:54] -> Releasing Run Resources... +INFO: [29/01/2026 16:43:22] -> Reducing Score Cache... +INFO: [29/01/2026 16:43:47] -> Calculating Qvalues... +INFO: [29/01/2026 16:43:53] -> Unique precursors: 221,226 of 228,573 | modified peptides: 186,176 of 191,699 | peptides: 184,714 of 190,204 | protein groups: 13,751 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_B_01.raw] +INFO: [29/01/2026 16:43:53] -> Calibration successful +INFO: [29/01/2026 16:43:53] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:43:54] -> Collapsing Search Tree... +INFO: [29/01/2026 16:43:54] -> Processed in 5.1m +INFO: [29/01/2026 16:43:54] -> Initializing QC... +INFO: [29/01/2026 16:43:54] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:43:54] -> Assigning ML Features... +INFO: [29/01/2026 16:43:54] -> Generating Decoys... +INFO: [29/01/2026 16:43:55] -> Extracting Ion Currents... +INFO: [29/01/2026 16:46:04] -> Releasing Raw Files... +INFO: [29/01/2026 16:46:04] -> Machine Learning... +INFO: [29/01/2026 16:47:47] -> Initializing HTRMS... +INFO: [29/01/2026 16:47:47] -> Releasing Run Resources... +INFO: [29/01/2026 16:48:15] -> Reducing Score Cache... +INFO: [29/01/2026 16:48:41] -> Calculating Qvalues... +INFO: [29/01/2026 16:48:48] -> Unique precursors: 219,749 of 228,573 | modified peptides: 185,521 of 191,699 | peptides: 184,063 of 190,204 | protein groups: 13,719 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_B_02.raw] +INFO: [29/01/2026 16:48:48] -> Calibration successful +INFO: [29/01/2026 16:48:48] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:48:49] -> Collapsing Search Tree... +INFO: [29/01/2026 16:48:49] -> Processed in 4.91m +INFO: [29/01/2026 16:48:49] -> Initializing QC... +INFO: [29/01/2026 16:48:49] -> Determining Calibration Parameter... +INFO: [29/01/2026 16:48:49] -> Assigning ML Features... +INFO: [29/01/2026 16:48:49] -> Generating Decoys... +INFO: [29/01/2026 16:48:50] -> Extracting Ion Currents... +INFO: [29/01/2026 16:51:01] -> Releasing Raw Files... +INFO: [29/01/2026 16:51:01] -> Machine Learning... +INFO: [29/01/2026 16:52:55] -> Initializing HTRMS... +INFO: [29/01/2026 16:52:55] -> Releasing Run Resources... +INFO: [29/01/2026 16:53:23] -> Reducing Score Cache... +INFO: [29/01/2026 16:53:48] -> Calculating Qvalues... +INFO: [29/01/2026 16:53:53] -> Unique precursors: 220,242 of 228,573 | modified peptides: 185,858 of 191,699 | peptides: 184,395 of 190,204 | protein groups: 13,738 (Qvalue <= 0.01) [LFQ_24min_500ng_2Th_3ms_B_03.raw] +INFO: [29/01/2026 16:53:53] -> Calibration successful +INFO: [29/01/2026 16:53:53] -> Annotating In-Source Fragmentation... +INFO: [29/01/2026 16:53:54] -> Collapsing Search Tree... +INFO: [29/01/2026 16:53:54] -> Processed in 5.09m +INFO: [29/01/2026 16:53:54] -> Normalizing Cscores... +INFO: [29/01/2026 16:53:55] -> Calculating Global CVs +INFO: [29/01/2026 16:53:58] -> Calculating Profile Qvalues... +INFO: [29/01/2026 16:54:02] -> Initializing Protein Groups... +INFO: [29/01/2026 16:54:39] -> Correcting Interferences... +INFO: [29/01/2026 16:56:25] -> Calculating Global CVs +INFO: [29/01/2026 16:56:28] -> Calculating Precursor Quantities... +INFO: [29/01/2026 16:56:28] -> Normalizing Quantification... +INFO: [29/01/2026 16:56:28] -> Cross-run normalization disabled! +INFO: [29/01/2026 16:56:28] -> Calculating Global CVs +INFO: [29/01/2026 16:56:32] -> Calculating Condition CVs +INFO: [29/01/2026 16:56:44] -> Excluding Library Duplicates... +INFO: [29/01/2026 16:56:46] -> Calculating Global CVs +INFO: [29/01/2026 16:56:49] -> Building Protein Groups... +INFO: [29/01/2026 16:57:18] -> Calculating Run-Wise Protein Group FDR... +INFO: [29/01/2026 16:57:31] -> Annotating Protein Single Hits... +INFO: [29/01/2026 16:57:34] -> Calculating Global CVs +INFO: [29/01/2026 16:57:38] -> Updating Identification Counts... +INFO: [29/01/2026 16:57:43] -> Subtracting background noise... +INFO: [29/01/2026 16:57:43] -> Resetting existing imputation... +INFO: [29/01/2026 16:57:47] -> Calculating Protein Quantities... +INFO: [29/01/2026 16:57:49] -> Calculating Protein Quantities... +INFO: [29/01/2026 16:57:49] -> Calculating MaxLFQ Protein Quantities... +INFO: [29/01/2026 16:58:11] -> Collapsing PTM-Locations... +INFO: [29/01/2026 16:58:11] -> PTM Stoichiometry calculation... +INFO: [29/01/2026 16:58:11] -> Creating Protein Map... +INFO: [29/01/2026 16:58:11] -> Compiling Run Summary Information... +INFO: [29/01/2026 16:58:13] -> Running Post Analysis Processes... +INFO: [29/01/2026 16:59:06] -> Saving Qc Data... +INFO: [29/01/2026 16:59:26] -> Generating Output +INFO: [29/01/2026 16:59:26] -> Generating Experiment Report +INFO: [29/01/2026 16:59:32] -> 4438_3ProteomeMix_Astral_SN20_4_Report_einprot_Pivot_PG_reduced (Pivot).parquet +INFO: [29/01/2026 16:59:32] -> Generating RT Recalibration Report +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_A_01.raw_1_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_A_02.raw_2_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_A_03.raw_3_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_B_01.raw_4_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_B_02.raw_5_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> LFQ_24min_500ng_2Th_3ms_B_03.raw_6_iRTCalibration.tsv +INFO: [29/01/2026 16:59:32] -> Generating Run Meta Report +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_A_01.raw_1_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_A_02.raw_2_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_A_03.raw_3_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_B_01.raw_4_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_B_02.raw_5_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> LFQ_24min_500ng_2Th_3ms_B_03.raw_6_RunOverview.tsv +INFO: [29/01/2026 16:59:35] -> Generating Post Analysis Reports +INFO: [29/01/2026 17:01:17] -> 4438_3ProteomeMix_Astral_SN20_4_AnalyisOverview.txt +INFO: [29/01/2026 17:01:17] -> RunIdentifications.pdf +INFO: [29/01/2026 17:01:17] -> DataCompleteness.pdf +INFO: [29/01/2026 17:01:17] -> CVsBelowX.pdf +INFO: [29/01/2026 17:01:17] -> TICOverlay.pdf +INFO: [29/01/2026 17:01:17] -> CVDensityPerCondition.png +INFO: [29/01/2026 17:01:17] -> CVBoxPlotsPerCondition.png +INFO: [29/01/2026 17:01:17] -> Datapoints Per PeakDensityPerCondition.png +INFO: [29/01/2026 17:01:17] -> Datapoints Per PeakBoxPlotsPerCondition.png +INFO: [29/01/2026 17:01:17] -> Binned Identification.pdf +INFO: [29/01/2026 17:01:17] -> Binned Coefficients of Variation.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [1] LFQ_24min_500ng_2Th_3ms_A_01.raw.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [2] LFQ_24min_500ng_2Th_3ms_A_02.raw.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [3] LFQ_24min_500ng_2Th_3ms_A_03.raw.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [4] LFQ_24min_500ng_2Th_3ms_B_01.raw.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [5] LFQ_24min_500ng_2Th_3ms_B_02.raw.pdf +INFO: [29/01/2026 17:01:17] -> Precursors [Label Free] - [6] LFQ_24min_500ng_2Th_3ms_B_03.raw.pdf +INFO: [29/01/2026 17:01:17] -> ProteinFDR-Histogram.pdf +INFO: [29/01/2026 17:01:17] -> Candidates.tsv +INFO: [29/01/2026 17:01:17] -> VolcanoPlot.pdf +INFO: [29/01/2026 17:01:17] -> Heatmap.png +INFO: [29/01/2026 17:01:17] -> Generating Normalization Report +INFO: [29/01/2026 17:01:17] -> Generating Condition Setup Report +INFO: [29/01/2026 17:01:17] -> 4438_3ProteomeMix_Astral_SN20_4_ConditionSetup.tsv +INFO: [29/01/2026 17:01:17] -> Generating Memory Consumption Report +INFO: [29/01/2026 17:01:17] -> 4438_3ProteomeMix_Astral_SN20_4_MemoryConsumption.tsv +INFO: [29/01/2026 17:01:17] -> Generating Experiment Settings Report +INFO: [29/01/2026 17:01:21] -> 4438_3ProteomeMix_Astral_SN20_4_ExperimentSetupOverview_PAF_einprot (default BGS).txt +INFO: [29/01/2026 17:01:21] -> Writing Summary Information... +INFO: [29/01/2026 17:01:21] -> Unique precursors: 208,784 of 228,573 | modified peptides: 177,843 of 191,699 | peptides: 176,406 of 190,204 | protein groups: 13,482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 208,083 of 228,573 | modified peptides: 177,257 of 191,699 | peptides: 175,827 of 190,204 | protein groups: 13,497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 208,542 of 228,573 | modified peptides: 177,430 of 191,699 | peptides: 175,998 of 190,204 | protein groups: 13,486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 210,919 of 228,573 | modified peptides: 178,760 of 191,699 | peptides: 177,323 of 190,204 | protein groups: 13,473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 210,065 of 228,573 | modified peptides: 178,425 of 191,699 | peptides: 176,992 of 190,204 | protein groups: 13,460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 210,415 of 228,573 | modified peptides: 178,654 of 191,699 | peptides: 177,218 of 190,204 | protein groups: 13,477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [29/01/2026 17:01:21] -> Unique precursors: 215,205 of 228,573 | modified peptides: 182,186 of 191,699 | peptides: 180,733 of 190,204 | protein groups: 13,560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [29/01/2026 17:01:21] -> Saving SNE File... +INFO: [29/01/2026 17:01:21] -> Storing SNE File: 20260128_151258_4438_3ProteomeMix_Astral_SN20_4\20260128_151258_4438_3ProteomeMix_Astral_SN20_4.sne +INFO: [29/01/2026 17:01:21] -> Initializing Pipeline... +INFO: [29/01/2026 17:01:21] -> Calculating Qvalues... +INFO: [29/01/2026 17:01:21] -> Saving... +INFO: [17/02/2026 17:18:32] -> Applying settings to loaded experiment... +INFO: [17/02/2026 17:18:32] -> Updating the condition setup for the experiment +INFO: [17/02/2026 17:18:32] -> Updating Quantities... +INFO: [17/02/2026 17:18:32] -> Unifying Meta... +INFO: [17/02/2026 17:18:32] -> Normalizing Cscores... +INFO: [17/02/2026 17:18:33] -> Calculating Global CVs +INFO: [17/02/2026 17:18:36] -> Calculating Profile Qvalues... +INFO: [17/02/2026 17:18:40] -> Linking References... +INFO: [17/02/2026 17:18:41] -> Initializing Protein Groups... +INFO: [17/02/2026 17:21:12] -> Building Protein Groups... +INFO: [17/02/2026 17:21:18] -> Annotating In-Source Fragmentation... +INFO: [17/02/2026 17:21:18] -> Calculating Run-Wise Protein Group FDR... +INFO: [17/02/2026 17:21:27] -> Annotating Protein Single Hits... +INFO: [17/02/2026 17:21:30] -> Normalizing Quantification... +INFO: [17/02/2026 17:21:30] -> Calculating Global CVs +INFO: [17/02/2026 17:21:32] -> Updating Identification Counts... +INFO: [17/02/2026 17:21:36] -> Subtracting background noise... +INFO: [17/02/2026 17:21:36] -> Resetting existing imputation... +INFO: [17/02/2026 17:21:37] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:21:41] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:21:41] -> Calculating MaxLFQ Protein Quantities... +INFO: [17/02/2026 17:21:58] -> Collapsing PTM-Locations... +INFO: [17/02/2026 17:21:58] -> PTM Stoichiometry calculation... +INFO: [17/02/2026 17:21:58] -> Calculating Condition CVs +INFO: [17/02/2026 17:22:15] -> Creating Protein Map... +INFO: [17/02/2026 17:22:15] -> Compiling Run Summary Information... +INFO: [17/02/2026 17:22:19] -> Running Post Analysis Processes... +INFO: [17/02/2026 17:23:33] -> Writing Summary Information... +INFO: [17/02/2026 17:23:33] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [17/02/2026 17:23:33] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [17/02/2026 17:23:33] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [17/02/2026 17:23:33] -> Pipeline executed in 5.91m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [17/02/2026 17:25:47] -> Initializing Pipeline... +INFO: [17/02/2026 17:25:47] -> Calculating Qvalues... +INFO: [17/02/2026 17:25:47] -> Saving... +INFO: [17/02/2026 17:29:51] -> Applying settings to loaded experiment... +INFO: [17/02/2026 17:29:51] -> Updating the condition setup for the experiment +INFO: [17/02/2026 17:29:51] -> Updating Quantities... +INFO: [17/02/2026 17:29:51] -> Unifying Meta... +INFO: [17/02/2026 17:29:51] -> Normalizing Cscores... +INFO: [17/02/2026 17:29:52] -> Calculating Global CVs +INFO: [17/02/2026 17:29:55] -> Calculating Profile Qvalues... +INFO: [17/02/2026 17:29:59] -> Linking References... +INFO: [17/02/2026 17:30:00] -> Initializing Protein Groups... +INFO: [17/02/2026 17:31:49] -> Building Protein Groups... +INFO: [17/02/2026 17:31:53] -> Annotating In-Source Fragmentation... +INFO: [17/02/2026 17:31:53] -> Calculating Run-Wise Protein Group FDR... +INFO: [17/02/2026 17:32:02] -> Annotating Protein Single Hits... +INFO: [17/02/2026 17:32:04] -> Normalizing Quantification... +INFO: [17/02/2026 17:32:04] -> Calculating Global CVs +INFO: [17/02/2026 17:32:06] -> Updating Identification Counts... +INFO: [17/02/2026 17:32:17] -> Subtracting background noise... +INFO: [17/02/2026 17:32:17] -> Resetting existing imputation... +INFO: [17/02/2026 17:32:17] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:32:20] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:32:21] -> Calculating MaxLFQ Protein Quantities... +INFO: [17/02/2026 17:32:38] -> Collapsing PTM-Locations... +INFO: [17/02/2026 17:32:38] -> PTM Stoichiometry calculation... +INFO: [17/02/2026 17:32:38] -> Calculating Condition CVs +INFO: [17/02/2026 17:32:45] -> Creating Protein Map... +INFO: [17/02/2026 17:32:45] -> Compiling Run Summary Information... +INFO: [17/02/2026 17:32:46] -> Running Post Analysis Processes... +INFO: [17/02/2026 17:33:57] -> Writing Summary Information... +INFO: [17/02/2026 17:33:57] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [17/02/2026 17:33:57] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [17/02/2026 17:33:57] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [17/02/2026 17:33:58] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [17/02/2026 17:33:58] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [17/02/2026 17:33:58] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [17/02/2026 17:33:58] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [17/02/2026 17:34:01] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [17/02/2026 17:34:01] -> Pipeline executed in 5.02m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [17/02/2026 17:40:23] -> Initializing Pipeline... +INFO: [17/02/2026 17:40:24] -> Calculating Global CVs +INFO: [17/02/2026 17:40:26] -> Calculating Profile Qvalues... +INFO: [17/02/2026 17:40:31] -> Initializing Protein Groups... +INFO: [17/02/2026 17:41:28] -> Building Protein Groups... +INFO: [17/02/2026 17:42:19] -> Updating Quantities... +INFO: [17/02/2026 17:42:36] -> Subtracting background noise... +INFO: [17/02/2026 17:42:36] -> Calculating Precursor Quantities... +INFO: [17/02/2026 17:42:36] -> Normalizing Quantification... +INFO: [17/02/2026 17:42:36] -> Cross-run normalization disabled! +INFO: [17/02/2026 17:42:36] -> Resetting existing imputation... +INFO: [17/02/2026 17:42:36] -> Calculating Run-Wise Protein Group FDR... +INFO: [17/02/2026 17:42:49] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:42:53] -> Calculating Protein Quantities... +INFO: [17/02/2026 17:42:53] -> Calculating MaxLFQ Protein Quantities... +INFO: [17/02/2026 17:43:10] -> Collapsing PTM-Locations... +INFO: [17/02/2026 17:43:10] -> PTM Stoichiometry calculation... +INFO: [17/02/2026 17:43:11] -> Annotating Protein Single Hits... +INFO: [17/02/2026 17:43:14] -> Calculating Global CVs +INFO: [17/02/2026 17:43:16] -> Updating Identification Counts... +INFO: [17/02/2026 17:43:36] -> Calculating Condition CVs +INFO: [17/02/2026 17:43:43] -> Creating Protein Map... +INFO: [17/02/2026 17:43:43] -> Running Post Analysis Processes... +INFO: [17/02/2026 17:44:52] -> Writing Summary Information... +INFO: [17/02/2026 17:44:52] -> Unique precursors: 210’596 of 228’573 | modified peptides: 179’152 of 191’699 | peptides: 177’709 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 210’366 of 228’573 | modified peptides: 178’962 of 191’699 | peptides: 177’526 of 190’204 | protein groups: 13’498 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 210’496 of 228’573 | modified peptides: 178’894 of 191’699 | peptides: 177’453 of 190’204 | protein groups: 13’488 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 212’856 of 228’573 | modified peptides: 180’338 of 191’699 | peptides: 178’899 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 211’901 of 228’573 | modified peptides: 179’833 of 191’699 | peptides: 178’395 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 212’501 of 228’573 | modified peptides: 180’261 of 191’699 | peptides: 178’820 of 190’204 | protein groups: 13’478 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [17/02/2026 17:44:52] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [17/02/2026 17:44:56] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [17/02/2026 17:44:56] -> Pipeline executed in 4.55m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 08:51:52] -> Initializing Pipeline... +INFO: [19/02/2026 08:51:52] -> Calculating Global CVs +INFO: [19/02/2026 08:51:54] -> Calculating Profile Qvalues... +INFO: [19/02/2026 08:51:57] -> Updating Quantities... +INFO: [19/02/2026 08:52:19] -> Subtracting background noise... +INFO: [19/02/2026 08:52:19] -> Calculating Precursor Quantities... +INFO: [19/02/2026 08:52:19] -> Normalizing Quantification... +INFO: [19/02/2026 08:52:19] -> Cross-run normalization disabled! +INFO: [19/02/2026 08:52:19] -> Resetting existing imputation... +INFO: [19/02/2026 08:52:19] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 08:52:29] -> Calculating Protein Quantities... +INFO: [19/02/2026 08:52:32] -> Calculating Protein Quantities... +INFO: [19/02/2026 08:52:32] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 08:52:46] -> Collapsing PTM-Locations... +INFO: [19/02/2026 08:52:46] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 08:52:46] -> Annotating Protein Single Hits... +INFO: [19/02/2026 08:52:48] -> Calculating Global CVs +INFO: [19/02/2026 08:52:50] -> Updating Identification Counts... +INFO: [19/02/2026 08:53:04] -> Calculating Condition CVs +INFO: [19/02/2026 08:53:11] -> Creating Protein Map... +INFO: [19/02/2026 08:53:11] -> Running Post Analysis Processes... +INFO: [19/02/2026 08:53:54] -> Writing Summary Information... +INFO: [19/02/2026 08:53:54] -> Unique precursors: 210’600 of 228’573 | modified peptides: 179’156 of 191’699 | peptides: 177’713 of 190’204 | protein groups: 13’484 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 210’388 of 228’573 | modified peptides: 178’984 of 191’699 | peptides: 177’548 of 190’204 | protein groups: 13’516 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 210’510 of 228’573 | modified peptides: 178’908 of 191’699 | peptides: 177’467 of 190’204 | protein groups: 13’498 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 212’884 of 228’573 | modified peptides: 180’366 of 191’699 | peptides: 178’927 of 190’204 | protein groups: 13’494 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 211’931 of 228’573 | modified peptides: 179’863 of 191’699 | peptides: 178’425 of 190’204 | protein groups: 13’478 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 212’534 of 228’573 | modified peptides: 180’294 of 191’699 | peptides: 178’853 of 190’204 | protein groups: 13’500 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 08:53:54] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 08:53:57] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 08:53:57] -> Pipeline executed in 2.09m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:38:08] -> Initializing Pipeline... +INFO: [19/02/2026 11:38:09] -> Calculating Global CVs +INFO: [19/02/2026 11:38:11] -> Calculating Profile Qvalues... +INFO: [19/02/2026 11:38:14] -> Initializing Protein Groups... +INFO: [19/02/2026 11:38:52] -> Building Protein Groups... +INFO: [19/02/2026 11:39:27] -> Updating Quantities... +INFO: [19/02/2026 11:39:52] -> Subtracting background noise... +INFO: [19/02/2026 11:39:52] -> Calculating Precursor Quantities... +INFO: [19/02/2026 11:39:52] -> Normalizing Quantification... +INFO: [19/02/2026 11:39:52] -> Cross-run normalization disabled! +INFO: [19/02/2026 11:39:52] -> Resetting existing imputation... +INFO: [19/02/2026 11:39:52] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 11:40:02] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:40:04] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:40:04] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 11:40:18] -> Collapsing PTM-Locations... +INFO: [19/02/2026 11:40:18] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 11:40:18] -> Annotating Protein Single Hits... +INFO: [19/02/2026 11:40:20] -> Calculating Global CVs +INFO: [19/02/2026 11:40:22] -> Updating Identification Counts... +INFO: [19/02/2026 11:40:36] -> Calculating Condition CVs +INFO: [19/02/2026 11:40:42] -> Creating Protein Map... +INFO: [19/02/2026 11:40:42] -> Running Post Analysis Processes... +INFO: [19/02/2026 11:41:25] -> Writing Summary Information... +INFO: [19/02/2026 11:41:25] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 11:41:25] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 11:41:28] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:41:28] -> Pipeline executed in 3.32m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:45:50] -> Initializing Pipeline... +INFO: [19/02/2026 11:45:50] -> Calculating Global CVs +INFO: [19/02/2026 11:45:52] -> Calculating Profile Qvalues... +INFO: [19/02/2026 11:45:55] -> Updating Quantities... +INFO: [19/02/2026 11:46:18] -> Subtracting background noise... +INFO: [19/02/2026 11:46:18] -> Calculating Precursor Quantities... +INFO: [19/02/2026 11:46:18] -> Normalizing Quantification... +INFO: [19/02/2026 11:46:18] -> Cross-run normalization disabled! +INFO: [19/02/2026 11:46:18] -> Resetting existing imputation... +INFO: [19/02/2026 11:46:18] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 11:46:31] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:46:33] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:46:33] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 11:46:48] -> Collapsing PTM-Locations... +INFO: [19/02/2026 11:46:48] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 11:46:48] -> Annotating Protein Single Hits... +INFO: [19/02/2026 11:46:50] -> Calculating Global CVs +INFO: [19/02/2026 11:46:52] -> Updating Identification Counts... +INFO: [19/02/2026 11:47:07] -> Calculating Condition CVs +INFO: [19/02/2026 11:47:13] -> Creating Protein Map... +INFO: [19/02/2026 11:47:13] -> Running Post Analysis Processes... +INFO: [19/02/2026 11:47:59] -> Writing Summary Information... +INFO: [19/02/2026 11:47:59] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 11:47:59] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 11:48:01] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:48:01] -> Pipeline executed in 2.2m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:51:52] -> Initializing Pipeline... +INFO: [19/02/2026 11:51:53] -> Calculating Global CVs +INFO: [19/02/2026 11:51:55] -> Calculating Profile Qvalues... +INFO: [19/02/2026 11:51:58] -> Updating Quantities... +INFO: [19/02/2026 11:52:18] -> Subtracting background noise... +INFO: [19/02/2026 11:52:18] -> Calculating Precursor Quantities... +INFO: [19/02/2026 11:52:19] -> Normalizing Quantification... +INFO: [19/02/2026 11:52:19] -> Cross-run normalization disabled! +INFO: [19/02/2026 11:52:19] -> Resetting existing imputation... +INFO: [19/02/2026 11:52:19] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 11:52:29] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:52:32] -> Calculating Protein Quantities... +INFO: [19/02/2026 11:52:32] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 11:52:46] -> Collapsing PTM-Locations... +INFO: [19/02/2026 11:52:46] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 11:52:46] -> Annotating Protein Single Hits... +INFO: [19/02/2026 11:52:48] -> Calculating Global CVs +INFO: [19/02/2026 11:52:49] -> Updating Identification Counts... +INFO: [19/02/2026 11:53:04] -> Calculating Condition CVs +INFO: [19/02/2026 11:53:11] -> Creating Protein Map... +INFO: [19/02/2026 11:53:11] -> Running Post Analysis Processes... +INFO: [19/02/2026 11:53:58] -> Writing Summary Information... +INFO: [19/02/2026 11:53:58] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 11:53:58] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 11:54:01] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 11:54:01] -> Pipeline executed in 2.14m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:30:42] -> Initializing Pipeline... +INFO: [19/02/2026 13:30:42] -> Calculating Global CVs +INFO: [19/02/2026 13:30:44] -> Calculating Profile Qvalues... +INFO: [19/02/2026 13:30:48] -> Updating Quantities... +INFO: [19/02/2026 13:31:11] -> Subtracting background noise... +INFO: [19/02/2026 13:31:11] -> Calculating Precursor Quantities... +INFO: [19/02/2026 13:31:11] -> Normalizing Quantification... +INFO: [19/02/2026 13:31:11] -> Cross-run normalization disabled! +INFO: [19/02/2026 13:31:11] -> Resetting existing imputation... +INFO: [19/02/2026 13:31:11] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 13:31:21] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:31:24] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:31:24] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 13:31:38] -> Collapsing PTM-Locations... +INFO: [19/02/2026 13:31:38] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 13:31:38] -> Annotating Protein Single Hits... +INFO: [19/02/2026 13:31:40] -> Calculating Global CVs +INFO: [19/02/2026 13:31:42] -> Updating Identification Counts... +INFO: [19/02/2026 13:31:48] -> Calculating Condition CVs +INFO: [19/02/2026 13:31:54] -> Creating Protein Map... +INFO: [19/02/2026 13:31:54] -> Running Post Analysis Processes... +INFO: [19/02/2026 13:32:40] -> Writing Summary Information... +INFO: [19/02/2026 13:32:40] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 13:32:40] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 13:32:44] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:32:44] -> Pipeline executed in 2.04m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:44:41] -> Initializing Pipeline... +INFO: [19/02/2026 13:44:42] -> Calculating Global CVs +INFO: [19/02/2026 13:44:44] -> Calculating Profile Qvalues... +INFO: [19/02/2026 13:44:47] -> Updating Quantities... +INFO: [19/02/2026 13:45:16] -> Subtracting background noise... +INFO: [19/02/2026 13:45:16] -> Calculating Precursor Quantities... +INFO: [19/02/2026 13:45:16] -> Normalizing Quantification... +INFO: [19/02/2026 13:45:16] -> Cross-run normalization disabled! +INFO: [19/02/2026 13:45:16] -> Resetting existing imputation... +INFO: [19/02/2026 13:45:16] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 13:45:26] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:45:29] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:45:29] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 13:45:43] -> Collapsing PTM-Locations... +INFO: [19/02/2026 13:45:43] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 13:45:43] -> Annotating Protein Single Hits... +INFO: [19/02/2026 13:45:45] -> Calculating Global CVs +INFO: [19/02/2026 13:45:47] -> Updating Identification Counts... +INFO: [19/02/2026 13:45:54] -> Calculating Condition CVs +INFO: [19/02/2026 13:46:01] -> Creating Protein Map... +INFO: [19/02/2026 13:46:01] -> Running Post Analysis Processes... +INFO: [19/02/2026 13:46:44] -> Writing Summary Information... +INFO: [19/02/2026 13:46:44] -> Unique precursors: 208’788 of 228’573 | modified peptides: 177’847 of 191’699 | peptides: 176’410 of 190’204 | protein groups: 13’484 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 208’104 of 228’573 | modified peptides: 177’278 of 191’699 | peptides: 175’848 of 190’204 | protein groups: 13’515 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 208’555 of 228’573 | modified peptides: 177’443 of 191’699 | peptides: 176’011 of 190’204 | protein groups: 13’496 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 210’944 of 228’573 | modified peptides: 178’785 of 191’699 | peptides: 177’348 of 190’204 | protein groups: 13’490 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 210’092 of 228’573 | modified peptides: 178’452 of 191’699 | peptides: 177’019 of 190’204 | protein groups: 13’478 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 210’447 of 228’573 | modified peptides: 178’686 of 191’699 | peptides: 177’250 of 190’204 | protein groups: 13’499 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 13:46:44] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 13:46:48] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:46:48] -> Pipeline executed in 2.12m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:50:54] -> Initializing Pipeline... +INFO: [19/02/2026 13:50:55] -> Updating Quantities... +INFO: [19/02/2026 13:51:18] -> Subtracting background noise... +INFO: [19/02/2026 13:51:18] -> Calculating Precursor Quantities... +INFO: [19/02/2026 13:51:18] -> Normalizing Quantification... +INFO: [19/02/2026 13:51:18] -> Cross-run normalization disabled! +INFO: [19/02/2026 13:51:18] -> Resetting existing imputation... +INFO: [19/02/2026 13:51:18] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 13:51:28] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:51:30] -> Calculating Protein Quantities... +INFO: [19/02/2026 13:51:30] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 13:51:44] -> Collapsing PTM-Locations... +INFO: [19/02/2026 13:51:44] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 13:51:45] -> Calculating Global CVs +INFO: [19/02/2026 13:51:46] -> Updating Identification Counts... +INFO: [19/02/2026 13:52:00] -> Calculating Condition CVs +INFO: [19/02/2026 13:52:06] -> Creating Protein Map... +INFO: [19/02/2026 13:52:06] -> Running Post Analysis Processes... +INFO: [19/02/2026 13:52:52] -> Writing Summary Information... +INFO: [19/02/2026 13:52:52] -> Unique precursors: 208’788 of 228’573 | modified peptides: 177’847 of 191’699 | peptides: 176’410 of 190’204 | protein groups: 13’484 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 208’104 of 228’573 | modified peptides: 177’278 of 191’699 | peptides: 175’848 of 190’204 | protein groups: 13’515 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 208’555 of 228’573 | modified peptides: 177’443 of 191’699 | peptides: 176’011 of 190’204 | protein groups: 13’496 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 210’944 of 228’573 | modified peptides: 178’785 of 191’699 | peptides: 177’348 of 190’204 | protein groups: 13’490 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 210’092 of 228’573 | modified peptides: 178’452 of 191’699 | peptides: 177’019 of 190’204 | protein groups: 13’478 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 210’447 of 228’573 | modified peptides: 178’686 of 191’699 | peptides: 177’250 of 190’204 | protein groups: 13’499 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 13:52:52] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 13:52:56] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 13:52:56] -> Pipeline executed in 2.02m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 14:31:26] -> Initializing Pipeline... +INFO: [19/02/2026 14:31:26] -> Updating Quantities... +INFO: [19/02/2026 14:31:49] -> Subtracting background noise... +INFO: [19/02/2026 14:31:49] -> Calculating Precursor Quantities... +INFO: [19/02/2026 14:31:49] -> Normalizing Quantification... +INFO: [19/02/2026 14:31:49] -> Cross-run normalization disabled! +INFO: [19/02/2026 14:31:49] -> Resetting existing imputation... +INFO: [19/02/2026 14:31:49] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 14:31:59] -> Calculating Protein Quantities... +INFO: [19/02/2026 14:32:02] -> Calculating Protein Quantities... +INFO: [19/02/2026 14:32:02] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 14:32:15] -> Collapsing PTM-Locations... +INFO: [19/02/2026 14:32:15] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 14:32:16] -> Calculating Global CVs +INFO: [19/02/2026 14:32:17] -> Updating Identification Counts... +INFO: [19/02/2026 14:32:23] -> Calculating Condition CVs +INFO: [19/02/2026 14:32:30] -> Creating Protein Map... +INFO: [19/02/2026 14:32:30] -> Running Post Analysis Processes... +INFO: [19/02/2026 14:33:14] -> Writing Summary Information... +INFO: [19/02/2026 14:33:14] -> Unique precursors: 208’788 of 228’573 | modified peptides: 177’847 of 191’699 | peptides: 176’410 of 190’204 | protein groups: 13’484 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 208’104 of 228’573 | modified peptides: 177’278 of 191’699 | peptides: 175’848 of 190’204 | protein groups: 13’515 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 208’555 of 228’573 | modified peptides: 177’443 of 191’699 | peptides: 176’011 of 190’204 | protein groups: 13’496 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 210’944 of 228’573 | modified peptides: 178’785 of 191’699 | peptides: 177’348 of 190’204 | protein groups: 13’490 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 210’092 of 228’573 | modified peptides: 178’452 of 191’699 | peptides: 177’019 of 190’204 | protein groups: 13’478 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 210’447 of 228’573 | modified peptides: 178’686 of 191’699 | peptides: 177’250 of 190’204 | protein groups: 13’499 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 14:33:14] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 14:33:18] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 14:33:18] -> Pipeline executed in 1.87m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 14:59:09] -> Initializing Pipeline... +INFO: [19/02/2026 14:59:09] -> Calculating Global CVs +INFO: [19/02/2026 14:59:11] -> Calculating Profile Qvalues... +INFO: [19/02/2026 14:59:14] -> Updating Quantities... +INFO: [19/02/2026 14:59:43] -> Subtracting background noise... +INFO: [19/02/2026 14:59:43] -> Calculating Precursor Quantities... +INFO: [19/02/2026 14:59:43] -> Normalizing Quantification... +INFO: [19/02/2026 14:59:43] -> Cross-run normalization disabled! +INFO: [19/02/2026 14:59:43] -> Resetting existing imputation... +INFO: [19/02/2026 14:59:44] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 14:59:54] -> Calculating Protein Quantities... +INFO: [19/02/2026 14:59:56] -> Calculating Protein Quantities... +INFO: [19/02/2026 14:59:56] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 15:00:10] -> Collapsing PTM-Locations... +INFO: [19/02/2026 15:00:10] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 15:00:10] -> Annotating Protein Single Hits... +INFO: [19/02/2026 15:00:13] -> Calculating Global CVs +INFO: [19/02/2026 15:00:14] -> Updating Identification Counts... +INFO: [19/02/2026 15:00:30] -> Calculating Condition CVs +INFO: [19/02/2026 15:00:36] -> Creating Protein Map... +INFO: [19/02/2026 15:00:36] -> Running Post Analysis Processes... +INFO: [19/02/2026 15:01:19] -> Writing Summary Information... +INFO: [19/02/2026 15:01:19] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 15:01:19] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 15:01:23] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 15:01:23] -> Pipeline executed in 2.24m - Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 15:04:05] -> Initializing Pipeline... +INFO: [19/02/2026 15:04:05] -> Calculating Global CVs +INFO: [19/02/2026 15:04:07] -> Calculating Profile Qvalues... +INFO: [19/02/2026 15:04:10] -> Updating Quantities... +INFO: [19/02/2026 15:04:31] -> Subtracting background noise... +INFO: [19/02/2026 15:04:31] -> Calculating Precursor Quantities... +INFO: [19/02/2026 15:04:31] -> Normalizing Quantification... +INFO: [19/02/2026 15:04:31] -> Cross-run normalization disabled! +INFO: [19/02/2026 15:04:31] -> Resetting existing imputation... +INFO: [19/02/2026 15:04:31] -> Calculating Run-Wise Protein Group FDR... +INFO: [19/02/2026 15:04:41] -> Calculating Protein Quantities... +INFO: [19/02/2026 15:04:44] -> Calculating Protein Quantities... +INFO: [19/02/2026 15:04:44] -> Calculating MaxLFQ Protein Quantities... +INFO: [19/02/2026 15:04:58] -> Collapsing PTM-Locations... +INFO: [19/02/2026 15:04:58] -> PTM Stoichiometry calculation... +INFO: [19/02/2026 15:04:58] -> Annotating Protein Single Hits... +INFO: [19/02/2026 15:05:00] -> Calculating Global CVs +INFO: [19/02/2026 15:05:02] -> Updating Identification Counts... +INFO: [19/02/2026 15:05:17] -> Calculating Condition CVs +INFO: [19/02/2026 15:05:23] -> Creating Protein Map... +INFO: [19/02/2026 15:05:23] -> Running Post Analysis Processes... +INFO: [19/02/2026 15:06:10] -> Writing Summary Information... +INFO: [19/02/2026 15:06:10] -> Unique precursors: 208’784 of 228’573 | modified peptides: 177’843 of 191’699 | peptides: 176’406 of 190’204 | protein groups: 13’482 (Qvalue <= 0.01) for run #1 "LFQ_24min_500ng_2Th_3ms_A_01.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 208’083 of 228’573 | modified peptides: 177’257 of 191’699 | peptides: 175’827 of 190’204 | protein groups: 13’497 (Qvalue <= 0.01) for run #2 "LFQ_24min_500ng_2Th_3ms_A_02.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 208’542 of 228’573 | modified peptides: 177’430 of 191’699 | peptides: 175’998 of 190’204 | protein groups: 13’486 (Qvalue <= 0.01) for run #3 "LFQ_24min_500ng_2Th_3ms_A_03.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 210’919 of 228’573 | modified peptides: 178’760 of 191’699 | peptides: 177’323 of 190’204 | protein groups: 13’473 (Qvalue <= 0.01) for run #4 "LFQ_24min_500ng_2Th_3ms_B_01.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 210’065 of 228’573 | modified peptides: 178’425 of 191’699 | peptides: 176’992 of 190’204 | protein groups: 13’460 (Qvalue <= 0.01) for run #5 "LFQ_24min_500ng_2Th_3ms_B_02.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 210’415 of 228’573 | modified peptides: 178’654 of 191’699 | peptides: 177’218 of 190’204 | protein groups: 13’477 (Qvalue <= 0.01) for run #6 "LFQ_24min_500ng_2Th_3ms_B_03.raw" +INFO: [19/02/2026 15:06:10] -> Unique precursors: 215’205 of 228’573 | modified peptides: 182’186 of 191’699 | peptides: 180’733 of 190’204 | protein groups: 13’560 (Qvalue <= 0.01) for whole experiment "4438_3ProteomeMix_Astral_SN20_4" + +INFO: [19/02/2026 15:06:13] -> Current Experiment had 0 Warnings and 0 Errors. +INFO: [19/02/2026 15:06:13] -> Pipeline executed in 2.15m - Current Experiment had 0 Warnings and 0 Errors. +[END-LOG] diff --git a/inst/extdata/spectronaut_example/SN_unit_test_subset.tsv b/inst/extdata/spectronaut_example/SN_unit_test_subset.tsv new file mode 100644 index 00000000..ee0681db --- /dev/null +++ b/inst/extdata/spectronaut_example/SN_unit_test_subset.tsv @@ -0,0 +1,201 @@ +PG.Qvalue PG.Cscore PG.ProteinGroups PG.Genes PG.ProteinDescriptions PG.NrOfStrippedSequencesIdentified..Experiment.wide. PG.Completeness PG.CV X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.Cscore..Run.Wise. X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.Cscore..Run.Wise. X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.Cscore..Run.Wise. X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.Cscore..Run.Wise. X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.Cscore..Run.Wise. X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.Cscore..Run.Wise. X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.QValue..Run.Wise. X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.QValue..Run.Wise. X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.QValue..Run.Wise. X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.QValue..Run.Wise. X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.QValue..Run.Wise. X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.QValue..Run.Wise. X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.RunEvidenceCount X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.RunEvidenceCount X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.RunEvidenceCount X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.RunEvidenceCount X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.RunEvidenceCount X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.RunEvidenceCount X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.IsSingleHit X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.IsSingleHit X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.IsSingleHit X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.IsSingleHit X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.IsSingleHit X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.IsSingleHit X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.NrOfPrecursorsUsedForQuantification X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.NrOfPrecursorsUsedForQuantification X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.NrOfPrecursorsUsedForQuantification X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.NrOfPrecursorsUsedForQuantification X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.NrOfPrecursorsUsedForQuantification X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.NrOfPrecursorsUsedForQuantification X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.Quantity X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.Quantity X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.Quantity X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.Quantity X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.Quantity X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.Quantity X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.MS1Quantity X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.MS1Quantity X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.MS1Quantity X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.MS1Quantity X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.MS1Quantity X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.MS1Quantity X.1..LFQ_24min_500ng_2Th_3ms_A_01.raw.PG.IBAQ X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.IBAQ X.3..LFQ_24min_500ng_2Th_3ms_A_03.raw.PG.IBAQ X.4..LFQ_24min_500ng_2Th_3ms_B_01.raw.PG.IBAQ X.5..LFQ_24min_500ng_2Th_3ms_B_02.raw.PG.IBAQ X.6..LFQ_24min_500ng_2Th_3ms_B_03.raw.PG.IBAQ +1.1327686105987672e-5 6.6319942 P38738 OCA5 Oxidant-induced cell-cycle arrest protein 5 6 100 0.4031501316867918 6.6319942 4.3641124 6.5788507 5.042108 6.233877 6.21233 1.939275444717962e-5 1.7429758714240085e-4 2.8484252234695445e-5 1.2915557909475204e-4 5.88691699965434e-5 4.840532461751548e-5 4 5 5 6 5 6 False False False False False False 4 5 5 5 5 5 496.65643310546875 274.0443115234375 447.5696716308594 921.5775146484375 808.8209228515625 757.10906982421875 165247.75 530953.25 398301.03125 282941.5 366187.84375 466352.28125 45.2 44 62.6 133.4 119.4 127.4 +0 19.623491 P61513 RPL37A 60S ribosomal protein L37a 6 100 0.05424560491582894 19.623491 13.959788 13.323507 7.4273944 8.399146 18.897532000000002 3.353157644116831e-83 9.770296798790272e-51 3.231542505519457e-37 1.1331412120044977e-6 5.896607300492438e-6 8.444477606670243e-152 9 8 9 9 9 9 False False False False False False 8 8 9 8 8 7 95518.3828125 91731.9140625 97559.9375 103888.2109375 90951.2734375 101894.46875 1622660.625 2588721.25 2727701.75 1724313 2533432.75 2634618 92093.898 91045.102 92300.797 95221.398 87680.398 93488.297 +0 22.582043 Q6ZW49 PAXIP1 PAX-interacting protein 1 22 100 0.08659014959779181 13.498377 11.460211 7.725178 6.4951673 15.8968315 22.582043 1.225152984440797e-66 8.912508078567706e-46 8.206722729764626e-6 3.073677139262857e-5 1.8333414960670189e-68 2.68140687405456e-177 20 21 20 22 21 21 False False False False False False 12 12 11 10 9 13 1541.033203125 1276.5418701171875 1448.19140625 1403.119384765625 1358.52099609375 1621.431884765625 376178.5 791278.8125 783357 505300.4375 763879 743628.125 285.9 315.6 289.4 348.1 290.3 317.9 +0 23.025234 P16333 NCK1 Cytoplasmic protein NCK1 21 100 0.04465023053003773 19.171465 13.2194 13.895691 19.446474 12.657031 23.025234 6.258214427213085e-82 3.065230726576039e-49 1.4668982135235885e-47 9.457682347657007e-146 1.738424194787072e-29 1.7073719922372055e-180 22 22 22 23 22 23 False False False False False False 20 18 18 19 19 17 4583.63623046875 4946.19482421875 4779.00048828125 4874.5185546875 4464.123046875 4468.53564453125 103253.0234375 208286.046875 175926.015625 168105.734375 216046.25 207124.65625 1590.3 1717.5 1682.5 1702.5 1534.8 1539.1 +3.9419219827076184e-230 16.147139 P40038 PCL6 PHO85 cyclin-6 13 100 0.3806597609051969 7.404665 8.037031 7.4720874 16.041307 14.838529 16.147139 4.1402602211681096e-7 4.085257345615119e-11 9.815835598697338e-6 5.1692229178455344e-127 3.604901642634623e-61 3.551163748827659e-109 15 16 15 15 15 16 False False False False False False 10 9 7 13 10 13 1598.85009765625 1261.198486328125 1391.38037109375 2983.636474609375 2806.228515625 2913.803466796875 367010.625 625405.375 483676.15625 723044.5 986882.3125 1191445.375 492 408.8 401.2 920.1 836.8 904.8 +0 23.031116 Q9Y4C8 RBM19 Probable RNA-binding protein 19 23 100 0.038497010424555875 19.690264 19.000181 23.031116 21.15752 16.047846 19.859274 2.1745383951150256e-83 1.7732504754173994e-61 3.1792036286030708e-83 1.3083691425358488e-155 7.546715545452872e-69 2.7780064276009344e-158 24 24 24 24 21 23 False False False False False False 18 18 17 18 17 17 3087.5595703125 3327.0947265625 3230.35693359375 3386.784423828125 3117.45068359375 3123.149658203125 159552.984375 270939.15625 264119.21875 261372.03125 318317 360009.03125 604.6 679.3 659.4 673.1 596.8 556.9 +0 19.754065 Q2M389 WASHC4 WASH complex subunit 4 29 100 0.06450890090959742 17.661938 17.678797 15.511544 15.437175 14.965862 19.754065 9.898610987466769e-78 1.387535379082958e-58 6.832561178202413e-63 8.119043472713644e-124 1.9260351487505896e-63 1.4400150381041878e-157 31 31 29 31 31 31 False False False False False False 24 23 21 19 22 21 4124.6337890625 3690.35205078125 3944.508544921875 4424.98876953125 3964.98388671875 4282.39892578125 554614.875 1176032.875 1021452.75 839415.5625 1285735.625 1208109.125 684 659 640.7 706.1 656 668.8 +3.106755094733319e-95 12.5293 Q9NWT8 AURKAIP1 Aurora kinase A-interacting protein 2 100 0.03710500814420888 9.158568 7.6544385 7.709984 7.1366167 6.75706 12.5293 1.5382052679674985e-23 2.2752736608680596e-8 8.28557062505465e-6 6.4274963918435915e-6 3.043383206505967e-5 4.0896138822874314e-27 2 2 2 2 2 2 False False False False False False 2 2 2 2 2 2 14332.783203125 14708.5390625 15256.4775390625 15411.69921875 14730.8896484375 13959.1494140625 141717.328125 509512.3125 381016.75 415724.40625 773183.5625 785932.5625 3480.8 3680.3 3664.8 4106.9 3679.6 3687.4 +2.6552149436199465e-143 14.017916 Q3KQV9 UAP1L1 UDP-N-acetylhexosamine pyrophosphorylase-like protein 1 10 100 0.13478244919554938 7.2226048 5.8790627 14.017916 11.675113 7.190689 6.6716833 1.8036117960994436e-6 4.818927485314571e-5 5.726452158683896e-50 6.51588461233807e-69 1.5901245937633403e-5 2.6896207817223355e-5 8 8 10 9 9 9 False False False False False False 5 5 5 5 5 7 1106.2989501953125 1240.6295166015625 1548.9022216796875 1214.9554443359375 1534.1519775390625 1344.7745361328125 261969.65625 429041.71875 500730.1875 402975.5625 526026.5625 523395 190.4 213.2 227.9 209.1 229.4 209.8 +3.9090524132024634e-226 16.059443 Q8IXZ2 ZC3H3 Zinc finger CCCH domain-containing protein 3 24 100 0.04058608566986069 13.76453 8.010597 10.945071 8.369589 7.0072913 16.059443 2.5361021920441472e-67 6.799937651173319e-11 1.2817018601441016e-10 3.896048251857191e-14 2.072883817138914e-5 1.42047879528677e-106 25 25 25 24 24 24 False False False False False False 14 17 17 10 13 13 1055.7398681640625 1102.402587890625 1141.926513671875 1187.3031005859375 1134.0302734375 1094.02880859375 86502.5390625 91896.4296875 116103.2890625 80733.6328125 130445.5 119103.25 242.1 228.9 267.3 252.4 231.6 244.3 +0 22.271368 P18754 RCC1 Regulator of chromosome condensation 17 100 0.026277722778085193 22.271368 12.637164 18.541046 14.068678 18.93376 15.312104 8.629775564594893e-91 4.464004280943804e-48 9.19657169810019e-71 1.019148653330019e-116 2.221756539449279e-76 9.171393094609562e-85 22 22 22 22 22 22 False False False False False False 21 21 21 22 22 20 61067.87109375 63620.26953125 60537.23046875 61670.6640625 59304.95703125 59439.265625 644477.9375 1021464.3125 953946.75 897438.0625 1027582 1054406.125 19772.699 20665 19712.4 19478.301 19091 18884 +1.0236241143782522e-255 16.690882 P53049 YOR1 Oligomycin resistance ATP-dependent permease YOR1 30 100 0.3877254621945991 15.564349 8.308202 13.244938 14.532973 15.240679 16.690882 4.838107274284346e-72 1.257446933055545e-13 6.44906323223244e-36 4.1802658830807884e-119 8.534550871873142e-67 7.955493571327336e-125 28 30 28 32 32 31 False False False False False False 15 14 13 22 25 22 1485.990966796875 1372.0439453125 1371.4267578125 3000.512451171875 2837.091064453125 2999.536376953125 154950.484375 272473.84375 254373.5625 270409.78125 351016.1875 318015.1875 240.6 223.3 179.2 475 469.4 499.3 +5.301628266783444e-273 17.042543 P13134 KEX2 Kexin 8 100 0.3640782582311194 4.72701 7.244475 5.7024245 6.9442773 9.294029 17.042543 1.410688166135592e-4 1.5060484364703868e-6 7.484146995842161e-5 1.2032762050794369e-5 2.867318161024563e-6 2.4505724644444745e-135 7 8 7 8 8 8 False False False False False False 5 5 5 7 7 5 859.87786865234375 1102.6708984375 1040.5487060546875 2033.1102294921875 1640.4835205078125 2082.6982421875 1445223.125 1877262.375 2029723.5 2618007.75 3046601.75 2691616.75 132 159.7 147.2 314.8 259.2 305.3 +0 23.94269 Q6P1J9 CDC73 Parafibromin 34 100 0.024736414673410357 18.01476 23.94269 19.018562 16.278412 20.792772 21.86316 1.0478208981755765e-78 1.0038999401146202e-72 4.813517611207349e-72 2.816027675963836e-128 2.1609347651286654e-81 3.511587842883438e-172 38 38 39 40 40 39 False False False False False False 30 33 36 33 31 36 12896.9033203125 12577.791015625 12611.171875 13332.2138671875 12488.6484375 12609.2353515625 119965.375 222327.109375 231810.765625 161873.203125 228112.171875 244943.21875 5898.5 5830.5 5879.9 6133.2 5591.6 5777.1 +0 18.647291 Q86SX6 GLRX5 Glutaredoxin-related protein 5, mitochondrial 3 100 0.04934359978599035 16.281412 18.647291 18.597076 14.638437 15.920296 16.208258 5.7810957821512595e-74 1.05256190601537e-60 6.5254643115744334e-71 1.192304217904747e-119 1.5982321959005142e-68 5.846545595723212e-111 4 4 4 4 4 4 False False False False False False 4 4 4 4 4 4 6467.5517578125 6430.20751953125 6407.541015625 6577.80322265625 5784.2314453125 6012.35205078125 156295.796875 330087.09375 320948.65625 209524.953125 302519.09375 294903.0625 2549.2 2533.8 2521.6 2607.4 2286.3 2374.8 +4.249636805990629e-182 15.034363 Q9NS18 GLRX2 Glutaredoxin-2, mitochondrial 4 100 0.06757369478547756 8.616033 15.034363 9.914403 7.063113 7.389803 11.643617 1.117963360519825e-16 5.9694744088224835e-53 6.166472867791292e-7 8.521827332530877e-6 1.2685426350739626e-5 9.904924809813292e-17 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 1321.4429931640625 1545.4105224609375 1500.17333984375 1392.431884765625 1348.399169921875 1327.449951171875 25772.576171875 37602.27734375 35538.32421875 31813.263671875 46082.19921875 46419.84375 573.2 662.5 660.5 635.4 587.5 602.7 +0 23.66284 P20424 SRP54 Signal recognition particle subunit SRP54 18 100 0.3421670730294102 18.885075 19.712383 23.66284 22.323166 16.19433 21.615503 3.9860474110348234e-81 4.620317994274596e-63 4.761496382994909e-85 1.654495085171066e-162 3.191055172017878e-69 1.9681733168809715e-170 21 21 21 21 21 21 False False False False False False 17 17 15 19 19 19 13029.07421875 13229.236328125 13089.904296875 25178.41015625 24429.81640625 25419.216796875 220165.875 424165.25 479659.53125 382510.40625 753385.25 770496.8125 3048.6 3190.3 3096.6 6006.9 5640.2 6022.9 +9.791864427023604e-239 16.33332 P09323 nagE PTS system N-acetylglucosamine-specific EIICBA component 5 100 0.3621016812670918 16.33332 8.455567 7.379491 5.764433 8.679898 10.987911 4.1876116897135345e-74 3.8680616772312005e-15 1.0237510136633803e-5 6.975317293228584e-5 4.695583520627154e-6 1.7341677368410823e-11 6 6 6 6 6 6 False False False False False False 6 6 6 5 5 5 1596.106201171875 1764.2073974609375 1768.525390625 976.5753173828125 755.3067626953125 887.870849609375 44329.97265625 76060.7890625 90404.5234375 37373.6875 54676.73828125 51491.2265625 242.1 278.4 288.2 154 122.8 140.4 +0 22.808651 O60610 DIAPH1 Protein diaphanous homolog 1 50 100 0.03256043711150509 22.239622 20.37884 13.915327 20.183142 22.60766 22.808651 1.0614600798666866e-90 1.4784800069446255e-64 6.079681460843626e-48 5.713544278516274e-150 2.2260539620526374e-86 6.261176542566087e-179 60 61 60 60 61 58 False False False False False False 51 51 51 48 51 49 22558.4140625 22637.30859375 22699.890625 23210.712890625 21241.99609375 21694.78125 317819.75 607831.375 563068.8125 378649.34375 554283.75 596969.625 5415.6 5842.7 5439.4 6092.9 5509 5710.6 +0 18.901325 P37297 STT4 Phosphatidylinositol 4-kinase STT4 35 100 0.3711978880987538 16.35014 15.427895 12.160047 17.89801 15.975809 18.901325 3.773323063269643e-74 8.994635914045791e-54 6.374347081337209e-21 4.383144041447661e-137 1.1515960761216102e-68 7.964567177867014e-152 32 34 35 38 38 38 False False False False False False 18 22 16 24 27 28 2464.052490234375 2483.302490234375 2330.830078125 4959.79296875 4971.125 4786.359375 324238.5 619465.875 517895.90625 668579.1875 911410.1875 902419.875 314 334 301.2 651.6 637.4 618.1 +1.6670574850637194e-153 14.29791 Q5JTD0 TJAP1 Tight junction-associated protein 1 15 100 0.09285448100162907 13.06288 8.604801 7.463939 6.9968348 6.6726727 14.29791 1.5851418855068624e-65 9.68934437482579e-17 9.840727847710192e-6 1.0403672126298127e-5 3.4485472887545134e-5 2.40617594491323e-59 16 16 13 14 16 16 False False False False False False 8 9 9 10 10 11 1645.22216796875 1452.405029296875 1588.8001708984375 1722.782958984375 1341.7060546875 1675.40087890625 696129.125 1017494.1875 1768782.25 912447.8125 1781408.125 1476500.75 447.7 438.1 385.5 388.4 403.8 509.8 +0.002804037814452812 7.018695 Q8WYQ3 CHCHD10 Coiled-coil-helix-coiled-coil-helix domain-containing protein 10, mitochondrial 1 100 0.17749623900999936 3.8909576 7.018695 3.0819943 5.01536 5.7436705 4.950551 2.539611479759603e-4 5.73009634964195e-6 5.219851195477537e-4 1.3150585622966797e-4 9.348318972136645e-5 1.450926871743491e-4 1 1 1 1 1 1 True True True True True True 1 1 1 1 1 1 879.4591064453125 974.64471435546875 869.39788818359375 1261.8343505859375 1094.6260986328125 790.59039306640625 817044.375 2125177.25 2302654 101924.8203125 199526.046875 151463.78125 439.7 487.3 434.7 630.9 547.3 395.3 +4.1731949624542817e-05 5.147626 Q8WVP7 LMBR1 Limb region 1 protein homolog 3 100 0.2098246611559227 4.69111 5.147626 5.06183 4.428954 2.2039325 4.939192 1.4471671541933678e-4 9.640851024103068e-5 1.2464384319991272e-4 2.0082247882694535e-4 0.0012468518847237433 1.4610830643076078e-4 3 1 3 3 3 2 False False False False False False 3 1 3 3 3 2 466.8295593261719 473.25408935546875 502.9867858886719 361.4078369140625 375.9543151855469 277.5375671386719 56629.890625 63875.90234375 63388.7890625 65933.9921875 78477.9609375 70621.359375 74.2 48.9 74.5 56.7 56.8 52 +1.6062339696456915e-262 16.830729 Q05932 FPGS Folylpolyglutamate synthase, mitochondrial 14 100 0.07938845777582144 16.26129 16.830729 9.170822 16.502798 13.64785 15.942106 6.5427807729734005e-74 9.386379675435957e-57 2.9155376571768884e-6 1.7643818411424248e-129 3.4905540051167595e-42 4.802917759791224e-103 13 14 14 14 11 14 False False False False False False 11 10 11 11 8 9 2056.894775390625 2182.1318359375 1857.28466796875 2348.459228515625 2103.3017578125 2240.961669921875 102259.5703125 131474.875 122452.2265625 151868.921875 164034.4375 177512.96875 451.9 479.4 377.9 516.2 468.7 484.3 +0 18.365267 Q86TM6 SYVN1 E3 ubiquitin-protein ligase synoviolin 11 100 0.04856827631870399 14.332947 11.841705 10.594595 11.576743 18.365267 16.857166 8.557567835028881e-69 1.6220768103929057e-46 6.916642202459137e-9 1.4001158785299397e-66 7.1786393313848145e-75 9.680142302215276e-130 14 14 14 14 14 14 False False False False False False 12 14 11 13 10 12 7231.0849609375 7073.142578125 7072.578125 7335.5546875 6735.42919921875 6425.09765625 128014.8359375 229291.5625 229021.75 172067.09375 212239.8125 199576.53125 1504.6 1423.1 1429.4 1544.7 1344.5 1325.3 +0 21.825422 Q16643 DBN1 Drebrin 22 100 0.04354942454690229 21.825422 15.906688 16.611528 17.270582 16.838676 19.442684 1.6614240721423533e-89 8.819526945945649e-55 1.053316151444039e-65 1.2175156767361854e-133 7.034040677798828e-71 1.859816448350417e-155 28 28 28 28 28 28 False False False False False False 25 25 25 24 25 25 12404.7626953125 12168.919921875 12942.998046875 13473.5791015625 12038.978515625 12304.662109375 201288.34375 326980.625 349303.5 284382.78125 372783.375 377304.53125 3645 3724.7 3884.9 3847.2 3494.3 3570.4 +0 21.145529 P00572 CDC8 Thymidylate kinase 3 100 0.4419825514982732 19.173126 12.206848 6.8344674 13.879678 21.145529 16.127337 6.191272637970129e-82 3.144722911690416e-47 2.0089508910898815e-5 9.388302889992346e-116 2.3296311375250724e-82 1.3599220833023479e-108 3 3 3 3 3 3 False False False False False False 3 3 3 3 3 3 1043.8743896484375 1088.092041015625 888.1077880859375 2135.953369140625 2367.2607421875 2492.458984375 231523.09375 407665.40625 404296.25 436481.78125 736219 851497.5 418.8 381.4 308.9 655.9 1052.2 1176.9 +0 19.424767 P77258 nemA N-ethylmaleimide reductase 12 100 0.33638289697608525 14.386536 13.669254 17.755201 11.689718 8.554283 19.424767 6.203349403772588e-69 3.792302114296466e-50 1.1083398127888372e-68 2.9103584384373735e-69 5.175804049843203e-6 2.4531378449664474e-155 16 14 16 12 15 15 False False False False False False 13 12 10 11 10 10 5538.974609375 5793.4443359375 5546.3271484375 2903.177001953125 2970.482177734375 3091.80126953125 816351.5 1883598.5 1571529.75 1142135.375 1936419.875 1502143.125 1633.5 1636.1 1696.6 869.7 917.3 964.9 +0 18.62783 P20795 VPS33 Vacuolar protein sorting-associated protein 33 10 100 0.37704290059642515 7.233512 7.261628 7.6059995 18.62783 15.255412 13.446356 1.6707455219575204e-6 1.326619411065506e-6 8.88459724267993e-6 3.89296951437513e-141 7.777006346771387e-67 6.571662840327853e-42 11 11 10 12 12 12 False False False False False False 9 6 7 10 10 11 1324.3558349609375 1314.5223388671875 1360.3896484375 2659.721435546875 2797.73828125 2728.05078125 55750.171875 95733.2421875 104994.5234375 115814.265625 180943.546875 183516.671875 264.4 270.3 259 583.2 599.1 541.5 +0 20.810669999999998 Q9NVR0 KLHL11 Kelch-like protein 11 11 100 0.027812008868819467 8.97659 11.711616 6.995275 10.876312 7.2409186 20.810669999999998 3.894518188691928e-21 2.9047842020668633e-46 1.609689747383505e-5 2.951625407320423e-51 1.4898188445930862e-5 8.054771769089201e-165 12 12 12 12 11 12 False False False False False False 6 7 7 8 9 9 987.17706298828125 1071.282958984375 1034.8682861328125 1018.46728515625 1046.15625 1017.974365234375 57761.48828125 123643.7734375 109147.609375 106802.53125 214240.796875 170093.15625 203.8 240.9 246.7 212.7 178.1 237.1 +0 20.043001 P23528 CFL1 Cofilin-1 16 100 0.014918485683425544 19.34229 12.142002 12.399499 15.9472 20.043001 18.252586 2.0760877490692862e-82 4.209787290445805e-47 9.298693903103059e-24 1.6336441830927917e-126 2.3562271191556947e-79 1.6053664386821233e-147 22 22 22 22 22 22 False False False False False False 22 22 21 20 21 21 469595.75 476039.96875 476063.9375 477878.3125 462451.625 462421.375 13352142 18001664 17593070 13005178 16947426 17798660 256636.703 269988.312 273178.312 246141.406 254685.5 255778.594 +0 22.778923 Q07457 BRE1 E3 ubiquitin-protein ligase BRE1 29 100 0.36072184133795754 14.9782095 15.3083515 10.022723 20.162924 11.043589 22.778923 1.735816152776502e-70 1.5991393555272468e-53 3.8734700525663497e-7 7.479377891818257e-150 8.68778806723861e-12 1.0230123330436865e-178 31 33 32 34 34 33 False False False False False False 25 23 25 31 29 31 3118.412841796875 3233.354248046875 3130.953369140625 6377.84130859375 6091.60595703125 6299.70556640625 103256.3671875 187201.671875 173722.6875 152948.296875 245628.1875 258864.03125 760.4 804 787.1 1684.7 1560.7 1589.3 +0 19.324873 P32802 EMP70 Transmembrane 9 superfamily member 1 11 100 0.41076855844910826 13.18069 19.324873 10.559111 16.623938 13.475389 16.510668 7.951428553170382e-66 3.369003896507772e-62 9.672541878553326e-9 3.92029353240006e-130 8.982599692712503e-40 1.3212955185410883e-119 12 12 12 12 12 12 False False False False False False 10 7 8 12 10 12 4223.9287109375 3754.40673828125 4074.969482421875 8980.4228515625 7977.84912109375 9224.4853515625 55998.30078125 114546.796875 124757.5859375 132998.671875 240145.640625 239180.765625 770 676 748 1359.4 1302 1404.8 +0 20.711401 Q12242 RUP1 UBA domain-containing protein RUP1 13 100 0.3117527328494492 15.71683 13.718 17.029512 20.711401 12.497969 16.478926 1.897902523824144e-72 3.0256916023010242e-50 8.750221180100641e-67 5.09966671526147e-153 1.2427400077147554e-27 1.0727444979365379e-118 15 14 15 15 15 14 False False False False False False 11 10 8 11 12 13 2725.51171875 2400.755615234375 2547.090576171875 4707.3408203125 4305.85546875 4661.2919921875 104213.4140625 206825.03125 170846.09375 166259.5625 289658.25 273429.625 596.2 452.9 583.3 1088.3 1002.3 1087.3 +0 22.280928 O14646 CHD1 Chromodomain-helicase-DNA-binding protein 1 44 100 0.025907060003430456 22.280928 17.124939 10.438513 15.711534 16.162357 16.168127 8.095946960279279e-91 2.196862627265486e-57 2.7713939851095625e-8 2.8960142414807365e-125 3.850795508564173e-69 8.6118967312258e-110 53 55 53 54 53 53 False False False False False False 38 39 40 31 36 36 3755.374267578125 3753.791015625 3836.984130859375 3874.2861328125 3615.83837890625 3868.16845703125 76890.546875 136025.578125 133614.09375 108113.140625 151585.109375 150242.1875 826 848.4 845.6 831.7 782.8 822.6 +2.870611037339408e-6 8.512539 Q5VZM2 RRAGB Ras-related GTP-binding protein B 1 100 0.2442045484396024 8.512539 4.759228 7.0144176 4.153858 6.6689925 5.15142 1.6673730615760614e-15 1.308948236318936e-4 1.590982330783018e-5 2.4458963300537725e-4 3.4633925077528305e-5 1.2827512403463997e-4 1 1 1 1 1 1 False False False False False False 1 1 1 1 1 1 292.0044250488281 487.2829895019531 576.5531005859375 454.18524169921875 586.921142578125 385.6746520996094 60593.90625 72932.390625 131503.609375 19569.509765625 112918.359375 125784.65625 15.4 25.6 30.3 23.9 30.9 20.3 +0 20.43592 Q08754 BUD7 Bud site selection protein 7 13 100 0.34074319840369244 8.541952 8.701169 6.7234416 20.43592 13.659582 17.085264 7.842598530189075e-16 8.301315542581447e-18 2.373628693414169e-5 1.9971836309721563e-151 2.377688845501733e-42 1.2075444271760987e-136 11 12 12 12 13 12 False False False False False False 8 5 7 9 9 9 1874.7237548828125 1771.8271484375 1605.1434326171875 3437.4228515625 3375.37451171875 3077.76611328125 43019.54296875 79575.0078125 67023.78125 73767.625 96963.734375 110304.0859375 280.4 761.2 193.6 417.5 456.3 420 +3.0701901651823435e-238 16.322678 Q92562 FIG4 Polyphosphoinositide phosphatase 16 100 0.09048613866509798 16.322678 7.3372674 7.118334 5.798957 6.220685 13.50817 4.472528285304836e-74 7.209083518961551e-7 1.3823078630640439e-5 6.800859038794889e-5 5.9687868635871056e-5 4.696956746485087e-43 16 16 16 16 16 16 False False False False False False 5 7 6 6 10 8 3300.604736328125 2549.53515625 3272.401123046875 3101.217041015625 2935.626708984375 3049.63623046875 250090.71875 409846.4375 389529.71875 351860.875 525722 497176.96875 448.1 482.4 376.2 157.8 153 153.3 +0 26.340227 P53128 MET13 Methylenetetrahydrofolate reductase 2 14 100 0.3480593276265926 16.898853 14.924904 15.151667 13.174509 19.493387 26.340227 1.2156199382946954e-75 1.0089748930110589e-52 5.512346084561475e-62 6.44524427025679e-110 7.1220730264541325e-78 4.3476671768025725e-205 15 15 16 16 16 16 False False False False False False 11 11 11 15 12 13 3126.370361328125 3091.895751953125 3173.005126953125 6296.85693359375 5802.47021484375 5973.6611328125 172886.1875 295382.9375 256794.8125 232327.78125 304592.8125 310893.0625 668.2 662 654.7 1409.5 1275.3 1318.8 +0 21.884396 Q14137 BOP1 Ribosome biogenesis protein BOP1 25 100 0.024502626554837054 21.884396 20.021133 19.21641 16.64224 16.789253 18.180092 1.1199817438027075e-89 9.390473212022152e-64 1.3995553231866944e-72 3.1279335385277875e-130 9.43221277963226e-71 4.827754231996229e-147 30 30 29 30 30 30 False False False False False False 26 25 25 24 26 24 13558.224609375 13802.5986328125 13535.6728515625 13903.6982421875 13197.935546875 13055.201171875 222401.5 389269.46875 408193.40625 273026 396277.09375 435212.375 4029.8 4207.9 4086.3 4340.2 3977.3 4107.1 +0 21.956352 P09064 SUI3 Eukaryotic translation initiation factor 2 subunit beta 16 100 0.36876153474153434 20.79462 21.956352 13.396171 19.852442 16.998817 15.095729 1.5592145716787083e-86 3.798964607986005e-68 1.9083590783771453e-38 4.557311940530619e-148 2.7113391991546725e-71 6.471131720876887e-79 18 19 19 19 19 19 False False False False False False 17 15 17 19 18 17 22807.044921875 22564.58984375 22151.470703125 46382.28125 44508.94921875 45023.875 407480.65625 707937.4375 644708.0625 740729.125 1131058.375 1150894.125 10451.6 9765.8 9108.5 17860.9 17477.6 17873.4 +0 21.653273 P35250 RFC2 Replication factor C subunit 2 23 100 0.020905731878766837 21.653273 18.505924 16.10442 17.516642 16.553171 16.290964 5.220352269971685e-89 2.165929344491811e-60 2.1137851328351376e-64 5.524287916861153e-135 3.8275142373973423e-70 2.4506383231584382e-113 28 30 30 30 29 30 False False False False False False 23 27 24 28 25 24 23979.568359375 24001.33984375 23699.048828125 24309.404296875 22884.767578125 23520.625 692242.3125 1181718.125 1154959.125 809348.6875 1175529.5 1202331.625 9292.3 9471 9295.1 9682.5 9034.9 9297.9 +0 17.997427 Q9UIM3 FKBPL FK506-binding protein-like 7 100 0.11861593641917001 17.997427 6.1920266 6.6594844 6.6741652 6.5546365 5.146533 1.1710120239683745e-78 3.40181999317429e-5 2.530377929143094e-5 2.2849693004236635e-5 4.002884688918652e-5 1.2827512403463997e-4 7 6 5 6 7 7 False False False False False False 5 5 5 5 5 5 5472.8291015625 5543.23046875 5740.548828125 6772.61767578125 4870.94873046875 6419.3759765625 879616.9375 1127914 1739773.875 1541433 2150898 2478629 861.7 576.5 1000.2 1434.4 911.7 1863.3 +0 22.63134 P32598 GLC7 Serine/threonine-protein phosphatase PP1-2 9 100 0.34221493547317333 21.370857 12.567963 8.654627 16.02332 22.63134 17.210083 3.4259098711694163e-88 6.119199931379574e-48 4.160139822833438e-6 6.435493274644292e-127 1.9072343097067664e-86 2.6693103981251823e-140 11 11 11 12 12 12 False False False False False False 11 10 10 12 11 11 16170.21484375 16898.537109375 15936.6259765625 32129.83984375 30534.12890625 30667.05859375 370828.21875 625447.8125 556187.5 924741.0625 1223486.75 1189317.25 3975.1 4281.4 4097.8 9322.5 8893.8 9057.4 +0 24.173077 P33322 CBF5 H/ACA ribonucleoprotein complex subunit CBF5 19 100 0.3320092463882606 22.085285 22.744265 16.46295 18.598866 21.31015 24.173077 2.9515356099700464e-90 5.762418053885125e-70 2.5400271165014823e-65 5.658527369314373e-141 8.257198247614788e-83 7.20734576516049e-189 25 25 25 25 24 25 False False False False False False 19 19 19 24 22 25 23844.169921875 23086.58984375 22966.845703125 44205.25390625 42307.38671875 43994.5859375 327722.53125 587607.375 556131.0625 679690.4375 994269.625 1050256.625 6180.1 5887.3 5899.8 11707.7 10759.2 10983.6 +0 20.89543 P18963 IRA1 Inhibitory regulator protein IRA1 36 100 0.3695990445770093 7.396513 11.139728 8.667084 20.89543 13.067929 16.878893 4.459606371498291e-7 3.6721548170559204e-45 4.1246107850216865e-6 4.407204483376631e-154 2.0330111351628882e-34 2.1663329187240947e-130 36 31 34 37 37 37 False False False False False False 17 13 14 24 24 23 1794.503662109375 1992.8480224609375 1865.7119140625 3811.873046875 3681.045166015625 3884.476318359375 607831 1031188.6875 1049985.625 673924 1032730.3125 1008919.9375 126.9 127.8 124.5 216.5 225.1 223.5 +0 22.776733 Q9NR12 PDLIM7 PDZ and LIM domain protein 7 21 100 0.028641747768259965 22.210716 22.776733 14.253797 18.016115 21.884209 16.15228 1.2869890057596008e-90 4.858506543752473e-70 8.144426995699464e-55 9.722292305387297e-138 2.1864483303683217e-84 2.5085912997838504e-109 26 26 26 26 26 26 False False False False False False 23 22 22 23 21 23 9892.3994140625 9588.1953125 9716.4482421875 10145.1787109375 9641.7978515625 9328.2919921875 133708.28125 250484.390625 229517.078125 184679.734375 267115.46875 266147.9375 2933.1 2910.9 2925.9 3001.7 2906.1 2908.4 +0 24.807486 O15067 PFAS Phosphoribosylformylglycinamidine synthase 51 100 0.020759257564241452 22.975729 24.807486 19.513636 17.694101 21.567919 20.822657 7.860646356806946e-93 8.367649362227657e-75 2.1979828437321523e-73 5.86166781841444e-136 1.6178557029370309e-83 6.645786959950388e-165 66 66 66 66 66 66 False False False False False False 59 59 61 56 56 58 32472.970703125 32320.798828125 32361.61328125 32471.11328125 31489.498046875 30874.6953125 263568.0625 424390.84375 435067.1875 307903.5625 429580.9375 452105 7403.2 7467.9 7541.9 7464.7 7053.2 7071.1 +0 19.065199 Q12450 ERP4 Protein ERP4 7 100 0.33987932791212766 19.065199 15.631074 13.157962 10.723852 15.746838 13.777331 1.244145458983883e-81 3.361218241385994e-54 1.6414627922354731e-34 3.229344409348638e-48 4.4122731528019065e-68 2.9109150946244165e-48 7 7 7 7 7 6 False False False False False False 6 6 6 6 6 6 10027.763671875 10286.6884765625 10078.80078125 19383.876953125 19701.080078125 18528.8359375 240907.1875 387827.25 399321.28125 598721.0625 779378.75 709413.9375 3348.5 3713.7 3681.3 7419.7 7218.5 6895.5 +0 22.114456 A5YKK6 CNOT1 CCR4-NOT transcription complex subunit 1 84 100 0.030073373228795146 19.565048 17.2119 22.10253 22.114456 18.360098 21.03607 4.8975855673505835e-83 1.4250943440147913e-57 1.4352101539081398e-80 2.8805703425958273e-161 7.405046771176066e-75 2.2032008850256606e-166 94 93 95 95 90 94 False False False False False False 71 75 77 66 75 73 8299.4794921875 8350.5068359375 8048.140625 8750.54296875 8136.33447265625 8473.666015625 184317.640625 326367.4375 309056.3125 261077.59375 344698.65625 346120.21875 1737.9 1766.3 1737.6 1865.9 1732.8 1796.8 +0 19.959183 Q12515 PAR32 Protein PAR32 10 100 0.37295128868513616 17.645908 13.817801 19.959183 9.650033 11.033552 16.079823 1.0956783297531302e-77 1.898046772725119e-50 1.3331245556505044e-74 8.256324416077722e-30 1.0268391741267597e-11 3.497357208779486e-107 14 15 14 15 15 14 False False False False False False 12 13 13 13 15 12 7188.33056640625 7195.64013671875 6957.8876953125 15194.5625 13740.3017578125 14203.1572265625 120325.9140625 212189.578125 195056.375 278003.21875 345695.59375 371602.53125 3235 3212.3 3210 6523.3 6003.9 6165.9 +4.391847294741519e-291 17.398384 Q02932 KAP120 Importin beta-like protein KAP120 13 100 0.3600689369944603 7.846141 17.398384 7.014753 13.086838 16.155062 16.980972 1.6801513031160957e-9 5.6315051430295184e-58 1.590842894524453e-5 3.067959861769667e-107 4.0222801867107194e-69 1.8263865489932207e-133 14 12 12 14 14 13 False False False False False False 6 9 8 11 11 12 2047.31396484375 2181.55126953125 1947.4971923828125 4257.23828125 4035.229248046875 3849.58056640625 12825.0390625 38425.73046875 35303.59765625 48766.4140625 78206.3046875 79797.4375 210.7 238.9 223.7 487.7 489.4 458 +0 17.615847 P60002 ELOF1 Transcription elongation factor 1 homolog 1 100 0.050676079642510974 12.219501 7.1718206 7.450978 17.615847 17.508013 8.774722 2.1076811226377748e-63 2.471909002839985e-6 9.874968070107913e-6 1.5731558541720842e-135 1.287035070035248e-72 3.1032830502556787e-6 1 1 1 1 1 1 True True True True True True 1 1 1 1 1 1 4343.69287109375 4229.11669921875 3852.921630859375 3818.533203125 4104.52099609375 4045.764404296875 150947.09375 129082.5625 168760.171875 127522.28125 144212.6875 159149.40625 2171.8 2114.6 1926.5 1909.3 2052.3 2022.9 +0 20.075071 Q01780 EXOSC10 Exosome component 10 46 100 0.02537111348394361 19.186628 15.805583 20.075071 15.649374 16.959017 20.016262 5.681457974868103e-82 1.4396378404011028e-54 6.479127808676288e-75 6.169263051711145e-125 3.4392033679006955e-71 2.35896685546728e-159 56 55 56 56 56 56 False False False False False False 44 45 43 40 44 45 13965.345703125 13774.7783203125 13895.240234375 13237.9609375 13296.9404296875 13247.8017578125 380224 655641.875 654544.5 489223.6875 663218 744843.4375 4281.7 4161.4 4335.7 3984.4 4053.7 4089.2 +1.4979548434073793e-292 17.426752 Q96B54 ZNF428 Zinc finger protein 428 4 100 0.13710282700875948 16.049486 14.509969 8.57713 9.991835 16.21072 17.426752 2.433804001671756e-73 7.289605456303413e-52 4.366881270892029e-6 4.2457853806748113e-35 2.897359128665528e-69 3.9739006028503315e-142 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 2763.1279296875 2535.322998046875 2168.814208984375 3093.454833984375 2290.533935546875 2325.784912109375 91339.4765625 111644.78125 89166.671875 74428.796875 90966.96875 101879.625 1952.6 1751.8 1424.5 2078.5 1488.6 1663.7 +0 18.440598 Q96AA3 RFT1 Protein RFT1 homolog 9 100 0.05925599978046119 16.337406 9.900074 18.440598 8.516213 12.069027 15.961508 4.083997719949762e-74 1.6365290893311748e-34 1.7022296844368502e-70 1.112133419636124e-15 3.7168030192738312e-22 1.2500187700464262e-103 9 9 9 9 9 9 False False False False False False 7 6 7 8 7 6 4370.07568359375 4589.630859375 4740.04833984375 5217.2939453125 4829.4775390625 4725.0810546875 361387.1875 569219.25 650678.9375 401335.5 692576 849005.25 793.5 814.2 861.6 919.9 901.4 888 +0 24.928415 P11940 PABPC1 Polyadenylate-binding protein 1 38 100 0.018028012794819994 21.301294 20.716558 16.931509 18.916365 24.928415 22.966965 5.442046575669342e-88 2.5278029774190744e-65 1.5748693504137807e-66 9.342523359381074e-143 6.1114416854188635e-93 4.533702932952649e-180 51 51 51 51 51 51 False False False False False False 47 48 48 46 47 50 98866.703125 99832.953125 100175.5859375 98052.7109375 95238.3671875 98968.734375 1076703.125 1879017 1764420.75 1319606 1737700.75 1812480.375 34483.5 34747 34735.801 35785.699 34247.398 34601.301 +0 18.51269 P61326 MAGOH Protein mago nashi homolog 9 100 0.04657361798814635 16.073402 13.806226 11.688388 15.839006 14.52291 18.51269 2.10159193019519e-73 2.0025401575798725e-50 4.0889213019423435e-16 6.116429496726314e-126 9.75080165707023e-56 3.064110710438939e-149 11 11 11 11 11 11 False False False False False False 11 10 11 10 8 10 49001.29296875 49556.359375 50436.1796875 46684.33203125 44493.46484375 46730.25390625 574696 1095596 1137873.5 805916.1875 1239584.25 1152425.75 17086.6 17419.5 17422.1 17241 15675 16540.9 +2.720363544441124e-305 17.6701 Q9H490 PIGU Phosphatidylinositol glycan anchor biosynthesis class U protein 4 100 0.06450264303903935 8.52488 8.022075 17.6701 11.468101 9.739931 14.959745 1.216346903648178e-15 5.457074167422682e-11 1.8467718305011343e-68 4.67791697041288e-64 1.1725762614771972e-6 2.337551715699151e-75 4 4 4 4 4 4 False False False False False False 4 4 4 4 4 4 5544.326171875 5470.70703125 5363.2705078125 5762.833984375 4773.94873046875 5151.02392578125 312153.8125 718439.1875 659469.375 678787.6875 1020191.0625 930261.25 1438.2 1392.7 1401.6 1548.8 1441.9 1507.7 +1.0934735882651238e-5 6.6595244 Q5M7Z0 RNFT1 E3 ubiquitin-protein ligase RNFT1 2 100 0.513186020426354 3.457526 6.3176756 4.3379154 1.4626983 6.6595244 6.488275 3.4583793251372584e-4 2.971632349582108e-5 2.136073724112432e-4 0.0015269044059150936 3.4789793463971876e-5 3.413033907832674e-5 2 2 1 2 2 2 False False False False False False 2 2 1 2 2 2 74.60062408447266 266.0371398925781 344.3812255859375 98.528961181640625 186.80731201171875 275.99603271484375 6770.25048828125 4349.44970703125 36409.67578125 36494.5546875 5250.44677734375 11412.666015625 9.7 20.5 13.6 10.7 18.9 25.5 +1.3630950554936414e-5 6.477215 Q15119 PDK2 [Pyruvate dehydrogenase (acetyl-transferring)] kinase isozyme 2, mitochondrial 4 100 0.2070711142277585 4.2361755 3.7906861 4.6373243 5.529306 6.477215 5.1478868 2.0177782191710823e-4 2.6082301207569486e-4 1.7259298222062182e-4 8.540697018824218e-5 4.3931633730282786e-5 1.2827512403463997e-4 4 4 4 4 4 4 False False False False False False 4 4 4 4 4 4 544.9942626953125 329.6451721191406 413.552001953125 325.7838134765625 479.8831787109375 393.09893798828125 154105.40625 219843.671875 194914.421875 419989.03125 322756.96875 398824.59375 63.8 48.3 54.9 54 70.9 59.8 +0 19.295681 Q99190 TSC13 Very-long-chain enoyl-CoA reductase 7 100 0.37284340508134384 15.682139 17.291538 11.577773 19.295681 9.076423 16.45173 2.348820810932362e-72 9.564183301907521e-58 3.8860108134434576e-15 6.757486852230094e-145 3.5211334946312295e-6 6.4240834354074555e-118 10 10 9 10 10 10 False False False False False False 8 7 9 9 9 8 7649.7744140625 8133.6884765625 7957.88671875 15200.3134765625 16167.3466796875 16648 307594.5625 487278.5625 494101.28125 797139.4375 1055298.625 1034997.8125 2885.7 2711.1 2904.4 5048.5 5195.9 5335.5 +0 20.759367 Q12907 LMAN2 Vesicular integral-membrane protein VIP36 17 100 0.04817490395381558 16.63827 12.158512 8.748393 20.759367 14.131454 18.129276 6.220294938518198e-75 3.908391510149862e-47 3.943122890359888e-6 2.6943051894378127e-153 2.117144555767905e-49 1.0421391714439167e-146 20 20 20 19 20 19 False False False False False False 15 18 17 17 16 16 41427.77734375 41178.76953125 41584.7265625 45739.82421875 40267.45703125 40453.4609375 462480.625 820394.5 811429.0625 660100.625 821373.25 855178.3125 15177.3 15091.5 14941.3 17162.9 15302.5 15373.1 +0 20.815773 Q86VM9 ZC3H18 Zinc finger CCCH domain-containing protein 18 25 100 0.04780390255292843 20.658447 17.58953 15.053483 20.776253 19.119305 20.815773 3.83609043644334e-86 2.1646849857151693e-58 9.697987710843607e-62 2.1491781352178938e-153 7.117020795420801e-77 7.425837091891551e-165 29 28 29 29 29 28 False False False False False False 25 23 24 21 23 24 6579.5048828125 6058.45458984375 6738.2890625 6357.28662109375 5937.1943359375 6314.6787109375 302905.6875 521753.5 525457.4375 268001.59375 489238.3125 498866.375 1506.4 1397.6 1614.2 1450.6 1401.3 1425.8 +0 21.503117 P52756 RBM5 RNA-binding protein 5 15 100 0.04815289923106148 19.47202 15.805876 21.503117 18.109133 14.677316 16.907593 8.948974904559325e-83 1.437845081786489e-54 6.915720309665271e-79 2.966871150591055e-138 2.3319467428228595e-58 2.987699328294128e-131 15 13 15 15 15 15 False False False False False False 11 12 12 14 13 12 2986.9599609375 2992.0224609375 2866.26953125 3220.560791015625 2819.363525390625 2898.84033203125 323723.53125 422086.0625 447332.5 280190.625 424052.5 397776.34375 666.1 611.8 667.6 764.4 696.6 688.3 +0 24.711521 Q8N163 CCAR2 Cell cycle and apoptosis regulator protein 2 45 100 0.02825887798676012 21.997047 23.852028 23.272606 16.318758 24.711521 19.05116 5.290885364919962e-90 1.6197866864564693e-72 6.467371840102559e-84 1.7142152036257366e-128 2.6415723192033186e-92 7.94847375482715e-153 55 54 55 55 55 54 False False False False False False 44 42 45 43 43 40 25260.38671875 25803.26953125 25958.541015625 26158.021484375 24475.36328125 24593.107421875 280815.0625 509665.34375 494407.84375 382973.6875 493536.03125 504949.0625 6874.9 6971.6 6951.4 6946.5 6540.5 6641.9 +0 25.63988 P38225 FAT1 Very long-chain fatty acid transport protein 17 100 0.36921707319508384 18.828747 19.0942 20.027262 16.627237 25.63988 19.194864 5.720855667136926e-81 1.0938367625944318e-61 8.692312674455928e-75 3.7645318921529986e-130 6.292933408204593e-95 8.639349083027968e-154 16 16 17 18 17 18 False False False False False False 13 11 11 14 13 14 3648.72509765625 3476.41845703125 3328.4130859375 7287.2119140625 7034.48681640625 6651.1357421875 36913.203125 88119.5546875 74009.765625 80304.3125 137410.28125 129747.046875 630.3 575.3 541.1 1191.8 1200.3 1062.4 +2.870611037339408e-6 8.48425 Q9HB96 FANCE Fanconi anemia group E protein 7 100 0.10120034639128768 8.48425 6.6678834 6.2947445 6.30156 7.4217987 6.3292856 3.4111847780437006e-15 1.7233125719874543e-5 4.123218565048401e-5 3.984918644649911e-5 1.2411965843487069e-5 4.20642059411558e-5 7 6 7 7 7 7 False False False False False False 5 5 5 5 5 5 596.9727783203125 530.73260498046875 498.29150390625 623.57470703125 619.890380859375 650.82562255859375 89096.859375 153951.078125 104559.9375 113320.8828125 140081.0625 163488.171875 87.5 82.3 92.9 91.7 94.9 103.9 +0 24.129166 P0AD59 ivy Inhibitor of vertebrate lysozyme 6 100 0.3705929472293578 24.129166 8.729453 8.37992 11.065122 6.857181 5.1793556 3.5025535698418487e-96 3.995875882366957e-18 5.018174517375884e-6 3.634613023316936e-55 2.592965306270682e-5 1.2620676213882687e-4 7 7 7 6 5 6 False False False False False False 6 6 7 5 5 5 6557.2001953125 6687.28515625 6157.40283203125 3169.039306640625 3350.57177734375 3115.1181640625 252320.046875 395724.21875 416007.46875 310136.46875 324901.8125 430612.34375 2350.8 2457 2176.7 1193.6 1219.8 1140.2 +6.092295559521952e-6 7.008096 P52803 EFNA5 Ephrin-A5 2 100 0.07323698438367954 5.550169 6.51561 7.008096 5.1938252 6.4038024 6.293909 7.319317379242926e-5 2.2627275989409412e-5 1.595689957163385e-5 1.1455647036287257e-4 4.830470172987127e-5 4.3799907784230766e-5 2 2 2 1 2 2 False False False False False False 2 2 2 1 2 2 741.2740478515625 862.51153564453125 808.26495361328125 776.231689453125 727.3570556640625 861.8133544921875 257765.328125 413050.90625 351373.875 282077.5625 300682.25 229895.328125 103.9 117.7 109.5 63.3 98.6 116.8 +7.814236154840918e-129 13.602235 O75884 RBBP9 Serine hydrolase RBBP9 8 100 0.04541577109087814 13.602235 12.199447 9.013114 8.428362 10.175238 6.267615 6.630599864006758e-67 3.251791355796918e-47 3.285968950731225e-6 9.509587492540784e-15 1.6509960695510036e-7 4.5222445264233147e-5 9 9 9 9 9 9 False False False False False False 8 8 8 7 7 7 6329.7646484375 6907.5166015625 6553.06396484375 7210.0029296875 6796.43359375 6919.62548828125 64669.890625 145642.953125 132331.859375 101243.0859375 149772.125 174054.96875 2392.9 2529.9 2273.3 2506.4 2460.4 2525 +0 19.30794 P54619 PRKAG1 5'-AMP-activated protein kinase subunit gamma-1 15 100 0.043080745591053723 19.30794 12.158903 17.33593 14.52225 13.207257 14.108576 2.5893483783647874e-82 3.901925985939227e-47 1.3876293938970857e-67 4.750185875378642e-119 3.391244993204869e-36 3.6764181616662694e-55 17 17 15 17 17 17 False False False False False False 12 14 14 15 14 14 7074.3662109375 6650.2607421875 6804.64990234375 6580.69873046875 6205.931640625 6583.9130859375 2027292.625 3879384.75 2771870.75 2402245.25 3658758.25 4085221.75 2173.4 2083.7 2185.1 2082.8 1906.3 2005 +0 18.827082 P42226 STAT6 Signal transducer and activator of transcription 6 20 100 0.05291262479677499 18.827082 16.299862 14.100202 10.391476 10.293631 16.568617 5.783239863757312e-81 1.2883081736343011e-55 1.2479397800687908e-51 5.861406815127208e-42 7.244834589373919e-8 2.8383986754188236e-121 23 23 23 23 24 24 False False False False False False 18 16 15 16 16 19 5249.16552734375 5489.9873046875 5517.615234375 6070.69287109375 5304.63720703125 5611.5751953125 1385489.125 2331020.5 2260164.5 1724380.5 2602230.5 2509867.25 1350.9 1377.7 1344.5 1466 1295.6 1398.1 +1.0017188840041308e-24 9.154832 Q9Y4C1 KDM3A Lysine-specific demethylase 3A 15 100 0.16379229769541492 8.370343 7.874023 7.47024 6.6906104 7.3772264 9.154832 5.4659895255833755e-14 7.989611259956271e-10 9.826125191650297e-6 2.2477626014661064e-5 1.2825161997646293e-5 2.305867961504123e-6 14 14 14 15 13 12 False False False False False False 7 8 5 6 8 5 426.8070068359375 413.9820556640625 588.36041259765625 624.041748046875 509.7394714355469 512.965576171875 85481.7890625 127820.65625 87136.8984375 73524.4375 107191.1640625 93545.0625 40.2 53.1 59.3 58.2 50.9 40.4 +8.507695341823152e-6 6.8264885 Q3E7C1 TFB5 General transcription and DNA repair factor IIH subunit TFB5 2 100 0.28840209983833376 1.918774 4.910521 0.43727574 6.8264885 5.8586574 4.967324 0.0010166533335595473 1.1726676533363732e-4 0.002404476170048237 1.665777355266981e-5 8.493694502050777e-5 1.4361830234858235e-4 2 2 2 2 2 2 False False False False False False 2 2 2 2 2 2 465.0577392578125 556.33837890625 678.6044921875 964.71893310546875 960.61688232421875 672.861083984375 69632.640625 220765.34375 94670.453125 156496.46875 166407.859375 289534 277.2 270.4 269.4 514.9 446.4 398.5 +1.5586413779950045e-5 6.3391066 Q8WY91 THAP4 Peroxynitrite isomerase THAP4 5 100 0.3747804925066092 3.5814807 4.4309883 5.2157664 4.344965 6.3391066 4.165851 3.1608987239411477e-4 1.6712405614653249e-4 1.1062511008682094e-4 2.1342064278946366e-4 5.2409123073433226e-5 2.6064732213323103e-4 3 4 4 4 5 3 False False False False False False 3 4 4 4 5 3 60.08382797241211 152.06443786621094 105.12103271484375 163.65150451660156 151.4875030517578 214.5890350341797 123938.0078125 94521.296875 127308.515625 156515.0625 160321.3125 112369.8515625 11.6 26.7 17.3 30.8 37.3 24.2 +0 19.39445 P78356 PIP4K2B Phosphatidylinositol 5-phosphate 4-kinase type-2 beta 11 100 0.06261609819320993 15.529728 19.39445 17.1601 16.30075 19.209682 13.256374 5.98219791677121e-72 2.3619524893298386e-62 4.0079675794364363e-67 2.1386705530988632e-128 4.089887120290241e-77 1.6664991564523348e-38 12 12 12 12 12 12 False False False False False False 7 9 9 7 7 7 3900.09814453125 4304.58447265625 3688.470703125 3892.579345703125 3614.784423828125 3800.575927734375 513292.90625 1144284.875 955933.75 780399.375 1161154.25 1092403.875 903.7 947.4 916.1 859.7 838.6 867.1 +3.0868954327055047e-6 7.4401436 Q8NHG7 SVIP Small VCP/p97-interacting protein 2 100 0.07073175361160251 5.607206 7.4401436 7.282074 5.7575974 6.4862513999999996 6.9025464 6.936867891757817e-5 2.823360004958988e-7 1.1247652077569828e-5 7.018775900683343e-5 4.362700775143873e-5 1.995652450225071e-5 2 2 2 2 2 2 False False False False False False 2 2 2 2 2 2 1197.89453125 1169.391845703125 1189.3358154296875 1401.50390625 1248.578369140625 1308.62255859375 100659.1328125 203950.078125 203122.703125 139487.578125 278732.8125 235998.71875 474.4 453.3 480.8 582 497.8 515.6 +9.118743914908401e-206 15.599514 Q6P161 MRPL54 39S ribosomal protein L54, mitochondrial 2 100 0.12629126270934846 13.815454 7.452604 7.4823184 6.99518 7.762017 15.599514 1.8752162171136722e-67 2.497092809309563e-7 9.754485689251651e-6 1.0435953379698342e-5 9.742249963796502e-6 6.940100892018016e-93 3 3 3 3 3 3 False False False False False False 3 3 3 3 3 3 6152.94140625 6551.27001953125 7562.06787109375 7869.24853515625 7950.08251953125 5985.740234375 114729.1015625 269851.09375 248883.484375 206719.765625 278876.875 400874.03125 3474.2 3582.5 3903.1 3617.8 3434.3 3309.4 +0 21.38858 Q9H568 ACTL8 Actin-like protein 8 12 100 0.03692671731071849 17.269444 21.38858 13.870219 13.151733 8.113335 11.535126 1.186674812418033e-76 7.498709597842208e-67 4.567917859251339e-47 3.213804666328455e-109 7.593585598319958e-6 1.0134068794990337e-15 15 15 15 15 15 15 False False False False False False 13 12 15 12 12 11 3695.079345703125 3493.76953125 3321.46484375 3428.817626953125 3407.97412109375 3411.646484375 143794.84375 355171.53125 340651.40625 242988.4375 326487.4375 387062.5625 1231.4 1204.7 1157.1 1179.8 1170.1 1130.2 +0 22.062021 P25385 BOS1 Protein transport protein BOS1 9 100 0.35916389336106835 12.263975 12.07045 8.563152 9.333504 10.835721 22.062021 1.6315242626621644e-63 5.808990364230865e-47 4.4001792421665315e-06 2.2137694973973316e-25 2.1255203737480434e-10 1.353832431806634e-173 10 10 10 10 10 10 False False False False False False 6 6 5 7 10 10 2737.554443359375 2337.348876953125 2603.941162109375 4947.96875 4862.28466796875 5258.12353515625 536700.125 1216552 1160327.5 1009968.75 1626649.875 1574472.75 911.6 824.6 836.9 1714.3 1614 1759.3 +7.747860453025064e-305 17.661507 P32783 ABD1 mRNA cap guanine-N7 methyltransferase 15 100 0.39281763056166025 16.893875 11.28217 14.374694 17.661507 13.253906 16.112072 1.2539488300065136e-75 1.96085727286382e-45 2.1305013600789503e-57 8.824297168716305e-136 8.37560130932075e-37 3.845895039129125e-108 16 13 16 17 17 17 False False False False False False 9 10 10 13 15 17 2662.0302734375 2713.09716796875 2798.27099609375 5815.02099609375 5722.7265625 5767.6142578125 165697.40625 297873.125 312134.6875 272168.5 399701.3125 389849.1875 749.4 711.4 783 1661.3 1631.1 1731.1 +0 24.155762 Q9UHD2 TBK1 Serine/threonine-protein kinase TBK1 25 100 0.03579163832828478 24.155762 16.34941 14.65867 12.527066 21.272402 19.590218 2.917866194960259e-96 1.0094023375254857e-55 9.421688037291565e-61 5.91881714764067e-91 1.0496830259021398e-82 1.863719645711598e-156 28 27 28 25 26 28 False False False False False False 20 22 23 18 18 21 2912.376953125 2706.6953125 2824.007080078125 2919.732177734375 2685.567626953125 2858.4755859375 208320.90625 364766.65625 356333.0625 273042.84375 392537.71875 468617.4375 883 790.5 868.7 831.8 769.6 859.4 +1.166467433199342e-256 16.71038 Q5BKT4 ALG10 Dol-P-Glc:Glc(2)Man(9)GlcNAc(2)-PP-Dol alpha-1,2-glucosyltransferase 7 100 0.11863552185984229 12.302245 9.256008 7.45335 7.0074577 16.71038 7.0142775 1.3094987314474893e-63 1.1264375548893427e-24 9.873663891495308e-6 1.0158053171962794e-5 1.508686306166123e-70 1.7368268519043687e-5 8 8 7 8 8 7 False False False False False False 5 6 5 5 5 5 2211.6767578125 1875.615234375 2351.4755859375 2190.549560546875 1870.2918701171875 1743.3135986328125 272878.15625 451297.71875 356895.25 430649.59375 534226.375 481376.625 372.2 451.9 441.5 419.6 351.9 303.6 +3.092004736961555e-73 11.710892 P23797 GPI12 N-acetylglucosaminyl-phosphatidylinositol de-N-acetylase 7 100 0.3547657608194982 11.710892 7.416335 6.429057 7.420336 10.360153 10.68653 3.8375730439914416e-62 3.553285958481036e-7 3.5117414825492644e-5 1.201876129278184e-6 4.268000589047848e-8 9.226653328767715e-10 7 7 6 7 7 7 False False False False False False 5 5 5 5 5 5 1438.7025146484375 2029.515869140625 1690.4639892578125 3002.7373046875 3022.67431640625 3649.81591796875 159357.171875 582067.5625 407426.5 332589.34375 554802.125 527820 433.6 549.6 398.1 827.9 790.1 896.3 +3.2143683633393016e-306 17.687614 Q9Y3Q8 SPACDR Sperm acrosome developmental regulator 10 100 0.08511320213600486 14.090021 12.655299 17.554415 7.445747 8.844881 17.687614 3.661467583418994e-68 4.110780319565962e-48 3.724226042049739e-68 9.699606689063141e-7 4.1565438944048006e-6 8.031983893172077e-144 9 10 10 10 9 9 False False False False False False 8 8 8 5 7 7 1204.9130859375 1312.795654296875 1272.6575927734375 1481.424072265625 1167.0347900390625 1276.8658447265625 97209.1953125 286164.1875 254374.53125 385079.4375 489162.125 511790.40625 277.7 355.7 372.5 345.3 298.6 309 +0 21.71291 P46087 NOP2 Probable 28S rRNA (cytosine(4447)-C(5))-methyltransferase 30 100 0.023669353739052157 21.71291 19.519688 18.77956 18.251915 17.682993 21.65066 3.506463062815333e-89 1.240915498443222e-62 2.1200994992558227e-71 4.807702941385705e-139 4.487067939760535e-73 1.1060143051549034e-170 35 35 35 35 35 35 False False False False False False 31 30 32 30 31 31 47273.296875 47877.19140625 47143.53125 48431.69921875 45528.98046875 45939.6953125 345553.1875 632708.1875 604117.25 478934.6875 634135.0625 653810.4375 16065.4 16461.301 16196.1 16844 15826.2 15900.3 +1.4955298552166442e-5 6.3839383 Q8IV32 CCDC71 Coiled-coil domain-containing protein 71 3 100 0.14619323451689836 5.011429 1.6188115 5.2847743 5.011582 6.3839383 5.04454 1.1463423355201134e-4 0.0011723066555631844 1.0546051811824711e-4 1.3161887760822558e-4 4.956039566706805e-5 1.368680803697854e-4 3 2 3 2 3 3 False False False False False False 3 2 3 2 3 3 595.5164794921875 382.88592529296875 572.69268798828125 518.04559326171875 551.9229736328125 496.5498962402344 2855631 3780044 657257.375 5228625 2359424.75 1015984.5 65.3 48 79.8 28.5 63.1 54.3 +0 26.279709 Q6PGP7 SKIC3 SKI3 subunit of superkiller complex protein 54 100 0.01616533072532387 18.264614 17.343388 16.290802 18.236454 20.844149 26.279709 2.1330936793946327e-79 7.389966546961035e-58 7.030361997706824e-65 5.842073597879074e-139 1.5705079105361089e-81 1.2683887336708425e-204 57 58 58 57 57 56 False False False False False False 46 48 46 44 44 45 5839.91845703125 5888.59619140625 5776.38037109375 5958.4296875 5690.3095703125 5881.37158203125 132352.71875 236400.203125 221006.609375 144685.734375 255147.984375 244923.3125 1434.8 1417.8 1453.5 1544 1445.9 1462.2 +0 27.962545 P38164 SEA4 SEH-associated protein 4 23 100 0.3725995439199269 13.3866005 16.621374 12.342705 20.607977 27.962545 17.537579 2.369470266321111e-66 2.642840082192148e-56 4.626082981162773e-23 2.024304140760439e-152 1.5282823599101672e-101 7.573515762841594e-143 24 24 24 28 28 26 False False False False False False 17 17 15 23 18 21 1628.1124267578125 1618.167236328125 1638.0433349609375 3415.3935546875 3215.5048828125 3269.23974609375 88354.375 166500.859375 154249.921875 162801.75 271463.75 247714.734375 367.1 325.9 363.5 768.2 681.7 688.9 +0 23.85294 P31948 STIP1 Stress-induced-phosphoprotein 1 42 100 0.024208618054835034 23.106913 23.85294 19.793936 18.430882 17.27703 22.887087 3.330707031418603e-93 1.6176191915988684e-72 3.8239570857229995e-74 4.888108232745789e-140 5.133150935641734e-72 1.692638276699045e-179 65 65 65 64 65 65 False False False False False False 60 60 58 59 58 59 135654.296875 135184.25 138295.140625 135722.546875 129209.96875 131780.21875 1589993 2468512.75 2525348.25 1800421.375 2291427.5 2461842.25 53866.5 53321.699 54688.5 51314.602 49477.301 50979.398 +7.328425509811671e-262 16.817263 Q06152 YLR271W Uncharacterized protein YLR271W 7 100 0.4043779580550405 8.947719 6.3756113 7.023412 16.817263 7.949093 11.848462 9.195712358114603e-21 2.7612307195055444e-5 1.57697526602539e-5 3.540865747109493e-131 8.58252608163047e-6 8.583364625158698e-19 7 7 6 7 8 7 False False False False False False 5 5 5 5 5 5 679.70745849609375 793.22210693359375 613.36041259765625 1577.72216796875 1301.9591064453125 1527.8011474609375 17180.46484375 36302.2578125 26767.314453125 57914.48828125 62257.12109375 54068.109375 197.3 188.7 203.7 461.7 473.1 492.2 +3.0999620188001146e-6 7.429243 Q8IU60 DCP2 m7GpppN-mRNA hydrolase 6 100 0.08125216469824723 5.281715 7.429243 6.9885674 6.6713324 6.6574087 4.4050145 9.211109667728311e-5 3.140848486273649e-7 1.6171642622580774e-5 2.292748083598365e-5 3.4789793463971876e-5 2.2054809138935362e-4 6 6 6 5 5 5 False False False False False False 5 5 5 5 5 5 740.0443115234375 727.93389892578125 667.65283203125 811.54608154296875 818.62591552734375 817.474609375 43403.09765625 88291.078125 68816.453125 64833.87890625 100699.984375 107490.6328125 128.4 129.6 120.3 150 141.5 135.8 +0 24.929756 P50085 PHB2 Prohibitin-2 9 100 0.32571801205020373 16.447527 19.352262 13.667647 17.167328 13.395677 24.929756 2.0535811336224397e-74 2.932959039912618e-62 2.9718916068237696e-43 4.46011984196455e-133 1.0914811079798873e-38 1.8537516318655665e-194 10 11 11 11 11 11 False False False False False False 9 9 11 10 10 10 9381.03515625 9545.0458984375 9124.61328125 17352.4296875 17361.962890625 17048.587890625 138457.953125 290473.5625 302286.625 240726.21875 451108.25 480024.0625 2857.1 2941 2938.3 5457 5247.1 5177.5 +0 19.801744 Q53SF7 COBLL1 Cordon-bleu protein-like 1 32 100 0.06244971791772376 11.780593 11.36469 8.748837 12.509706 13.67477 19.801744 2.5823627685688574e-62 1.3613947482825383e-45 3.942602622405162e-6 1.7960116570505692e-90 1.4424732200256224e-42 6.847408622122358e-158 31 32 33 33 30 32 False False False False False False 24 23 24 19 17 18 3555.798095703125 3412.756591796875 3336.808349609375 3840.64990234375 3207.978271484375 3456.519287109375 61944.31640625 92386.2421875 87522.5625 78437.5 93926.828125 112674.21875 366.1 374.8 363.8 363.7 315.1 348.4 +2.3520149088296646e-147 14.130347 Q9NR77 PXMP2 Peroxisomal membrane protein 2 5 100 0.04413300143545917 7.437853 8.718008 7.5011425 6.993771 14.130347 10.232518 3.032122140326704e-7 5.379127363751778e-18 9.606867977125166e-6 1.0470089004765265e-5 2.2027323045251294e-49 6.231134242684468e-8 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 4493.54248046875 4558.31396484375 4272.23291015625 4554.06787109375 4498.91796875 4074.33837890625 136160.296875 232116.359375 214101.84375 145118.828125 230373.703125 215867.234375 1343.9 1405.6 1366.9 1344.2 1319.4 1197.1 +0 22.542837 Q06103 RPN7 26S proteasome regulatory subunit RPN7 17 100 0.32930103961688817 16.26743 16.038742 14.123478 17.01927 19.972078 22.542837 6.301790921320972e-74 4.6300690261290095e-55 4.167836226705093e-52 2.8348060011522844e-132 3.6579614953943457e-79 5.124393286326138e-177 21 22 21 21 22 22 False False False False False False 19 20 17 20 21 22 24140.853515625 24452.798828125 24469.72265625 46976.5703125 44483.58203125 44066.74609375 665108.75 1331068 1190606.25 1764272 2372137 2384155.5 8291.4 8389 8246.8 16088.2 15383.1 15487 +4.7223469722761333e-238 16.318665 Q504Q3 PAN2 PAN2-PAN3 deadenylation complex catalytic subunit PAN2 19 100 0.05659037512705039 15.271809 11.565882 10.583506 10.405803 8.596922 16.318665 2.899306487390282e-71 5.5615983231358025e-46 7.694846192179238e-9 3.2263087636867323e-42 5.004388739642144e-6 3.967875272302986e-114 20 19 19 20 19 20 False False False False False False 12 16 12 13 11 12 1899.4720458984375 2080.816650390625 1839.758056640625 2021.3973388671875 1975.48828125 1796.1209716796875 51637.953125 93484.59375 95761.3046875 80579.046875 131524.28125 129521.0859375 322.9 344.1 310.7 337.4 309.6 318.9 +0 19.894705 Q96N64 PWWP2A PWWP domain-containing protein 2A 9 100 0.07405409804110732 19.894705 7.010451 8.59669 6.6667504 6.447081 11.786845 5.7126800269778e-84 5.93259620906305e-6 4.313365394026342e-6 2.3037890366894172e-5 4.5685745189518044e-05 3.76138103634361e-18 9 9 8 9 9 9 False False False False False False 5 5 5 5 5 5 807.1148681640625 826.1600341796875 746.5098876953125 669.066162109375 769.23895263671875 801.3350830078125 55750.5234375 118800.078125 125268.2109375 70989.375 98055.546875 130556.984375 122.3 114 119.6 119.3 121.3 140.3 +0 22.477463 P06778 RAD52 DNA repair and recombination protein RAD52 13 100 0.418867498896984 12.273969 12.61879 13.26984 22.477463 15.00378 15.027897 1.5404220266544866e-63 4.855756244648814e-48 2.5186618343520827e-36 1.9647360781092066e-163 3.996772499935144e-64 3.953034864979061e-77 11 12 12 13 13 13 False False False False False False 8 6 7 9 12 12 1389.2027587890625 1048.6295166015625 1405.0372314453125 2935.913818359375 2690.55517578125 2857.783935546875 91701.8671875 209601.0625 183876.65625 143172.296875 252320.796875 267089 306.2 274.7 300.8 716 673.6 739.6 +1.7886820409798573e-5 6.171322 Q8NDA2 HMCN2 Hemicentin-2 1 83.3 0.3380597856722808 -1.7757349 4.4279346 6.171322 -0.5055147 -0.58579063 5.4189787 0.005479656339291159 1.6735953344099654e-4 4.748763513574101e-5 0.0034891922057231394 0.004522910579238933 1.0668269691237295e-4 0 1 1 1 1 1 True True True True True True 0 1 1 1 1 1 NA 168.7701873779297 181.88436889648438 79.39869689941406 237.8707275390625 173.96490478515625 NA NA 14784.095703125 7554.7763671875 2417.034423828125 14532.2138671875 NaN 0.7 0.7 0.3 0.9 0.7 +0 24.307652 P38439 LEO1 RNA polymerase-associated protein LEO1 13 100 0.36214331184860016 20.92961 15.610308 22.668314 24.307652 15.785379 16.567268 6.387609649877915e-87 3.717155092730093e-54 3.4918882063018327e-82 1.5573490099750552e-174 3.5223801441954886e-68 3.104365357991226e-121 11 14 12 14 13 14 False False False False False False 10 9 10 13 11 12 4121.3974609375 4017.7275390625 4161.95751953125 8174.2568359375 8024.921875 8238.7890625 131664.65625 239223.015625 191614.046875 206546.0625 355234.9375 346965.375 817.5 799.3 840.1 1640.4 1616.8 1623.8 +0 21.25853 P0CX55;P0CX56 RPS18A;RPS18B 40S ribosomal protein S18-A;40S ribosomal protein S18-B 12 100 0.3555366660894304 21.25853 13.571096 17.35112 18.161627 14.940487 14.729956 7.212132456764242e-88 5.991988400095897e-50 1.2645872645885614e-67 1.5225392576575314e-138 5.497511098202338e-63 1.4861013140184404e-69 23 23 23 23 23 23 False False False False False False 23 23 22 21 23 22 208044.515625 200732.765625 216001.734375 418296.625 388306.9375 413843.71875 5741632.5 8222430.5 8650188 15549739 16855148 18554000 135367.406;135367.406 132162.203;132162.203 136915.797;136915.797 236026.406;236026.406 239897;239897 250779.906;250779.906 +0 18.35067 Q9NQA3 WASH6P WAS protein family homolog 6 1 100 0.026379578488174744 18.35067 13.889523 9.553705 6.9147677 12.994098 16.842428 1.2319840577738322e-79 1.35877991323451e-50 1.7483170207833263e-6 1.3127184466679519e-5 1.6869588275093895e-33 2.6615219541667178e-129 1 1 1 1 1 1 True True True True True True 1 1 1 1 1 1 2223.759033203125 2240.213134765625 2147.90087890625 2144.950439453125 2140.2529296875 2088.290771484375 32829.6015625 43703.59375 44710.8671875 32388.642578125 36428.640625 41315.015625 123.5 124.5 119.3 119.2 118.9 116 +0 20.65261 P32912 VAM7 Vacuolar morphogenesis protein 7 12 100 0.403132866321025 17.210516 12.357926 10.034007 16.928394 20.65261 14.92861 1.720488481172638e-76 1.5892345535045705e-47 3.6712481591198107e-7 8.828005100663505e-132 5.226683998474692e-81 1.4793173102637813e-74 13 13 13 13 13 13 False False False False False False 9 9 11 10 11 12 1256.5982666015625 1182.5103759765625 1206.29541015625 2836.40869140625 2460.575439453125 2491.670166015625 32002.875 45546.2578125 56548.69921875 84391.3671875 119189.4140625 101858.2578125 548 496.9 585.1 1148.3 1025.8 1076.6 +6.168683687515546e-120 13.334271 Q8NC42 RNF149 E3 ubiquitin-protein ligase RNF149 7 100 0.0889066699097382 13.334271 6.685493 6.7540884 11.776528 11.189158 6.4799323 3.2258084110378015e-66 1.668941974805817e-5 2.2674089728901254e-5 2.3100167518304526e-71 6.674416600732507e-13 3.4436137127763985e-5 8 8 7 6 7 8 False False False False False False 6 5 5 5 5 5 907.448486328125 1143.7208251953125 986.83319091796875 1009.5853881835938 927.21722412109375 929.14599609375 93148.71875 153365.984375 126798.8515625 81271.15625 167275.59375 134123.78125 206.7 242.9 197.4 188.3 194.4 228.1 +0 17.882930000000002 O75448 MED24 Mediator of RNA polymerase II transcription subunit 24 23 100 0.05287656868158891 11.189199 17.34136 8.715668 11.552359 13.961243 17.882930000000002 2.876673137888912e-60 7.455071417637848e-58 3.999888590091858e-6 5.217543369080535e-66 8.77215508242185e-47 4.2910890973974645e-145 25 23 25 24 25 25 False False False False False False 20 19 18 18 17 18 3804.758056640625 3647.614501953125 3608.092041015625 4098.29638671875 3549.411865234375 3717.644775390625 58880.74609375 94802.703125 77805.765625 78643.9765625 109314.0859375 105020.3671875 619.5 594.5 619.1 672.2 649.3 683 +0 21.712162 Q9H1I8 ASCC2 Activating signal cointegrator 1 complex subunit 2 15 100 0.09363134303372453 18.397694 21.712162 10.8625765 12.418297 12.480478 15.403346 9.105476047312126e-80 1.3535598820870809e-67 3.666415197329657e-10 5.893540944896636e-88 2.0073598324644513e-27 2.6760554477738763e-87 19 19 19 19 19 19 False False False False False False 16 13 16 16 14 14 2955.36083984375 2679.625732421875 2798.19091796875 2948.944580078125 2260.00830078125 2751.423095703125 156175 214536.984375 179652.125 149579.859375 233329.765625 186471.171875 861.4 782.2 850.4 880.7 673.1 846 +0 17.900158 P51884 LUM Lumican 5 100 0.05013931593808289 14.132531 17.900158 7.435782 15.360593 13.536853 7.2485514 2.8423597465267863e-68 4.598581095342383e-59 9.935146842014858e-6 2.0516225058430492e-123 1.2710163851967196e-40 1.2639014855963094e-5 6 6 6 6 6 6 False False False False False False 6 6 6 5 6 5 37876.15625 39040.63671875 36970.3046875 42731.9609375 39078.0625 39011.078125 213800.359375 537818.875 449451.3125 362140.625 549661.5625 550539 8140.8 8405.6 8044.2 9108.7 8213.7 8342.8 +0 19.66769 P39730 FUN12 Eukaryotic translation initiation factor 5B 30 100 0.336850593878015 19.66769 16.757908 15.927979 18.45965 18.205261 19.220402 2.518882886187583e-83 1.345852715006132e-56 5.969746396426122e-64 3.3881593515910003e-140 1.9032265402380897e-74 5.8220161457663616e-154 38 39 39 40 40 40 False False False False False False 35 36 34 36 36 38 30438.203125 30889.890625 30225.623046875 60033.62890625 54994.48046875 57135.93359375 400308.03125 643776.3125 655106.9375 857307.3125 1246328.625 1306121.375 8721.5 8725.9 8724.7 17221 16088.6 16519.4 +0 20.419588 P53633 YIP3 Prenylated Rab acceptor 1 7 100 0.33230772550526233 13.225904 17.0514 11.153209 15.930491 20.419588 17.972618 6.101434836246647e-66 3.157716679540007e-57 6.643628183251629e-12 2.001942921565855e-126 2.272592337110263e-80 1.1085162824649112e-145 7 8 8 8 8 8 False False False False False False 7 8 7 8 8 8 8190.13818359375 8275.5498046875 7115.3095703125 14327.5478515625 14529.5576171875 15028.8466796875 118673.3359375 242663.65625 226396.109375 250140.625 384165.3125 373467 3428 3536.2 3241.7 6279.1 6259.3 6588.3 +0 18.16333 Q15750 TAB1 TGF-beta-activated kinase 1 and MAP3K7-binding protein 1 13 100 0.04339344447431874 16.031082 8.708901 9.520743 13.68971 8.729471 18.16333 2.729453085100045e-73 6.801758983210292e-18 1.8621133655071036e-6 8.665633663361521e-115 4.533066485056182e-6 6.22357194270785e-147 13 14 14 14 13 14 False False False False False False 7 9 9 10 8 8 2428.3740234375 2477.01171875 2445.811767578125 2395.3330078125 2189.086181640625 2354.390625 630788.9375 1337633 1360219.125 1006427 1045990.1875 1280650.75 517.8 552.7 560.4 516.7 515.2 508.6 +0 26.616314 Q01662 MAP1 Methionine aminopeptidase 1 16 100 0.3363349285532858 20.265 15.668501 12.6152935 14.893092 26.616314 18.421173 5.042172744535836e-85 2.8080245841774083e-54 1.519003082677122e-26 5.699939604193069e-121 1.0976920483679546e-97 1.2367636537369338e-148 21 21 21 21 21 21 False False False False False False 19 17 17 20 20 20 17472.31640625 16832.0078125 17093.275390625 32376.20703125 31734.81640625 32760.662109375 365920.28125 544328.625 543832.25 705409.1875 924837.25 1030303.25 5638.4 5476.1 5714.9 10329 9963.1 10383.3 +5.589089012810809e-202 15.511428 Q330K2 NDUFAF6 NADH dehydrogenase (ubiquinone) complex I, assembly factor 6 4 100 0.070733254469412 7.0782547 8.470967 9.8296500000000009 7.128439 10.115527 15.511428 4.350361070366462e-6 2.6620134649070775e-15 8.411890127303258e-7 6.643640215141803e-6 2.3716988152643457e-7 2.3557367812787505e-90 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 2586.01416015625 2258.01953125 2194.655029296875 2129.81494140625 2219.230224609375 2340.83740234375 59453.26171875 121529.234375 119320 73919.8828125 123352.7578125 125541 400.5 399.1 389.1 378.5 379.1 402 +2.177801890558284e-148 14.158754 P38615 RIM11 Serine/threonine-protein kinase RIM11/MSD1 6 100 0.37961276714293685 14.104424 6.7084503 7.117735 10.592452 10.996316 14.158754 3.3604202205876378e-68 1.5928251284536196e-5 1.3832771302646115e-5 1.1059689693517456e-45 1.8846816227063843e-11 2.975773451258884e-56 6 6 7 7 7 6 False False False False False False 5 5 5 6 7 6 1268.1839599609375 1294.37841796875 1340.1268310546875 2769.317138671875 2571.698486328125 2676.218994140625 75642.734375 112706.75 99681.875 119698.3515625 158031.34375 150261.796875 274.7 270.4 292.5 592.7 572.2 542.1 +0 21.112062 Q9NZM5 NOP53 Ribosome biogenesis protein NOP53 11 100 0.05741803679171308 21.112062 15.074737 14.293005 11.429825 13.975288 7.986682 1.8928885357038722e-87 4.917023182300447e-53 1.2064135781020924e-55 3.516932773053255e-63 5.372499435476082e-47 6.2486462641364815e-6 13 13 13 13 13 13 False False False False False False 8 11 10 10 10 9 8354.7236328125 7594.8447265625 8212.736328125 8692.5322265625 7491.7587890625 7923.31884765625 193986.578125 357745.65625 314677.28125 285304.15625 394734.875 376552.53125 2655.1 2513.2 2658.2 2832.3 2483.7 2623.5 +3.0761160188556246e-5 5.4630456 O00481 BTN3A1 Butyrophilin subfamily 3 member A1 2 100 0.15279104744737695 4.0968704 3.250947 3.2648025 5.4630456 3.8888133 5.0477076 2.2087197590697096e-4 3.9032375777536517e-4 4.5509329050725476e-4 9.067314762823959e-5 3.7931037098406215e-4 1.366040608539894e-4 2 2 2 2 2 2 False False False False False False 2 2 2 2 2 2 392.1623840332031 241.6154022216797 346.6889343261719 347.50244140625 316.7432556152344 353.9503173828125 77320.3046875 162003.046875 167807.578125 108032.5234375 254682.4375 320881.875 30.3 19.8 25.7 25.8 24.9 29.1 +0 22.561909 P62491 RAB11A Ras-related protein Rab-11A 14 100 0.03383356638414832 22.561909 20.882275 14.956987 15.882323 14.6566725 17.076828 1.2361398211397241e-91 1.064646631534126e-65 1.6920722446484303e-61 3.607940686947895e-126 5.273078925055293e-58 2.1901210858214085e-136 18 18 18 18 18 18 False False False False False False 16 16 16 15 16 17 80197.3359375 77714.3984375 78214.4921875 80090.046875 73240.0546875 76144.109375 1001105.9375 1720753.125 1602257.625 1155691.25 1570352.875 1747853.75 29291.699 28637.801 28986.6 31691.301 29508.801 30940.9 +0 20.952557 Q70J99 UNC13D Protein unc-13 homolog D 32 100 0.029678863107490322 20.254866 10.886061 17.768728 14.46272 16.332115 20.952557 5.38085279635742e-85 1.1173777966068218e-44 1.0237797059396884e-68 9.632764537860714e-119 1.4161631822239813e-69 8.332063232092574e-166 41 43 41 41 43 40 False False False False False False 35 35 32 30 29 31 5988.6708984375 6395.77490234375 5982.57177734375 6306.0205078125 6049.2255859375 6004.97314453125 334841.34375 606323.8125 560306.3125 447177.78125 610725.8125 671935.125 1424.5 1808.1 1521.8 1440.1 2818.7 1411.9 +1.8278634008021584e-270 16.991644 Q08921 TCO89 Target of rapamycin complex 1 subunit TCO89 22 100 0.37431338074058984 10.9308405 8.583056 7.285821 16.991644 10.422754 16.982841 1.394203133371225e-54 1.6706148641162845e-16 1.1203217725302378e-5 3.995940393718152e-132 2.4758308805520152e-8 1.6030445679675807e-133 22 22 20 22 23 22 False False False False False False 12 12 9 17 17 17 881.51129150390625 992.80322265625 867.26434326171875 1951.62060546875 1866.211181640625 1702.183837890625 106972.671875 181767.171875 137603.34375 172415.0625 201009.375 218340.109375 236 240 184.7 490.1 465.3 444.4 +3.437566443887345e-103 12.799632 P67338 yoaH UPF0181 protein YoaH 3 100 0.4903012960936833 6.2432256 7.6763988 8.257066 3.9299393 4.49292 12.799632 3.473500851918569e-5 1.684836274130162e-8 5.576359288467216e-6 2.864307011295879e-4 2.523706344333398e-4 4.7802578941475955e-31 4 3 3 3 3 3 False False False False False False 4 3 3 3 3 3 777.98699951171875 1098.8172607421875 1184.9002685546875 269.81512451171875 457.338623046875 609.36590576171875 119639.0703125 132772.515625 129841.8984375 106228.984375 93556.8203125 92671.625 628.6 732.9 731.9 248.8 329.8 425.2 +0 19.674065 P0AET8 hdhA 7alpha-hydroxysteroid dehydrogenase 10 100 0.34881184897337447 10.487714 18.40175 14.92898 14.559994 7.361296 19.674065 2.210721824092283e-45 3.67576372145923e-60 1.9870772366205618e-61 3.029361340658734e-119 1.3006230096359855e-5 5.019249706570745e-157 10 10 10 10 10 10 False False False False False False 8 9 8 6 5 5 9545.1376953125 9303.1328125 10259.6298828125 5471.4521484375 4466.53125 5282.9755859375 128878.03125 283952.8125 261431.8125 170468.765625 221551.4375 266944.4375 2827.2 2904.1 2990.1 1640.9 1304.4 1463.6 +6.623381015642176e-212 15.74052 Q8TGU7 YBR126W-A Uncharacterized protein YBR126W-A 2 100 0.41721182777580285 12.1420145 6.679459 15.74052 6.8370686 8.376493 15.456102 3.286417265047763e-63 1.686780834909597e-5 1.7910520585735997e-63 1.6226135633446664e-5 6.0143991514597165e-6 8.779709964943496e-89 3 2 2 3 2 3 False False False False False False 3 2 2 3 2 3 2196.25537109375 2387.466064453125 2050.6025390625 5531.41455078125 4363.6591796875 4199.8916015625 146732.59375 222496.796875 260086.84375 191382.34375 367447.03125 352224 1435.8 1476.4 1235.3 3672.8 2685 2726 +0 23.389826 P00452 nrdA Ribonucleoside-diphosphate reductase 1 subunit alpha 27 100 0.3370602511587826 21.897919 19.591507 15.600987 17.865948 18.189764 23.389826 1.0246661697937139e-89 8.622565923671445e-63 4.057742052377195e-63 6.571279740564204e-137 2.089344378419411e-74 3.85253729918028e-183 34 34 34 34 32 33 False False False False False False 30 30 29 25 22 26 12538.865234375 12958.802734375 12508.5712890625 6994.40478515625 6404.08251953125 6761.40966796875 181844.796875 339179.375 297063.59375 174082.65625 231344.421875 237726.078125 2847.3 2848.9 2837.5 1604 1441.4 1532.6 +0 17.552315 Q12672 RPL21B 60S ribosomal protein L21-B 1 100 0.30045339268040766 9.165252 17.552315 8.568226 12.137648 13.690664 14.560946 1.2499748996219873e-23 2.609477153348595e-58 4.387622509178655e-6 1.81159308458957e-80 8.542432902372185e-43 1.8833958396350112e-65 3 3 3 3 3 3 True True True True True True 3 3 3 3 3 3 11652.435546875 11454.8369140625 12170.736328125 20448.177734375 19058.677734375 21801.42578125 289552.625 462877.25 446221.625 362020.4375 518558.8125 670450.5625 5357.1 5102.7 5393.3 8658.3 7990.7 8563.3 +1.6707338859733573e-53 10.8509 Q9H1H9 KIF13A Kinesin-like protein KIF13A 21 100 0.06918617440745482 10.8509 6.8243594 6.982732 7.016226 7.7710667 6.702001 7.512847145833319e-53 1.172370454795399e-5 1.620600449066968e-5 9.96859743100263e-6 9.68035246732738e-6 2.609990259608553e-5 21 20 21 20 21 20 False False False False False False 17 13 15 9 12 12 2143.50634765625 2291.7763671875 2151.930908203125 2314.685791015625 2565.21435546875 2199.49072265625 670355.0625 1121635.25 1091913.875 946607.4375 1403827.5 1466591.875 162.8 166.2 488.9 164.8 523.9 155 +0 26.294552 Q03280 TOM1 E3 ubiquitin-protein ligase TOM1 86 100 0.3696365554708501 22.792406 26.294552 22.869719 17.61902 25.616262 23.790874 2.6711256666086405e-92 2.262073964774477e-78 9.218881972334416e-83 1.511625995899915e-135 7.39279527847744e-95 4.710098021532678e-186 92 92 93 99 96 97 False False False False False False 64 61 65 83 84 84 3598.625732421875 3445.938720703125 3505.251220703125 7338.52490234375 6908.84033203125 6999.61572265625 446427.8125 759221.0625 725595 808968.1875 1099759.25 1134010 632.2 648.7 651.8 1372.6 1258.2 1308.9 +0 21.504963 Q96BN8 OTULIN Ubiquitin thioesterase otulin 20 100 0.01677677415477904 15.738313 20.370861 16.787357 19.138027 21.504963 18.971691 1.6622302325592982e-72 1.5421212654908447e-64 3.7086164123242723e-66 5.270828240288471e-144 2.4303622883367493e-83 2.69609346587866e-152 23 22 23 23 22 22 False False False False False False 21 20 18 20 17 18 16405.109375 16127.26171875 16152.01171875 16324.603515625 15630.5302734375 16076.87109375 187037.84375 356496.40625 338384.0625 218020.9375 335609.71875 340466.59375 5669.7 5631.9 5729 5488 5150.1 5519.5 +0 17.989948 Q05471 SWR1 Helicase SWR1 17 100 0.40976075080122915 7.258782 7.360248 7.8078465 7.015769 7.061382 17.989948 1.3918169582163712e-6 5.898852888627299e-7 7.773367873913906e-6 9.979354606584323e-6 1.9169823514822895e-5 8.537080766720914e-146 15 16 14 17 17 17 False False False False False False 7 8 9 12 14 14 1354.161376953125 1173.5963134765625 1491.261962890625 3064.47021484375 2620.645263671875 2973.244384765625 259191.203125 378088.4375 428282.125 475824.25 522559.34375 580892.75 113.1 108.1 124.4 230.8 214.3 242.5 +0 21.475315 Q07651 FMP45 SUR7 family protein FMP45 5 100 0.332167487175565 17.346766 13.682602 12.690924 6.983778 21.475315 15.880454 7.284431177494018e-77 3.564692207146207e-50 1.4247096623820119e-27 1.0710437046003956e-5 2.9179175572956783e-83 3.450246966917758e-101 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 2851.615966796875 2816.35302734375 3064.824951171875 5562.39501953125 5370.017578125 5366.32568359375 68162.515625 134025 153533.109375 152504.15625 159240.96875 182496.15625 795.7 846.1 871.6 1709.9 1599.9 1612.7 +1.5076311099674907e-297 17.522835 P0A9S1 fucO Lactaldehyde reductase 8 100 0.23828959006985703 9.768189 8.472814 17.522835 5.5399547 6.639019 5.495533 1.650166586947674e-32 2.5458174574409187e-15 4.4986522002796546e-68 8.470766837502396e-5 3.547811986818742e-5 1.0080943659340802e-4 9 8 9 9 6 7 False False False False False False 7 5 7 5 5 5 3166.797119140625 2897.195556640625 2976.718994140625 2355.8994140625 2012.2977294921875 1661.18310546875 122940.421875 272507.5625 237807.765625 238984.515625 396290 391699.28125 649.8 602.4 631.3 419.3 252.6 325.8 +6.129273460439473e-31 9.597303 Q08919 TRE1 Uncharacterized protein TRE1 7 100 0.29132365533099147 2.4505382 6.5616956 6.7321925 7.5692472 9.597303 6.6582556 7.238680534465349e-4 2.0929236237411546e-5 2.342458614313898e-5 2.753916538801893e-7 1.7109153513770975e-6 2.7216220441396797e-5 5 6 6 7 7 7 False False False False False False 5 5 5 5 5 5 436.4785461425781 464.5811767578125 461.5273742675781 782.77349853515625 815.3614501953125 736.7073974609375 330161.96875 577787.0625 544060.4375 491801.9375 584161.5625 641554.5 46.1 48.9 66.5 111.5 125 108.9 +0 18.612358 P40970 LCB2 Serine palmitoyltransferase 2 18 100 0.387249059063025 16.077578 18.315947 13.312849 14.335721 18.612358 13.566549 2.0479457868648448e-73 5.682404522085355e-60 4.869070107242774e-37 4.338264298510772e-118 1.5936525148072993e-75 3.739702913426443e-44 22 23 21 23 23 23 False False False False False False 16 17 16 20 18 19 7499.78466796875 7609.177734375 7194.5927734375 16304.81640625 14983.888671875 15196.2529296875 354946.96875 669947.875 625704 650908.3125 989220.375 1020253.25 2087.1 2231 2111 4441.6 4172.5 4266.6 +0 22.707216 P49321 NASP Nuclear autoantigenic sperm protein 44 100 0.01765518751221107 21.717964 22.707216 22.41864 18.051262 19.044582 21.196892 3.385798364734313e-89 6.97804476169634e-70 1.7909198242562422e-81 6.207254029702388e-138 1.121395853790201e-76 1.6822092392714237e-167 51 50 51 51 50 49 False False False False False False 45 44 45 45 41 44 80615.8515625 79995.4453125 80087.4296875 81560.3359375 77423.6953125 79171.1484375 467959.21875 784976.5 779438.3125 572701.875 736249 777656.375 17305.699 16926 17058.199 17302.9 16075.4 16614.301 +9.0720785453983e-310 17.754375 P33329 PPZ2 Serine/threonine-protein phosphatase PP-Z2 18 100 0.32729801648490786 11.334677 8.6592 7.0431476 10.041447 17.754375 12.314925 3.2409733584180934e-61 2.43965590606031e-17 1.5358567868441538e-5 6.543439986764946e-36 2.9162983290629195e-73 2.991924309786176e-24 19 18 19 19 19 19 False False False False False False 10 13 9 14 15 18 9088.5029296875 8313.5849609375 9436.7041015625 17170.794921875 15473.984375 16653.91796875 104302.90625 247342.4375 200693.625 203466.828125 333035.8125 354604.46875 984 728.2 1103.4 1398.5 1247.4 1402.9 +6.4617264603e-313 17.81326 O95999 BCL10 B-cell lymphoma/leukemia 10 7 100 0.061183677483753245 13.93691 14.423188 17.81326 6.937406 7.062004 6.691715 9.113698574780438e-68 1.0975381210405456e-51 7.831526974888063e-69 1.2276578572589282e-5 1.915487787660682e-5 2.638931657617731e-5 7 7 7 6 7 7 False False False False False False 5 6 6 5 5 5 1929.631591796875 1971.502197265625 1799.3748779296875 2083.365478515625 2145.06103515625 2025.320068359375 179198.5625 429777.1875 366191.71875 452764.40625 611956.6875 522676.625 749.9 750.9 769.7 632.9 641.6 720.9 +0 23.637068 P53075 SHE10 Outer spore wall assembly protein SHE10 19 100 0.3588830355931161 20.05691 17.979671 12.034542 17.703931999999998 23.637068 17.734003 1.9792175651156884e-84 3.080022061844749e-59 1.5269030754041464e-19 5.178865598493862e-136 3.0203521820934814e-89 4.001829056283645e-144 23 22 23 23 23 23 False False False False False False 19 17 20 23 22 20 10845.0712890625 11291.25 10649.5283203125 22108.8046875 21026.810546875 21486.595703125 141860.671875 248901.71875 232228.734375 293324.6875 420779.15625 413622.25 3762.6 3934 3833.1 7547.8 7107.7 7300.6 +0 21.329233 O96000 NDUFB10 NADH dehydrogenase [ubiquinone] 1 beta subcomplex subunit 10 11 100 0.02897846597776368 18.004116 14.059209 13.440951 15.528779 21.329233 17.570213 1.122735728592948e-78 6.129203631601033e-51 3.246572404372888e-39 2.670213990058328e-124 7.323871293724924e-83 4.66056747489976e-143 13 13 13 13 13 13 False False False False False False 9 10 10 11 10 11 23257.712890625 23900.63671875 23265.681640625 23044.21875 21943.33203125 22606.154296875 256658.671875 628580.75 532309.5625 373294 617360.375 667421.125 11398.1 10803.6 11479.1 10533.4 10039.2 10522.8 +4.378565091967e-311 17.779043 P35240 NF2 Merlin 15 100 0.04205102077068319 16.26683 8.679593 8.674474 17.779043 11.787928 13.59506 6.324699598993004e-74 1.4479648052185684e-17 4.105966103856124e-6 1.9955448334023493e-136 9.724972942742511e-19 1.0709494436452214e-44 16 16 17 17 16 17 False False False False False False 8 11 9 10 9 11 2101.060302734375 1869.1690673828125 1989.5128173828125 1925.9769287109375 2046.7908935546875 2019.0560302734375 81481.15625 129219.2890625 116134.0234375 95662.53125 136247.875 130099.8984375 350.2 344.8 361.9 387.8 383.6 432.7 +0 24.894474 Q8WUM4 PDCD6IP Programmed cell death 6-interacting protein 53 100 0.02226162704829174 24.894474 18.2818 18.208384 17.03154 21.226482 21.010973 1.9364526809117913e-98 6.749285622505254e-60 7.030914701249032e-70 2.4320947578477128e-132 1.4007232291731416e-82 3.293054839932904e-166 71 71 71 70 69 71 False False False False False False 61 65 66 62 60 57 44569.14453125 45411.4140625 44192.68359375 46516.984375 43672.921875 44942.3125 413004.15625 711949.8125 695485.25 478001.90625 693846.75 712240.0625 15319.1 15466.5 15101.3 15861.6 14522.4 15024 +5.538611811519355e-144 14.036918 Q7Z6K3 PTAR1 Protein prenyltransferase alpha subunit repeat-containing protein 1 13 100 0.04386768184236795 14.036918 8.540086 10.372484 10.402604 7.3768697 12.671641 5.023339265405187e-68 4.866342867949827e-16 4.6490982351666246e-8 3.686554960965393e-42 1.2827609742785403e-5 3.852175281942243e-29 12 13 13 13 13 13 False False False False False False 8 10 8 8 9 10 2241.61865234375 2279.185302734375 2208.32763671875 2354.732666015625 2060.83984375 2205.80126953125 100557.921875 157771.25 159315.796875 132819.296875 180278.5625 194889.5 555.6 591.3 554.6 473.6 549.3 573.8 +0 23.121532 P08839 ptsI Phosphoenolpyruvate-protein phosphotransferase 23 100 0.32309225829732074 23.121532 18.647135 16.583319 21.579102 18.210756 16.870201 3.0178463467912724e-93 1.0530137437642105e-60 1.2452314516895844e-65 4.41962301973154e-158 1.839416115055228e-74 3.944784438927758e-130 27 27 27 26 26 27 False False False False False False 24 25 24 19 17 17 26202.138671875 26390.52734375 26868.9140625 14715.2841796875 13975.8359375 14609.0244140625 249314.046875 479396.375 445019.5 288326 353081.5625 436015.6875 6528.4 6674.5 6666.3 3618.4 3510.9 3605 +6.267134210920348e-238 16.316025 P38342 TSC10 3-ketodihydrosphingosine reductase TSC10 7 100 0.4170406042335987 11.380291 8.2943125 12.572841 10.836789 13.473308 16.316025 2.5026591896610923e-61 1.7296537408914523e-13 5.582988762497983e-26 1.853201356483281e-50 9.587713441718007e-40 4.716878081257364e-114 7 7 6 7 7 7 False False False False False False 6 5 5 6 7 7 2587.42138671875 2255.81005859375 2723.80126953125 5908.7958984375 5251.6376953125 5534.291015625 96686.5390625 175985.671875 193175.4375 204076.5625 250643.53125 334730.09375 575.6 543.3 600.7 1292.3 1172 1249.8 +0 24.115328 Q06330 RBPJ Recombining binding protein suppressor of hairless 14 100 0.06823529485466921 12.089721 15.418301 24.115328 13.426149 8.416063 18.299887 4.42860777882652e-63 9.428877661729004e-54 2.395388748979242e-86 1.8643677546159674e-113 5.811264522611776e-6 7.837582712421953e-148 16 16 16 16 15 16 False False False False False False 11 13 12 10 10 12 1817.3463134765625 2192.118408203125 2106.5546875 2099.252685546875 2053.31689453125 2211.838623046875 267415.09375 349775.28125 349544.84375 419674.21875 453876.75 500243.71875 612.9 732.9 674.2 655.7 626.7 732.1 +0 18.026878 Q9HAB8 PPCS Phosphopantothenate--cysteine ligase 13 100 0.02968218502995235 16.871086 15.28589 10.201464 11.719404 18.026878 14.231475 1.4461217221264326e-75 1.780104442032127e-53 1.485885939749442e-7 5.6199928523198553e-70 5.583889718187801e-74 7.411380426460097e-58 13 13 13 13 13 13 False False False False False False 12 13 12 13 13 13 17093.037109375 17551.33984375 16432.1328125 17862.962890625 16930.318359375 16907.40625 323832.5 502283.75 487801.53125 365783.46875 673554.125 639454.875 6832.6 7013.7 6583.9 7168.1 6344 6661.3 +0 26.077126 Q8N1F7 NUP93 Nuclear pore complex protein Nup93 47 100 0.021286856392831982 22.79665 22.147127 17.396532 17.753942 26.077126 17.216541 2.6033000596590673e-92 1.417268726923271e-68 9.607079415436215e-68 2.74561848678483e-136 3.682919203054611e-96 1.957711228645954e-140 59 60 61 61 61 59 False False False False False False 53 49 49 54 50 50 31270.25 30901.701171875 31129.75 31612.89453125 29702.32421875 30726.90234375 245691.578125 471711.1875 448476.375 361373.5 480862.875 485770.625 9625.8 9467.6 9566.4 9703.4 9278.2 9503.1 +0 24.042097 Q8NBL1 POGLUT1 Protein O-glucosyltransferase 1 12 100 0.03339975792546757 15.605444 9.797566 14.510113 24.042097 20.720427 22.081211 3.761280072001769e-72 8.295102426828228e-33 4.4233466422537407e-60 6.647049129258373e-173 3.41957000709833e-81 9.885196545663066e-174 12 13 12 13 13 12 False False False False False False 9 11 10 11 9 9 6310.5126953125 6076.6494140625 5944.96728515625 6121.185546875 5712.181640625 6122.4541015625 115272.546875 251781.609375 240078.546875 297308.875 350289.65625 350555.75 1310 1348.6 1376.1 1331.8 1193.5 1340.1 +6.385353703821247e-6 6.9814215 Q86T24 ZBTB33 Transcriptional regulator Kaiso 5 100 0.1060724387546206 5.567951 5.874708 6.9814215 5.012561 6.4945993 5.6582036 7.199897388106567e-5 4.840394387473588e-5 1.6220808088182392e-5 1.3159252571013293e-4 4.339364262791294e-5 8.872414879929213e-5 5 5 4 5 5 4 False False False False False False 5 5 4 5 5 4 1249.0518798828125 989.259765625 1030.49755859375 1151.4130859375 1164.3199462890625 953.8917236328125 357949.3125 380131.34375 1187105.625 271982.71875 585102.125 672351.5 116.4 99.4 83.2 114.3 103.4 85.9 +0 23.1997 P38759 VPS29 Vacuolar protein sorting-associated protein 29 10 100 0.35616787058689187 14.80486 18.156052 14.814294 23.1997 17.291124 20.29053 4.963111858387713e-70 1.2680694412775452e-59 3.8465919812743254e-61 8.974589324152276e-168 4.71343815295563e-72 3.118215003193937e-161 12 12 12 12 12 12 False False False False False False 8 10 10 11 11 12 3377.609130859375 3271.34130859375 3323.414794921875 6628.81298828125 6534.24072265625 6403.81787109375 514041.09375 879919.9375 762850.5 1082164.875 1547613.875 1720198.75 1322.7 1230.8 1241.7 2273.2 2504.6 2498.9 +9.427648617549672e-196 15.364722 P56937 HSD17B7 3-keto-steroid reductase/17-beta-hydroxysteroid dehydrogenase 7 6 100 0.1320645805529938 6.9296412 7.4471817 6.6910667 15.364722 10.905694 6.290949 8.46827981364346e-6 2.635459205544066e-7 2.4766412945584102e-5 1.9520041276452297e-123 7.70001073270373e-11 4.393719417905404e-5 7 7 7 6 7 7 False False False False False False 5 5 6 5 5 5 6581.0517578125 6761.77978515625 8350.4580078125 6195.451171875 5738.419921875 6629.3046875 453865.96875 1083922.125 862467.3125 910386.5 1254328.875 845999.75 1235.7 1284.8 1282.1 1977.8 1307.9 1336.9 +0 21.080008 Q9Y4R8 TELO2 Telomere length regulation protein TEL2 homolog 33 100 0.016738081760080657 16.779364 18.82114 14.277692 15.326853 21.080008 19.289633 2.5719166701385723e-75 4.3833935306490125e-61 2.549075997713163e-55 3.083740222901374e-123 3.522067738708685e-82 1.9972938796363326e-154 35 34 35 35 34 35 False False False False False False 25 25 28 26 25 24 6870.61865234375 6854.87890625 6853.28271484375 7102.16796875 6764.42919921875 6948.43896484375 111868.265625 193823.671875 182816.296875 156797.421875 202878.4375 205442.203125 1846.3 1821.3 1841.1 2093.7 1956.4 1958.4 +5.3525503193383685e-52 10.778375 Q86U28 ISCA2 Iron-sulfur cluster assembly 2 homolog, mitochondrial 6 100 0.14202767706728764 9.536198 6.2666187 7.0116186 7.0120397 8.574452 10.778375 6.726932060563819e-29 3.118265618833392e-5 1.592254247163611e-5 1.0061961365099753e-5 5.089033427440906e-6 3.043982429752821e-10 6 6 5 6 6 6 False False False False False False 5 5 5 5 5 5 2608.39697265625 2266.2119140625 2427.094482421875 3358.43408203125 2563.879150390625 2702.936767578125 94583.4921875 139624.53125 154717.71875 153787.234375 232218.09375 214356.171875 469.1 697.3 664.6 553.2 694.3 754.4 +6.057666434715413e-6 7.0111365 Q12770 SCAP Sterol regulatory element-binding protein cleavage-activating protein 14 100 0.1483666681076057 5.508733 7.0111365 6.7018814 5.0079584 6.657938 5.1670823 7.583623087322203e-5 5.9155024302011035e-6 2.448321034154631e-5 1.3179377660800417e-4 3.4789793463971876e-5 1.2720335313519664e-4 14 13 14 12 14 14 False False False False False False 8 6 7 5 5 7 628.38671875 766.576904296875 544.07952880859375 646.0848388671875 523.50738525390625 554.77447509765625 326375.6875 543558.5 528644.1875 235984.96875 468051.4375 500579.1875 141.1 108.2 127.7 79 99.1 122.6 +9.83426958374845e-143 14.002005 Q03466 EBS1 Nonsense-mediated mRNA decay factor EBS1 13 100 0.3004042995443566 6.4812245 5.3005986 6.675425 7.0996714 6.9900584 14.002005 2.5211528230983934e-5 8.423666270189104e-5 2.5083631760889534e-5 7.438917883716237e-6 2.1151009010671652e-5 6.970661385820021e-53 12 13 11 13 13 13 False False False False False False 7 6 8 11 11 12 1101.7320556640625 964.37408447265625 950.43695068359375 1919.077880859375 1565.46435546875 1657.555908203125 276147.46875 609287.625 540625.1875 502733.6875 774427.5 717125.3125 159.8 142.8 139.9 303.6 245.7 283.3 +0 24.824781 P12004 PCNA Proliferating cell nuclear antigen 15 100 0.03513210770362393 18.650537 19.250322 11.718639 17.221615 18.934336 24.824781 1.7978871268445655e-80 4.9393907942071895e-62 2.1602181241395216e-16 2.2587103016474685e-133 2.2144540056725876e-76 1.1364343414763915e-193 21 21 21 21 21 21 False False False False False False 21 21 21 20 20 21 161347.75 169087.796875 164837.5625 163327.03125 152625.65625 158283.578125 2752979.75 3730814.5 3648718.25 3241834.5 3609575 3764759 72926.602 76852.102 74031.703 73455 71294.102 72173.398 +0 14.666674 Q96GE9 DMAC1 Distal membrane-arm assembly complex protein 1 1 100 0.19947636730970045 7.400291 6.492469 6.7527313 14.350612 14.666674 5.543337 4.3091898841387706e-7 2.3476847011209753e-5 2.2717501697270258e-5 3.637218102302215e-118 3.5530883568758044e-58 9.730514235183604e-5 2 2 2 2 2 2 True True True True True True 2 2 2 2 2 2 2967.61865234375 3211.8818359375 2532.9755859375 3684.445556640625 2927.203857421875 2001.5478515625 156483.515625 249507.890625 240366.6875 128394.09375 152852.828125 158096.875 1442 1561.1 1505.4 1806.2 1439.2 1353.3 +2.8170940533607923e-171 14.763263 Q96K58 ZNF668 Zinc finger protein 668 14 100 0.05587793484116442 12.582891 7.270171 12.817324 14.763263 6.813241 14.272221 2.5917639986340248e-64 1.243010585339045e-6 2.3811850649531656e-29 2.6942358597126005e-120 2.7805720671156153e-5 9.116250648312513e-59 14 15 14 14 14 15 False False False False False False 9 11 12 9 9 10 4148.564453125 3844.662841796875 3842.831787109375 4271.6865234375 3711.595703125 3806.300048828125 276465.625 559113.4375 448770.59375 534385.375 1032426.875 827827.4375 741.9 717.4 720.7 902.1 749.7 856.7 +0 23.482811 O14497 ARID1A AT-rich interactive domain-containing protein 1A 54 100 0.04351770245917772 22.349104 14.278915 12.718605 14.84619 18.600266 23.482811 5.136631085281216e-91 2.176763352876084e-51 5.903358736042533e-28 9.988403481794497e-121 1.7149964710671367e-75 8.274437460657018e-184 60 59 61 60 59 61 False False False False False False 44 45 52 43 44 47 4447.73828125 4215.23095703125 4508.14990234375 4521.65380859375 4180.865234375 4085.912353515625 189746.78125 331285.65625 287845.53125 214946.25 310514.3125 310492.15625 826.4 759.6 831.2 842.9 744.9 765.6 +0 26.039026 Q96S55 WRNIP1 ATPase WRNIP1 21 100 0.02527628808440222 23.346214 17.820673 16.053934 8.525974 26.039026 18.141075 6.722383362711303e-94 6.813819258375997e-59 2.8483200962566094e-64 8.737920106529775e-16 4.7193991258499194e-96 8.716233358511331e-147 22 23 22 23 23 23 False False False False False False 18 20 19 18 19 18 11515.4638671875 12095.4833984375 11577.9423828125 11990.248046875 11316.0859375 11688.3271484375 133866.9375 231612.046875 216134.671875 179617.46875 261061.4375 252938.25 2256.9 2296.9 2188.6 2244.2 2173.8 2223.8 +0 19.022552 P22276 RET1 DNA-directed RNA polymerase III subunit RPC2 24 100 0.3612949804935078 12.991953 8.644251 13.589217 16.326504 15.273684 19.022552 2.3999966548037388e-65 3.574368623040213e-17 7.89887377677463e-42 1.557231455842444e-128 6.953577635334001e-67 1.2361610070204068e-152 26 23 24 25 26 26 False False False False False False 16 14 14 22 19 22 2187.89697265625 2331.20068359375 2219.289306640625 4390.10400390625 4375.9150390625 4579.48876953125 116566.4296875 233873.671875 197908.984375 259598.5 404967.28125 363685.25 402.8 381.4 410.8 779.5 770.3 834.5 +0 21.98006 Q9UN86 G3BP2 Ras GTPase-activating protein-binding protein 2 19 100 0.04184115416186975 18.63291 13.9273 20.532486 18.435017 21.757608 21.98006 2.015295848202618e-80 1.1372334393514646e-50 3.503237791344566e-76 4.637758285905651e-140 4.867770195590143e-84 5.180258013832218e-173 30 30 30 29 30 30 False False False False False False 26 26 26 25 26 25 23102.318359375 24018.77734375 24563.822265625 23815.865234375 21992.421875 22498.46484375 336200.59375 556587.75 590868.875 390967.09375 581799.1875 602944.625 8144.2 8561.5 8643.9 8306.6 7860.1 7926.7 +0 20.062834 P60228 EIF3E Eukaryotic translation initiation factor 3 subunit E 23 100 0.03055312264647142 19.285276 13.892427 15.233119 19.916965 20.062834 17.640522 2.995981391074582e-82 1.340419617432652e-50 3.4399912361789605e-62 1.9434959018340352e-148 2.08688529296899e-79 1.6231388005099316e-143 27 27 27 27 27 27 False False False False False False 24 24 25 24 24 22 33191.9140625 33204.61328125 32953.5859375 31968.365234375 31071.26953125 31202.0390625 458969.25 827474.3125 758390.875 548449.875 793155.375 835578.3125 13339 12889.9 13237.2 12823.4 12003.4 12110.2 +6.594644956528047e-6 6.964682 Q8NB14 USP38 Ubiquitin carboxyl-terminal hydrolase 38 5 100 0.1662927442569621 5.4981647 6.8330536 6.964682 6.6798053 2.5892296 6.6774836 7.657403688254247e-5 1.1417598564202234e-5 1.6565609662526712e-5 2.2733798431315848e-5 9.689984725604254e-4 2.6756082278080138e-5 4 5 4 4 3 5 False False False False False False 4 5 4 4 3 5 246.69473266601562 378.3717346191406 322.97088623046875 260.0608215332031 302.6088562011719 354.3230895996094 74892.46875 128128.21875 98265.4375 69494.234375 103604.7578125 91153.9609375 15.1 30.1 25 24.6 13.6 30.3 +1.802462952160597e-69 11.557836 P38291 POP7 Ribonucleases P/MRP protein subunit POP7 2 100 0.4943982980360336 5.336984 6.072816 5.780657 8.827887 8.2165 11.557836 8.858960904429434e-5 3.9042212153717374e-5 6.986627198781783e-5 3.7390718465048934e-19 6.961201031633907e-6 6.298001887732789e-16 3 2 3 3 3 3 False False False False False False 3 2 3 3 3 3 624.02899169921875 566.31689453125 579.9686279296875 1706.8564453125 1500.5396728515625 1341.2369384765625 85802.4609375 185629.484375 84725.2421875 91389.6171875 165523.03125 176819.125 285.1 220 253.9 661 593 512.3 +6.822626329508722e-286 17.297417 Q96CS2 HAUS1 HAUS augmin-like complex subunit 1 10 100 0.08505128154400661 17.297417 10.365262 7.5482035 6.997255 13.517806 7.4751205 9.959067602329679e-77 7.531866852366417e-43 9.270665810163648e-6 1.0392848844990317e-5 2.3368217476095874e-40 9.726793355381315e-6 11 10 11 12 12 12 False False False False False False 7 9 9 6 7 9 1873.5865478515625 2157.00439453125 1808.195068359375 2160.9931640625 1932.9276123046875 2208.826416015625 103328.1484375 215299.34375 177987.109375 107284.3125 236000.484375 186514.609375 578.2 656.1 600.2 659.9 642.1 687.3 +3.189585263967032e-6 7.377127 P0ADK0 yiaF Uncharacterized protein YiaF 2 83.3 0.3923534074784337 6.1644716 4.870938 7.377127 -1.0643392 5.503917 3.0885081 3.81532782793919e-5 1.209567530223228e-4 1.0249569002363575e-5 0.004335285907795768 1.133404309806506e-4 5.596951390500246e-4 2 2 2 0 2 2 False False False False False False 2 2 2 0 2 2 521.37823486328125 491.7812805175781 407.5707702636719 NA 471.472412109375 130.61964416503906 89367.4140625 167302.15625 153314.375 NA 107996.375 349762.125 97.6 94.3 93.8 NaN 111.6 88.1 +0 21.634817 Q9H869 YY1AP1 YY1-associated protein 1 7 100 0.12615369104722285 7.373562 21.634817 7.2510815 7.0057034 14.112332 9.183931 5.472232905311963e-7 2.03137504807244e-67 1.1654476813901949e-5 1.0199856959701042e-5 4.2065410632348836e-49 2.2408489520117953e-6 8 8 8 7 8 6 False False False False False False 5 5 5 5 5 5 903.8499755859375 825.25469970703125 798.2010498046875 830.845947265625 608.6448974609375 847.71331787109375 37280.62109375 57063.39453125 46237.51171875 60434.9921875 88031.84375 91310.1640625 119.7 108.4 125.9 106.9 116.5 123.4 +1.1546499914699086e-281 17.214474 P26449 BUB3 Cell cycle arrest protein BUB3 8 100 0.4570624798315921 6.4209456 5.8804116 6.663464 6.9923987 11.884408 17.214474 2.755389457122034e-5 4.812319895714006e-5 2.5226077889045994e-5 1.0501067663851872e-5 7.246891167843693e-20 2.153777872580323e-140 8 7 8 8 8 8 False False False False False False 5 5 5 5 5 7 542.87078857421875 487.4093017578125 645.6689453125 1361.95703125 1408.2509765625 1247.6053466796875 278003.5 809815.1875 489179.5 515452.71875 756365.375 726449.875 113.3 90.8 164.1 263.1 267.6 272.3 +1.9230820762066446e-5 6.08063 Q63HQ0 AP1AR AP-1 complex-associated regulatory protein 3 100 0.3014405548385433 4.210531 5.7844954 6.08063 0.29448804 4.2341523 5.0107727 2.0522653490611433e-4 5.31052346666109e-5 5.255455190929526e-5 0.0026239283006062606 3.019024472919865e-4 1.3975116146401896e-4 2 2 1 2 3 2 False False False False False False 2 2 1 2 3 2 425.2494201660156 436.5215148925781 642.47955322265625 305.6153259277344 287.5849304199219 427.66033935546875 54531.8671875 126065.171875 137383.5 74232.7734375 110937.3828125 150182 53.9 59.8 65.4 45.5 45.5 62.5 +2.870611037339408e-6 8.405179 P32617 IES6 Chromatin-remodeling complex subunit IES6 7 100 0.3889731937021661 5.8439937 8.060444 6.680442 6.0381193 8.405179 6.9877906 5.446627508739704e-5 2.5774288951213704e-11 2.497140584026294e-5 5.33512023168714e-5 5.865713672414343e-6 1.7852420570049043e-5 7 8 8 8 8 8 False False False False False False 6 6 5 5 6 6 1906.520751953125 2197.443359375 1771.7642822265625 4544.62060546875 3593.325927734375 3739.63671875 268678.4375 528205.5625 494222.25 431889.40625 794863.9375 723427.5625 782.5 1070.7 933.3 2058.7 1390.3 1769.3 +0 24.687008 Q9UI26 IPO11 Importin-11 21 100 0.03682482111715074 20.941652 24.687008 19.730007 19.494738 20.847055 22.109297 5.889350088542362e-87 1.6203577872525716e-74 5.7182331929079816e-74 4.998759456619541e-146 1.5439983543258301e-81 6.276920742068718e-174 30 29 30 30 29 28 False False False False False False 23 25 23 22 22 22 6520.81005859375 6823.08447265625 6742.08203125 7160.1796875 6730.06591796875 6463.576171875 110366.4296875 194541.84375 180242.703125 125439.5546875 182324.796875 176852.5 1443 1533.7 1586.6 1639.7 1533.8 1444.3 +0 24.106613 Q92734 TFG Protein TFG 13 100 0.026649760687146796 24.106613 12.524736 18.276794 18.273754 7.6123238 16.235857 4.058714063989226e-96 7.45330641211789e-48 4.618579233202054e-70 3.635196951101707e-139 1.0791916574814376e-5 9.333794021654051e-112 15 15 14 15 15 15 False False False False False False 12 14 12 13 14 14 30839.349609375 31402.154296875 31392.400390625 29976.62890625 29581.88671875 29820.59375 657518.375 1172520.125 1095451.75 855776.25 1293738.375 1177447 11948.7 12004.5 11965.2 11276.3 11167 11368.8 +0 21.176558 Q05639 EEF1A2 Elongation factor 1-alpha 2 10 100 0.009500513303100845 18.025728 17.351116 15.892169 19.805908 21.176558 13.55397 9.776497951206796e-79 7.117628434259503e-58 7.381106919683777e-64 8.402129148562414e-148 1.911772489477426e-82 6.471946700407731e-44 14 14 14 14 14 14 False False False False False False 12 13 11 12 13 12 22907.595703125 23178.095703125 23352.00390625 22958.78515625 23348.869140625 23431.267578125 486834.625 894727.0625 813281.5 604338.6875 907675.5625 905018 5492.4 5494.7 5570.5 5601.7 5405.7 5471.5 +3.246830850746978e-6 7.35523 Q9BSK0 MARVELD1 MARVEL domain-containing protein 1 2 100 0.23131333738109833 4.168752 7.35523 3.2796855 5.6833334 6.8692384 4.842428 2.1086192046455284e-4 6.165285701537313e-7 4.5063945010104776e-4 7.471328079004101e-5 2.5452337332710196e-5 1.5696333504094912e-4 2 2 2 2 2 2 False False False False False False 2 2 2 2 2 2 2352.21728515625 2161.707275390625 1399.0006103515625 1825.689208984375 1441.679931640625 1454.464599609375 161829.203125 349632.03125 224731.90625 115607.453125 169669.5 190565.90625 394.6 392.2 250.1 369 331.4 359.9 +0 21.825691 P16370 RPB3 DNA-directed RNA polymerase II subunit RPB3 10 100 0.3993116702227452 12.591966 20.534122 13.030213 19.845457 13.837761 21.825691 2.459245145728068e-64 6.531892703462579e-65 1.638444241609501e-32 4.995454350172966e-148 6.147962765801196e-45 6.39717883405905e-172 14 14 14 14 14 14 False False False False False False 10 10 10 12 14 13 2793.38525390625 2820.848388671875 2966.95263671875 6497.107421875 5658.0703125 6091.14892578125 261823.796875 627570.75 526938.5 597162.5625 874635.5625 995956.9375 899.2 981.9 995.6 2121.3 1983.6 2056.5 +3.753375935219937e-159 14.448687 P32345 PPH3 Serine/threonine-protein phosphatase 4 catalytic subunit 5 100 0.33486842869859546 5.607448 3.8520496 5.122296 6.7566795 6.879863 14.448687 6.936364500873877e-5 2.4970742516421807e-4 1.1911614937244889e-4 1.967981815001568e-5 2.50244781754735e-5 8.367162243571911e-63 1 3 5 4 5 5 False False False False False False 1 3 5 4 5 5 806.04107666015625 975.73944091796875 873.75994873046875 1781.983642578125 1479.8497314453125 1616.8226318359375 216778.84375 331339.65625 262089.1875 368144.25 601249.875 453017.71875 51.9 181 202.1 357.3 319.3 356 +2.890938888860181e-196 15.376907 O75582 RPS6KA5 Ribosomal protein S6 kinase alpha-5 17 100 0.06231465302320852 10.677911 8.636185 10.758814 14.867035 9.014801 15.376907 3.2708052309846266e-49 4.3881320127967815e-17 1.2452872306935715e-9 7.781965797156779e-121 3.6873749960025894e-6 1.4658762496560786e-86 23 24 24 24 23 24 False False False False False False 17 16 15 16 14 18 2308.894775390625 2301.067138671875 2348.553955078125 2539.740966796875 2086.01708984375 2323.4033203125 60357.16015625 116093.96875 109117.75 92165.953125 141115.046875 138747.734375 457.5 481.2 429.5 532 398.7 496.8 +2.3744073563515727e-5 5.7973475 Q6P1L5 FAM117B Protein FAM117B 3 100 0.4449185494572167 2.3302355 3.1047318 4.056741 4.27634 5.7973475 0.60999876 7.82441543470869e-4 4.360225778893212e-4 2.58890751805409e-4 2.2431124144482828e-4 8.943932960463647e-5 0.002411889300806093 3 3 3 3 3 2 False False False False False False 3 3 3 3 3 2 193.2321319580078 228.77883911132812 313.120849609375 248.98696899414062 36.91852951049805 257.4150390625 192677.34375 270905.09375 276407.0625 176890.015625 382606.5625 305078.53125 17.6 28.3 28.5 22.5 5 15.9 +0 25.947332 Q9UHD8 SEPTIN9 Septin-9 39 100 0.028519892323595298 18.72206 25.947332 18.879627 23.777693 19.990267 19.171871 1.1361605376555894e-80 1.5199263004382689e-77 1.1380299562332471e-71 2.721650710076417e-171 3.2653028683590984e-79 1.2307202106432784e-153 44 44 44 44 44 44 False False False False False False 42 36 38 37 37 36 24359.677734375 23196.830078125 24461.826171875 24371.939453125 22876.03515625 23674.8828125 267334.09375 570687.625 539998.0625 391816.65625 562581.25 563601.5 7509.1 7192.8 7504.5 7324.7 6967.7 7203.7 +0 22.469715 P41208 CETN2 Centrin-2 5 100 0.1326346216263228 22.469715 10.562367 11.867718 6.688088 7.9097395 6.3160715 2.301621815969369e-91 4.587665064654505e-44 8.042147147884621e-18 2.2549295605364673e-5 8.822395242977867e-6 4.2780263118989874e-5 6 6 6 6 6 6 False False False False False False 5 5 5 5 5 5 3336.7919921875 2474.8359375 3198.19677734375 2383.727783203125 2883.715576171875 2857.44775390625 330062.46875 619366.625 489264.59375 423884.25 678688.8125 827148.6875 1477.8 894.5 1282.4 983.6 1191.3 1079.6 +0 20.421215 Q86UV5 USP48 Ubiquitin carboxyl-terminal hydrolase 48 31 100 0.03672998998472319 18.319489 12.894515 15.445489 14.869727 19.207323 20.421215 1.5025769865696056e-79 1.372396503946988e-48 1.002515275850952e-62 7.539627621388234e-121 4.147115607006649e-77 3.9698017230673477e-162 35 35 35 35 35 35 False False False False False False 24 29 27 19 24 24 4113.38427734375 4219.71435546875 4358.69677734375 4204.2060546875 4067.005859375 4484.138671875 106584 200978.875 201427.015625 165296.296875 218998.84375 239906.484375 765.4 791.1 812.4 784.2 773.1 837 +0 22.101425 P27348 YWHAQ 14-3-3 protein theta 11 100 0.02169985882840874 19.206041 14.01141 22.101425 19.651245 14.322549 21.336082 5.016476412837495e-82 7.663881950033418e-51 1.4438245135476818e-80 6.434025934173828e-147 1.9424616772394e-52 1.8087494904252265e-168 14 14 14 14 14 14 False False False False False False 14 13 14 14 14 14 142043.828125 150637.015625 143190.75 144217.953125 142576.359375 144541.34375 2035089.25 3730418.25 3763042 2353800.5 3636717 3681462.75 42746.801 45677.699 44293.5 43843.398 43110.398 43878.301 +1.6068516529582387e-5 6.303624 P21866 kdpE KDP operon transcriptional regulatory protein KdpE 3 100 0.37524776641699514 5.9584856 4.8225303 6.303624 3.4536772 5.9258904 3.3914812 4.8154457454095945e-5 1.2521536538436537e-4 4.094437720951218e-5 4.061540179567786e-4 7.99646509171882e-5 4.451194317949419e-4 3 3 3 3 3 3 False False False False False False 3 3 3 3 3 3 469.70440673828125 532.36962890625 542.43060302734375 286.3434753417969 228.28082275390625 255.38780212402344 52320.125 79489.7109375 63174.05859375 70850.0546875 116593.0234375 142758.546875 77.7 87.2 90.2 55.7 43.2 46.7 +1.054502786703447e-5 6.6905646 Q8TEA7 TBCK TBC domain-containing protein kinase-like protein 10 100 0.1310560787790476 6.445208 6.304005 6.6905646 5.318168 6.1720734 5.089801 2.6596706870201472e-5 3.0023930530491162e-5 2.47762321185105e-5 1.0308969664924193e-4 6.270352699509567e-5 1.3261992013107127e-4 9 10 10 10 10 10 False False False False False False 5 5 5 5 6 5 814.71954345703125 1087.6990966796875 786.72235107421875 998.9100341796875 1003.1926879882812 860.27001953125 789313 1069875.875 997002.8125 1390377 1808812.125 1431603.375 100.9 134.5 115 121.3 133.3 118.3 +0 21.981451 Q96IY1 NSL1 Kinetochore-associated protein NSL1 homolog 10 100 0.036294899556650835 14.306435 21.981451 12.419815 12.672717 17.83819 14.6812725 1.0029564026071766e-68 3.34143677536896e-68 5.189864516153312e-24 4.7064809447683244e-95 1.7529102890929142e-73 2.3354160177347e-68 14 13 14 14 14 14 False False False False False False 9 10 11 13 10 8 2355.071533203125 2256.580810546875 2237.9892578125 2445.179443359375 2259.37841796875 2242.236572265625 21293.267578125 37354.67578125 28273.302734375 29107.9140625 36565.07421875 28495.12890625 880.1 906.8 927.3 1156.9 934.9 936.9 +0 20.16024 Q13614 MTMR2 Myotubularin-related protein 2 16 100 0.045158587445615635 14.6404295 12.5598135 18.086279 16.222187 14.350903 20.16024 1.3452048002389808e-69 6.352393572407464e-48 1.4885530219664233e-69 5.618748841371701e-128 6.7402524696111725e-53 2.434005446501148e-160 18 18 18 18 18 18 False False False False False False 14 13 14 13 15 14 3202.191650390625 3375.5732421875 3138.15625 3375.85693359375 3312.877685546875 3009.963623046875 144046.328125 292145.0625 286080.65625 221722.78125 257194.46875 287824.5 951 1002.1 961 1037.7 982.1 954.4 +0 20.607874 P33136 mdoG Glucans biosynthesis protein G 23 100 0.31598880471092067 20.607874 18.831343 12.882393 19.63106 18.397953 14.74149 5.348257558790112e-86 4.162148157335475e-61 2.7107089993028272e-30 8.401769703915492e-147 5.880811377905653e-75 7.714167271637227e-70 31 31 31 30 31 31 False False False False False False 30 29 28 25 24 26 23246.865234375 22642.615234375 21872.400390625 12875.6650390625 12207.5498046875 12428.61328125 146411.90625 253360.84375 247408.28125 89826.1640625 148425.375 136206.328125 9459.8 9587.6 9232.6 5327.4 5294.1 5220.6 +1.0072324670999351e-280 17.195932 Q6UXD5 SEZ6L2 Seizure 6-like protein 2 7 100 0.06667826245896397 4.131999 6.772256 17.195932 6.8294253 8.540986 12.357161 2.1573105188629182e-4 1.3585735004106951e-5 3.226029675821028e-67 1.653695170436484e-5 5.228760579022365e-6 8.5053509583376e-25 7 7 7 7 7 7 False False False False False False 5 6 5 5 5 6 1263.420654296875 1181.822265625 1220.3677978515625 1113.9866943359375 1068.5982666015625 1256.9305419921875 72037.5546875 122005.0859375 102835.5234375 57111.046875 104269.03125 191901.171875 161.1 151.5 154.7 148.6 136.1 158.5 +7.155830188176804e-162 14.520309 O43760 SYNGR2 Synaptogyrin-2 5 100 0.051837817788223765 14.520309 8.822196 12.821382 14.517164 8.368657 6.6260056 2.7718618796407557e-69 3.4162097624465757e-19 2.0836916369044885e-29 5.044000422313165e-119 6.054838800628104e-6 2.8391654535927604e-5 5 5 5 5 5 5 False False False False False False 5 5 5 5 5 5 13309.7666015625 12324.5146484375 13149.5986328125 13675.2099609375 12034.626953125 12308.576171875 127606.1171875 271149.34375 242949.265625 143860.71875 239197.15625 250946.28125 5530.1 5270.6 5249 5697.1 5128.2 5293.7 +0 25.027157 P52292 KPNA2 Importin subunit alpha-1 14 100 0.024832392617621997 21.718729 25.027157 15.512024 20.24036 18.98721 17.652256 3.372390924241912e-89 2.532692566441531e-75 6.814649380987046e-63 2.653408870803811e-150 1.5982896730002686e-76 1.3617121852571041e-143 19 19 19 19 19 19 False False False False False False 19 19 19 18 18 19 34379.75390625 36562.94921875 34773.390625 34628.25 34284.3671875 34388.984375 274170.34375 451374.15625 431721.375 319417.0625 431931.28125 438617.09375 12042.5 12080.6 11824.4 11883.4 11508.1 11720.3 +0 19.093235 P02679 FGG Fibrinogen gamma chain 3 100 0.07298536712525223 10.485868 19.093235 7.432459 7.0686703 16.114859 13.084756 2.4024269882585917e-45 1.0990333918098778e-61 9.948148678640561e-6 8.351532160306708e-6 5.099046080464289e-69 1.3942254844793062e-35 4 4 4 4 4 4 False False False False False False 4 4 4 4 4 4 8447.220703125 8384.8994140625 9212.228515625 7714.52099609375 7544.28955078125 8054.9765625 174836.15625 395185.78125 391231.15625 275257.21875 524078.15625 449936.125 905 1102.4 1059.1 908.2 904.5 900.5 +0 21.284233 P0ABH9 clpA ATP-dependent Clp protease ATP-binding subunit ClpA 17 100 0.33990415418413183 18.413792 14.50538 13.749044 17.963766 13.312042 21.284233 8.209110334314037e-80 7.450318482953909e-52 9.208995235851755e-45 1.8938767225400117e-137 1.4349146344522272e-37 4.1357985088830816e-168 18 18 18 17 16 18 False False False False False False 15 15 14 9 10 9 5312.609375 5213.6435546875 5159.81396484375 2728.41845703125 2753.85009765625 2778.67529296875 181553.46875 376247.28125 344280.53125 186461.265625 346986.53125 294516.46875 801.2 770.7 754.7 395.4 389.4 392.6 +0 19.1529 P0AGJ9 tyrS Tyrosine--tRNA ligase 14 100 0.3250860318466905 18.144709 19.1529 13.074355 15.315206 12.478048 18.862162 4.601218320132648e-79 8.092010048482405e-62 3.4043206741220245e-33 3.546816582594143e-123 2.1461616302722594e-27 1.4497337117608647e-151 18 18 18 17 17 17 False False False False False False 17 17 16 15 13 13 10123.9892578125 10415.400390625 10367.240234375 5688.93896484375 5441.083984375 5644.44970703125 523408.15625 753815.1875 701347.375 532286.1875 821399.875 647708.8125 2769.4 2889.4 2812.2 1527.3 1448.4 1486 +1.922747243823834e-187 15.165148 Q96B70 LENG9 Leukocyte receptor cluster member 9 13 100 0.07278365851665312 13.398864 8.108308 13.804122 13.439115 7.3709016 15.165148 2.205082485524975e-66 9.822585743664334e-12 8.409939004413034e-46 1.6040058847760947e-113 1.2889541969426851e-5 9.105532523736602e-81 15 15 15 15 15 15 False False False False False False 10 13 13 13 10 13 2101.833984375 2141.8388671875 2256.98876953125 2518.964599609375 2099.859375 2151.25 158468.625 342546.09375 317884.28125 242788.046875 367857.71875 345473.21875 560 593 615.1 672.5 592.8 570.5 +3.37263796226557e-6 7.3191686 Q8IUQ4 SIAH1 E3 ubiquitin-protein ligase SIAH1 7 100 0.09990423683736403 6.6886315 6.9954424 7.3191686 5.4779873 6.89249 5.1855507 1.7455032731441155e-5 6.318034661525333e-6 1.0815983901411342e-5 8.946103257004715e-5 2.4533056619190904e-5 1.2570723674557908e-4 7 7 7 7 7 7 False False False False False False 6 5 5 5 5 5 1200.4100341796875 920.51727294921875 953.81658935546875 1130.5025634765625 1062.7847900390625 1046.089111328125 164157.25 390301.78125 319539.03125 263265.625 434843.40625 455577.625 383.3 276.5 291 340.7 328 352.2 +0 20.66866 Q05518 PAL1 Protein PAL1 16 100 0.36819210526601004 16.259075 11.809054 9.19824 17.328188 17.022835 20.66866 6.632997669006847e-74 1.8775976465102498e-46 2.8453762184031015e-6 5.910845219924978e-134 2.350384829286335e-71 7.848502728530642e-164 16 16 16 17 16 17 False False False False False False 13 13 14 13 15 14 2547.21044921875 2246.40869140625 2522.540283203125 5081.2001953125 4728.96484375 4839.92626953125 37937.73828125 74334.1640625 57608.78515625 95554.4921875 123890.859375 121253.8984375 776.7 691.1 773.1 1511.9 1459.5 1477 +5.394963970007242e-228 16.100355 Q99519 NEU1 Sialidase-1 8 100 0.041956874436290176 8.864108 7.612147 9.185678 11.131746 7.223344 16.100355 1.0725917932927211e-19 3.970744688453691e-8 2.8770182920178534e-6 1.3870714091572402e-56 1.5230979438923316e-5 8.56235182532138e-108 10 10 10 9 10 10 False False False False False False 9 8 7 9 7 8 3336.75390625 3203.642822265625 3563.25390625 3318.84228515625 3211.1689453125 3208.494384765625 94469.1796875 212762.1875 188954.59375 145905.734375 222518.84375 223009.0625 862.7 819 843.1 884.1 842.3 846.6 +0 25.75072 Q13347 EIF3I Eukaryotic translation initiation factor 3 subunit I 18 100 0.029693551358744418 22.39139 18.007318 25.75072 17.4999 20.684776 19.094574 3.870449195026625e-91 2.6783811586470917e-59 3.895802091847579e-91 6.810906104656742e-135 4.26412402378322e-81 4.070679717260286e-153 25 26 25 26 26 26 False False False False False False 23 25 23 23 23 25 37979.71875 37575.125 38192.8671875 39744.296875 36514.21875 36996.00390625 891262.875 1523047.5 1499871.125 953503.9375 1426827.375 1500175.625 20262.801 19861.699 19908.801 20109 18762.5 19440 +2.197617919174808e-55 10.939882 Q96RU2 USP28 Ubiquitin carboxyl-terminal hydrolase 28 27 100 0.08071571231843573 10.757341 8.50885 8.542746 7.01649 10.939882 9.525475 7.283839940979553e-51 1.054703729867801e-15 4.464189291595243e-6 9.964517819662203e-6 4.583756609459537e-11 1.338551469937265e-6 27 26 26 25 26 25 False False False False False False 13 16 15 16 15 19 1868.17431640625 2059.894775390625 1681.474365234375 1847.2802734375 1732.381591796875 2020.5357666015625 172941.984375 262241.53125 260645.140625 208456.328125 253048.9375 271712.78125 344.5 367 332.2 343.9 330.5 414.5 +7.062939185113079e-53 10.820893 Q9ULI3 HEG1 Protein HEG homolog 1 7 100 0.2550342121907677 10.820893 5.5860376 6.898199 6.3327384 6.2446265 5.5681224 3.2935509564797122e-52 6.471561573956519e-5 1.8268379588665833e-5 3.833878270133572e-5 5.8255313739159866e-5 9.545385581068702e-5 6 6 7 6 7 7 False False False False False False 5 5 5 5 5 5 624.0570068359375 632.15643310546875 377.40594482421875 719.392578125 422.0374755859375 459.7496337890625 1243833.75 1907801.625 2083198.25 2678366.5 3877928.25 3412616 42.1 44.7 41.8 56 48.8 55.9 diff --git a/inst/scripts/generate_mq_sce.R b/inst/scripts/generate_mq_sce.R index dab431aa..6a0e82f4 100644 --- a/inst/scripts/generate_mq_sce.R +++ b/inst/scripts/generate_mq_sce.R @@ -17,3 +17,15 @@ out <- runMaxQuantAnalysis( stringIdCol = NULL, includeFeatureCollections = "complexes" ) + +# 'initial' SCE (from importExperiment) +sampleAnnot <- read.delim( + system.file("extdata/mq_example/1356_sampleAnnot.txt", + package = "einprot")) +se <- importExperiment( + system.file("extdata/mq_example/1356_proteinGroups.txt", + package = "einprot"), + iColPattern = "^LFQ.intensity.")$sce +se <- addSampleAnnots(se, sampleAnnot) +SummarizedExperiment::metadata(se) <- list() +saveRDS(se, file = "inst/extdata/mq_example/1356_sce_init.rds") diff --git a/man/constants.Rd b/man/constants.Rd index 13db5e3e..752c6acc 100644 --- a/man/constants.Rd +++ b/man/constants.Rd @@ -1,19 +1,11 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/constants.R -\docType{data} \name{constants} \alias{constants} \alias{EINPROT_COMPLEXES_FILE} \alias{EINPROT_WORMBASE_CONVTABLE} \alias{EINPROT_POMBASE_CONVTABLE} \title{Constants} -\format{ -An object of class \code{character} of length 1. - -An object of class \code{character} of length 1. - -An object of class \code{character} of length 1. -} \usage{ EINPROT_COMPLEXES_FILE @@ -31,4 +23,3 @@ complex database and ID conversion tables. \author{ Charlotte Soneson } -\keyword{datasets} diff --git a/man/defaultFiltersDF.Rd b/man/defaultFiltersDF.Rd new file mode 100644 index 00000000..bea00958 --- /dev/null +++ b/man/defaultFiltersDF.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/importDIANN.R +\name{defaultFiltersDF} +\alias{defaultFiltersDF} +\alias{einprotDIANNFiltersDF} +\title{Default filters (DF)} +\usage{ +einprotDIANNFiltersDF +} +\description{ +einprot provides default filters for data imported from various tools. +To see the functions and thresholds used in each of these, print the +corresponding object below. +} diff --git a/man/defaultFiltersSE.Rd b/man/defaultFiltersSE.Rd new file mode 100644 index 00000000..f31b07bd --- /dev/null +++ b/man/defaultFiltersSE.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/doFilter.R +\name{defaultFiltersSE} +\alias{defaultFiltersSE} +\alias{einprotMQFilters} +\alias{einprotPDTMTProteinFilters} +\alias{einprotPDTMTPeptideGroupFilters} +\alias{einprotFragPipeFilters} +\alias{einprotSpectronautFilters} +\title{Default filters (SE)} +\usage{ +einprotMQFilters + +einprotPDTMTProteinFilters + +einprotPDTMTPeptideGroupFilters + +einprotFragPipeFilters + +einprotSpectronautFilters +} +\description{ +einprot provides default filters for data imported from various tools. +To see the functions and thresholds used in each of these, print the +corresponding object below. +} diff --git a/man/doImputation.Rd b/man/doImputation.Rd index b46b1101..a3e80667 100644 --- a/man/doImputation.Rd +++ b/man/doImputation.Rd @@ -4,17 +4,24 @@ \alias{doImputation} \title{Perform imputation of NA values} \usage{ -doImputation(sce, method, assayName, imputedAssayName, ...) +doImputation(sce, imputeMethod, assayName, imputedAssayName, ...) } \arguments{ \item{sce}{A \code{SummarizedExperiment} object (or a derivative).} -\item{method}{Character scalar giving the imputation method. Currently, +\item{imputeMethod}{Character scalar giving the imputation method. Currently, \code{"MinProb"} (provided in the \code{MsCoreUtils} package), -\code{"impSeqRob"} (provided in the \code{rrcovNA} package), and +\code{"impSeqRob"} (provided in the \code{rrcovNA} package), \code{"MinProbGlobal"} (a reimplementation of the MinProb algorithm -using a global mean value rather than sample-specific ones) are -supported.} +using a global mean value rather than sample-specific ones), +\code{"MinProbGlobalOffset"} (like \code{"MinProbGlobal"}, but a +constant or relative offset can be specified to shift the mean of the +imputed values), and \code{"MinProbOffset"} (like +\code{"MinProbGlobalOffset"} but imputing separately for each row or +column) are supported. In addition, a custom function can be used by +setting \code{imputeMethod = "custom"} and providing the function in the +\code{FUN} argument (this will be passed on to +\code{MsCoreUtils::impute_matrix}).} \item{assayName}{Character scalar giving the name of the assay in \code{sce} to be imputed. The matrix should have missing values represented as @@ -35,6 +42,30 @@ Perform imputation of missing values (represented by \code{NA}) in one assay in a \code{SummarizedExperiment}, and generate a new assay containing the complete data (including imputed values). } +\details{ +For the pre-defined imputation functions defined by einprot, +these are the available arguments: +\describe{ + \item{"MinProbGlobal":}{lowQuantile = 0.01, multSigma = 1 (similar to + \code{q} and \code{sigma} in + \code{MsCoreUtils::MsCoreUtils::impute_MinProb}).} + \item{"MinProbOffset":}{lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = NULL. \code{margin} + indicates whether to impute along rows or columns. + \code{constOffset} defines a constant shift of the mean of the + imputed values relative to the low quantile. \code{relOffset} + instead defines the shift as a multiple of the standard deviation + of the distribution of imputed values.} + \item{"MinProbGlobalOffset":}{ lowQuantile = 0.01, multSigma = 1, + constOffset = NULL, relOffset = NULL. Similar interpretation as + for \code{"MinProbOffset"}.} +} +If \code{imputeMethod = "custom"}, any suitable function that accepts a +matrix as input and returns a matrix of the same shape can be provided to +the \code{FUN} argument. In addition, any argument to the function can +also be specified. The function and all arguments will be passed on to +\code{\link[MsCoreUtils]{impute_matrix}}. +} \examples{ ## Import data sce <- importExperiment(system.file("extdata", "mq_example", @@ -51,10 +82,21 @@ SummarizedExperiment::assay(sce, "log2_iBAQ")[!is.finite( SummarizedExperiment::assay(sce, "log2_iBAQ"))] <- NA ## Impute missing values -sce <- doImputation(sce, method = "MinProb", assayName = "log2_iBAQ", +sce <- doImputation(sce, imputeMethod = "MinProb", assayName = "log2_iBAQ", imputedAssayName = "imputed_iBAQ") SummarizedExperiment::assayNames(sce) +## Use another method from MsCoreUtils (specified as a custom function) +sce2 <- doImputation(sce, imputeMethod = "custom", assayName = "log2_iBAQ", + imputedAssayName = "imputed_iBAQ_knn", + FUN = MsCoreUtils::impute_knn) +## Alternatively, just specify one of the methods supported by MsCoreUtils::impute_matrix +sce3 <- doImputation(sce, imputeMethod = "custom", assayName = "log2_iBAQ", + imputedAssayName = "imputed_iBAQ_knn", + method = "knn") +identical(SummarizedExperiment::assay(sce2, "imputed_iBAQ_knn"), + SummarizedExperiment::assay(sce3, "imputed_iBAQ_knn")) + } \author{ Charlotte Soneson diff --git a/man/doNormalization.Rd b/man/doNormalization.Rd index 9675ecad..6a832259 100644 --- a/man/doNormalization.Rd +++ b/man/doNormalization.Rd @@ -19,10 +19,12 @@ doNormalization( the methods from \code{MsCoreUtils::normalizeMethods()} are supported, together with "center.mean.shared" and "center.median.shared", subtracting the mean or median, respectively, across features that are -observed in all samples. +observed in all samples, and "diff.mean.shared" and "diff.median.shared", +which add back the grand mean or median across samples. If \code{spikeFeatures} is not \code{NULL}, only \code{"center.mean"}, \code{"center.median"}, \code{"div.mean"} and -\code{"div.median"} are supported.} +\code{"div.median"} are supported. Note that in this case, the mean or +median of the spike features will be added/multiplied back.} \item{assayName}{Character scalar giving the name of the assay in \code{sce} to be normalized.} diff --git a/man/filterFeaturesSE.Rd b/man/filterFeaturesSE.Rd new file mode 100644 index 00000000..036dd5e1 --- /dev/null +++ b/man/filterFeaturesSE.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/doFilter.R +\name{filterFeaturesSE} +\alias{filterFeaturesSE} +\title{Filter features in a SummarizedExperiment object} +\usage{ +filterFeaturesSE(sce, filtersSE = list(), plotUpset = TRUE, exclFile = NULL) +} +\arguments{ +\item{sce}{A \code{SummarizedExperiment} object (or a derivative).} + +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} + +\item{plotUpset}{Logical scalar, whether to generate an UpSet plot +detailing the reasons for features being filtered out. Only +generated if any feature is in fact filtered out.} + +\item{exclFile}{Character scalar, the path to a text file where the +features that are filtered out are written. If \code{NULL} (default), +excluded features are not recorded.} +} +\value{ +A filtered object of the same type as \code{sce}. +} +\description{ +Filter the features (rows) in a SummarizedExperiment object based on a +user-defined combination of filters. +} +\examples{ +# MaxQuant +sce <- importExperiment(inFile = system.file("extdata", "mq_example", + "1356_proteinGroups.txt", + package = "einprot"), + iColPattern = "^LFQ.intensity.")$sce + +dim(sce) +sce <- filterFeaturesSE(sce = sce, filtersSE = einprotMQFilters, + plotUpset = TRUE) +dim(sce) + +# ProteomeDiscoverer, Proteins +sce <- importExperiment( + inFile = system.file("extdata", "pdtmt_example", + "Fig2_m23139_RTS_QC_varMods_Proteins.txt", + package = "einprot"), + iColPattern = "^Abundance.F.+.Sample.")$sce + +dim(sce) +sce <- filterFeaturesSE(sce = sce, filtersSE = einprotPDTMTProteinFilters, + plotUpset = TRUE) +dim(sce) + +# ProteomeDiscoverer, PeptideGroups +sce <- importExperiment( + inFile = system.file("extdata", "pdtmt_example", + "Fig2_m23139_RTS_QC_varMods_PeptideGroups.txt", + package = "einprot"), + iColPattern = "^Abundance.F.+.Sample.")$sce + +dim(sce) +sce <- filterFeaturesSE(sce = sce, filtersSE = einprotPDTMTPeptideGroupFilters) +dim(sce) + +# FragPipe +sce <- importExperiment(inFile = system.file("extdata", "fp_example", + "combined_protein.tsv", + package = "einprot"), + iColPattern = ".MaxLFQ.Intensity$")$sce + +dim(sce) +sce <- filterFeaturesSE(sce = sce, filtersSE = einprotFragPipeFilters, + plotUpset = TRUE) +dim(sce) + +} +\author{ +Charlotte Soneson +} diff --git a/man/filterFragPipe.Rd b/man/filterFragPipe.Rd deleted file mode 100644 index bb90d9a3..00000000 --- a/man/filterFragPipe.Rd +++ /dev/null @@ -1,57 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/doFilter.R -\name{filterFragPipe} -\alias{filterFragPipe} -\title{Filter out features in FragPipe data} -\usage{ -filterFragPipe( - sce, - minPeptides, - plotUpset = TRUE, - revPattern = "^rev_", - exclFile = NULL -) -} -\arguments{ -\item{sce}{A \code{SummarizedExperiment} object (or a derivative).} - -\item{minPeptides}{Numeric scalar, the minimum allowed value in the -'Combined.Total.Peptides' column in order to retain the feature.} - -\item{plotUpset}{Logical scalar, whether to generate an UpSet plot -detailing the reasons for features being filtered out. Only -generated if any feature is in fact filtered out.} - -\item{revPattern}{Character scalar providing the pattern (a regular -expression) used to identify decoys (reverse hits). The pattern is -matched against the IDs in the FragPipe \code{Protein} column.} - -\item{exclFile}{Character scalar, the path to a text file where the -features that are filtered out are written. If \code{NULL} (default), -excluded features are not recorded.} -} -\value{ -A filtered object of the same type as \code{sce}. -} -\description{ -Exclude features with 'Combined.Total.Peptides' below \code{minPeptides}, -or identified as either 'Reverse' (Protein name matching -\code{revPattern}) or 'Potential.contaminant' (Protein name starting -with \code{contam_}) by \code{FragPipe}. -} -\examples{ -sce <- importExperiment(inFile = system.file("extdata", "fp_example", - "combined_protein.tsv", - package = "einprot"), - iColPattern = ".MaxLFQ.Intensity$")$sce - -dim(sce) -sce <- filterFragPipe(sce = sce, minPeptides = 2, - plotUpset = TRUE, - revPattern = "^rev_") -dim(sce) - -} -\author{ -Charlotte Soneson -} diff --git a/man/filterMaxQuant.Rd b/man/filterMaxQuant.Rd deleted file mode 100644 index 6574a27d..00000000 --- a/man/filterMaxQuant.Rd +++ /dev/null @@ -1,48 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/doFilter.R -\name{filterMaxQuant} -\alias{filterMaxQuant} -\title{Filter out features in MaxQuant data} -\usage{ -filterMaxQuant(sce, minScore, minPeptides, plotUpset = TRUE, exclFile = NULL) -} -\arguments{ -\item{sce}{A \code{SummarizedExperiment} object (or a derivative).} - -\item{minScore}{Numeric scalar, the minimum allowed value in the 'Score' -column in order to retain the feature.} - -\item{minPeptides}{Numeric scalar, the minimum allowed value in the -'Peptides' column in order to retain the feature.} - -\item{plotUpset}{Logical scalar, whether to generate an UpSet plot -detailing the reasons for features being filtered out. Only -generated if any feature is in fact filtered out.} - -\item{exclFile}{Character scalar, the path to a text file where the -features that are filtered out are written. If \code{NULL} (default), -excluded features are not recorded.} -} -\value{ -A filtered object of the same type as \code{sce}. -} -\description{ -Exclude features with 'Score' below \code{minScore}, 'Peptides' below -\code{minPeptides}, or identified as either 'Reverse', -'Potential.contaminant' or 'Only.identified.by.site' by \code{MaxQuant}. -} -\examples{ -sce <- importExperiment(inFile = system.file("extdata", "mq_example", - "1356_proteinGroups.txt", - package = "einprot"), - iColPattern = "^LFQ.intensity.")$sce - -dim(sce) -sce <- filterMaxQuant(sce = sce, minScore = 2, minPeptides = 2, - plotUpset = TRUE) -dim(sce) - -} -\author{ -Charlotte Soneson -} diff --git a/man/filterPDTMT.Rd b/man/filterPDTMT.Rd deleted file mode 100644 index e67f3d6e..00000000 --- a/man/filterPDTMT.Rd +++ /dev/null @@ -1,114 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/doFilter.R -\name{filterPDTMT} -\alias{filterPDTMT} -\title{Filter out features in PD/TMT data} -\usage{ -filterPDTMT( - sce, - inputLevel, - minScore = 0, - minPeptides = 0, - minDeltaScore = 0, - minPSMs = 0, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, - plotUpset = TRUE, - exclFile = NULL -) -} -\arguments{ -\item{sce}{A \code{SummarizedExperiment} object (or a derivative).} - -\item{inputLevel}{Either \code{"Proteins"} or \code{"PeptideGroups"}, -indicating the type of features in \code{sce}.} - -\item{minScore}{Numeric scalar, the minimum allowed value in the -'Score.Sequest.HT.Sequest.HT' column in order to retain the feature. -Only used if \code{inputLevel} is \code{"Proteins"}.} - -\item{minPeptides}{Numeric scalar, the minimum allowed value in the -'Number.of.Peptides' column in order to retain the feature. -Only used if \code{inputLevel} is \code{"Proteins"}.} - -\item{minDeltaScore}{Numeric scalar, the minimum allowed value in the -'Delta.Score.by.Search.Engine.Sequest.HT' column in order to retain the -feature. Only used if \code{inputLevel} is \code{"PeptideGroups"}.} - -\item{minPSMs}{Numeric scalar, the minimum allowed value in the -'Number.of.PSMs' column in order to retain the feature. -Only used if \code{inputLevel} is \code{"PeptideGroups"}.} - -\item{masterProteinsOnly}{Logical scalar indicating whether only master -proteins (where the \code{Master} column value is -\code{IsMasterProtein}) should be retained.} - -\item{modificationsCol}{Character string pointing to a column containing -modification details. \code{excludeUnmodifiedPeptides} and -\code{keepModifications} will use information from this column. Only -used if \code{inputLevel} is \code{"PeptideGroups"}.} - -\item{excludeUnmodifiedPeptides}{Logical scalar, whether to filter out -peptides without modifications. Only used if \code{inputLevel} is -\code{"PeptideGroups"}.} - -\item{keepModifications}{Character string (or \code{NULL}) indicating -which modifications to retain in the analysis. Can be a regular -expression, which will be matched against the \code{modificationsCol}. -If \code{NULL} (the default), all rows are retained. Only used if -\code{inputLevel} is \code{"PeptideGroups"}.} - -\item{plotUpset}{Logical scalar, whether to generate an UpSet plot -detailing the reasons for features being filtered out. Only -generated if any feature is in fact filtered out.} - -\item{exclFile}{Character scalar, the path to a text file where the -features that are filtered out are written. If \code{NULL} (default), -excluded features are not recorded.} -} -\value{ -A filtered object of the same type as \code{sce}. -} -\description{ -If \code{inputLevel} is "Proteins", exclude features with -'Score.Sequest.HT.Sequest.HT' below \code{minScore}, -'Number.of.Peptides' below \code{minPeptides}, or identified as -'Contaminant' by \code{ProteomeDiscoverer}. -If \code{inputLevel} is "PeptideGroups", exclude features with -'Delta.Score.by.Search.Engine.Sequest.HT' below \code{minDeltaScore}, -'Number.of.PSMs' below \code{minPSMs}, or identified as -'Contaminant' by \code{ProteomeDiscoverer}. -} -\examples{ -## Proteins -sce <- importExperiment( - inFile = system.file("extdata", "pdtmt_example", - "Fig2_m23139_RTS_QC_varMods_Proteins.txt", - package = "einprot"), - iColPattern = "^Abundance.F.+.Sample.")$sce - -dim(sce) -sce <- filterPDTMT(sce = sce, inputLevel = "Proteins", minScore = 2, - minPeptides = 2, plotUpset = TRUE) -dim(sce) - -## PeptideGroups -sce <- importExperiment( - inFile = system.file("extdata", "pdtmt_example", - "Fig2_m23139_RTS_QC_varMods_PeptideGroups.txt", - package = "einprot"), - iColPattern = "^Abundance.F.+.Sample.")$sce - -dim(sce) -sce <- filterPDTMT(sce = sce, inputLevel = "PeptideGroups", - minPSMs = 2, plotUpset = TRUE, minDeltaScore = 0.2, - modificationsCol = "Modifications.in.Master.Proteins", - excludeUnmodifiedPeptides = TRUE) -dim(sce) - -} -\author{ -Charlotte Soneson -} diff --git a/man/filterSpectronaut.Rd b/man/filterSpectronaut.Rd deleted file mode 100644 index 9069330f..00000000 --- a/man/filterSpectronaut.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/doFilter.R -\name{filterSpectronaut} -\alias{filterSpectronaut} -\title{Filter out features in Spectronaut data} -\usage{ -filterSpectronaut( - sce, - minScore, - minPeptides, - plotUpset = TRUE, - revPattern = "_Decoy$", - contamPattern = "^contam_", - exclFile = NULL -) -} -\arguments{ -\item{sce}{A \code{SummarizedExperiment} object (or a derivative).} - -\item{minScore}{Numeric scalar, the minimum allowed value in the 'PG.Cscore' -column in order to retain the feature.} - -\item{minPeptides}{Numeric scalar, the minimum allowed value in the -'PG.NrOfStrippedSequencesIdentified.Experiment.wide' column in order to -retain the feature.} - -\item{plotUpset}{Logical scalar, whether to generate an UpSet plot -detailing the reasons for features being filtered out. Only -generated if any feature is in fact filtered out.} - -\item{revPattern}{Character scalar providing the pattern (a regular -expression) used to identify decoys (reverse hits). The pattern is -matched against the IDs in the Spectronaut \code{PG.ProteinGroups} -column.} - -\item{contamPattern}{Character scalar providing the pattern (a regular -expression) used to identify contaminants. The pattern is -matched against the IDs in the Spectronaut \code{PG.ProteinGroups} -column.} - -\item{exclFile}{Character scalar, the path to a text file where the -features that are filtered out are written. If \code{NULL} (default), -excluded features are not recorded.} -} -\value{ -A filtered object of the same type as \code{sce}. -} -\description{ -Exclude features with 'PG.Cscore' below \code{minScore}, -'PG.NrOfStrippedSequencesIdentified.Experiment.wide' below -\code{minPeptides}, or where the 'PG.ProteinGroups' column contains the -specified \code{revPattern}. -} -\author{ -Charlotte Soneson -} diff --git a/man/importDIANN.Rd b/man/importDIANN.Rd index eef73403..6cae5b0c 100644 --- a/man/importDIANN.Rd +++ b/man/importDIANN.Rd @@ -11,16 +11,19 @@ importDIANN( includeOnlySamples = "", excludeSamples = "", stopIfEmpty = FALSE, - aName = "MaxLFQ", + aName = "PG.MaxLFQ", + filtersDF = list(), ... ) } \arguments{ \item{inFile}{Path to a tab-delimited input text file from DIA-NN; either -\code{pg_matrix.tsv}, \code{pr_matrix.tsv} or the main \code{report.tsv}.} +\code{*.parquet}, \code{pg_matrix.tsv}, \code{pr_matrix.tsv} or +\code{report.tsv}.} \item{fileType}{Character scalar indicating the type of input file; either -\code{"pg_matrix"}, \code{"pr_matrix"} or \code{"main_report"}.} +\code{"parquet"}, \code{"pg_matrix"}, \code{"pr_matrix"} or +\code{"main_report"}.} \item{outLevel}{Character scalar indicating the desired output level; either \code{"pg"} (protein group) or \code{"pr"} (precursor).} @@ -35,7 +38,15 @@ columns matching the patterns are found.} \item{aName}{Character scalar giving the name of the main assay (if \code{fileType} is \code{"pg_matrix"} or \code{"pr_matrix"}), or the column from which to get the values for the main assay (if -\code{fileType} is \code{"main_report"}).} +\code{fileType} is \code{"main_report"} or \code{"parquet"}).} + +\item{filtersDF}{Named list where each element is a filtering function +that takes a \code{data.frame} (or \code{tibble}) as +input and returns a filtered object of the same class. No other +arguments are allowed. The filtering functions will be applied in the +order they are provided in the list, after reading the long-format text +file or parquet file, and before creating the wide-format assay. Only +applies if \code{fileType} is \code{"main_report"} or \code{"parquet"}.} \item{...}{Additional arguments that will be passed on to \code{QFeatures::readSummarizedExperiment} (e.g., the number of rows diff --git a/man/importSpectronaut.Rd b/man/importSpectronaut.Rd index 35726121..3482d7a7 100644 --- a/man/importSpectronaut.Rd +++ b/man/importSpectronaut.Rd @@ -13,6 +13,7 @@ importSpectronaut( excludeSamples = "", stopIfEmpty = FALSE, aName = "PG.Quantity", + filtersDF = list(), ... ) } @@ -42,6 +43,14 @@ columns matching the patterns are found.} values for the main assay. Only used if \code{fileType} is \code{"long_format"}.} +\item{filtersDF}{Named list where each element is a filtering function +that takes a \code{data.frame} as +input and returns a filtered \code{data.frame}. No other +arguments are allowed. The filtering functions will be applied in the +order they are provided in the list, after reading the long-format text +file, and before creating the wide-format assay. Only +applies if \code{fileType} is \code{"long_format"}.} + \item{...}{Additional arguments that will be passed on to \code{QFeatures::readSummarizedExperiment} (e.g., the number of rows to import).} diff --git a/man/makeAbundanceHeatmap.Rd b/man/makeAbundanceHeatmap.Rd index f0fbff3e..1e84e80a 100644 --- a/man/makeAbundanceHeatmap.Rd +++ b/man/makeAbundanceHeatmap.Rd @@ -4,7 +4,14 @@ \alias{makeAbundanceHeatmap} \title{Generate heatmap} \usage{ -makeAbundanceHeatmap(sce, assayToPlot, doCenter, settings = "report", ...) +makeAbundanceHeatmap( + sce, + assayToPlot, + doCenter, + settings = "report", + clusterRows = TRUE, + ... +) } \arguments{ \item{sce}{A \code{SummarizedExperiment} object (or a derivative).} @@ -21,6 +28,11 @@ settings used in \code{einprot} reports and when exporting the heatmap to a pdf. Setting it to \code{NULL} allows any argument to be passed to \code{ComplexHeatmap::Heatmap} via the \code{...} argument.} +\item{clusterRows}{Logical scalar. For \code{settings="report"} or +\code{"export"}, indicates whether rows should be clustered or not. +Typically set to \code{FALSE} for large experiments where clustering +rows would be prohibitive.} + \item{...}{If \code{settings} is \code{NULL}, additional arguments passed to \code{ComplexHeatmap::Heatmap}.} } @@ -30,6 +42,16 @@ A ComplexHeatmap object. \description{ Generate a heatmap from a defined assay. } +\details{ +The predefined \code{settings} correspond to the following extra +arguments to \code{\link[ComplexHeatmap]{Heatmap}}: +\describe{ +\item{report: }{\code{show_row_names = FALSE}} +\item{export: }{\code{show_row_names = TRUE}, \code{show_row_dend = FALSE}, +\code{cluster_columns = TRUE}, \code{column_split = sce$group}, add +annotation for the fraction of NAs (imputed values) per feature.} +} +} \examples{ sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds", package = "einprot")) diff --git a/man/plotDetectedInSamples.Rd b/man/plotDetectedInSamples.Rd index b386d85a..b3c8b40f 100644 --- a/man/plotDetectedInSamples.Rd +++ b/man/plotDetectedInSamples.Rd @@ -4,12 +4,18 @@ \alias{plotDetectedInSamples} \title{Plot feature detection rate} \usage{ -plotDetectedInSamples(dfNA) +plotDetectedInSamples(dfNA, valueType = NULL) } \arguments{ \item{dfNA}{A \code{DFrame} or \code{data.frame} with at least columns \code{"name"}, \code{"nNA"} and \code{"pNA"}, representing the feature name and the number and fraction of missing values.} + +\item{valueType}{A \code{character} scalar indicating whether the values +in the \code{"pNA"} column represent fractions +(\code{valueType = "fraction"}, values in [0, 1]) or +percentages (\code{valueType = "percentage"}, values in [0, 100]). If +\code{NULL}, the type will be guessed from the observed values.} } \value{ A \code{ggplot} object. @@ -20,7 +26,8 @@ Plot the distribution of the number of samples where features are detected. \examples{ sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds", package = "einprot")) -plotDetectedInSamples(SummarizedExperiment::rowData(sce)) +plotDetectedInSamples(SummarizedExperiment::rowData(sce), + valueType = "percentage") } \author{ diff --git a/man/plotFractionDetectedPerSample.Rd b/man/plotFractionDetectedPerSample.Rd index 4bfbcd49..18824559 100644 --- a/man/plotFractionDetectedPerSample.Rd +++ b/man/plotFractionDetectedPerSample.Rd @@ -4,12 +4,18 @@ \alias{plotFractionDetectedPerSample} \title{Plot detection rate per sample} \usage{ -plotFractionDetectedPerSample(dfNA) +plotFractionDetectedPerSample(dfNA, valueType = NULL) } \arguments{ \item{dfNA}{A \code{DFrame} or \code{data.frame} with at least columns named \code{"name"} and \code{"pNA"} representing the sample name and the fraction of missing values.} + +\item{valueType}{A \code{character} scalar indicating whether the values +in the \code{"pNA"} column represent fractions +(\code{valueType = "fraction"}, values in [0, 1]) or +percentages (\code{valueType = "percentage"}, values in [0, 100]). If +\code{NULL}, the type will be guessed from the observed values.} } \value{ A \code{ggplot} object. @@ -20,7 +26,8 @@ Plot the fraction of detected features in each sample. \examples{ sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds", package = "einprot")) -plotFractionDetectedPerSample(SummarizedExperiment::colData(sce)) +plotFractionDetectedPerSample(SummarizedExperiment::colData(sce), + valueType = "percentage") } \author{ diff --git a/man/plotMissingValuesHeatmap.Rd b/man/plotMissingValuesHeatmap.Rd index ac17fc81..2048068a 100644 --- a/man/plotMissingValuesHeatmap.Rd +++ b/man/plotMissingValuesHeatmap.Rd @@ -25,7 +25,10 @@ include rows with at least one missing (\code{TRUE}) value.} \item{settings}{Character scalar or \code{NULL}. Setting this to \code{"clustered"} creates a heatmap with rows and columns -clustered (used in the \code{einprot} report). +clustered (used in the \code{einprot} report). Setting it to +\code{"sorted"} sorts the rows first by the row sums across all columns, +then successively by the value in each column. This is typically used +for large matrices, where clustering rows would be prohibitive. Setting it to \code{NULL} allows any argument to be passed to \code{ComplexHeatmap::Heatmap} via the \code{...} argument.} diff --git a/man/plotVolcano.Rd b/man/plotVolcano.Rd index cce60f6c..77382c4c 100644 --- a/man/plotVolcano.Rd +++ b/man/plotVolcano.Rd @@ -11,6 +11,7 @@ plotVolcano( xv = NULL, yv = NULL, xvma = NULL, + pv = NULL, volcind = NULL, plotnote = "", plottitle = "", @@ -59,6 +60,10 @@ column of \code{res} should be used as the x-axis for an MA plot. The y-axis column will be \code{xv}. If \code{NULL}, no MA plot is generated.} +\item{pv}{If not \code{NULL}, a character scalar indicating which column +of \code{res} should be used to create p-value histograms. If +\code{NULL}, will be determined based on \code{testType}.} + \item{volcind}{Character scalar indicating which column in \code{res} that represents the "significance" column. This should be a logical column; rows with a value equal to \code{TRUE} will be colored diff --git a/man/runDIANNAnalysis.Rd b/man/runDIANNAnalysis.Rd index c28e06fe..1617d834 100644 --- a/man/runDIANNAnalysis.Rd +++ b/man/runDIANNAnalysis.Rd @@ -30,9 +30,10 @@ runDIANNAnalysis( sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, imputeMethod = "MinProb", + imputeArgs = list(), + filtersDF = einprotDIANNFiltersDF, + filtersSE = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -99,13 +100,13 @@ supported species (see \code{getSupportedSpecies()}). Either the common or the scientific name can be used.} \item{diannFile}{Character string pointing to the DIA-NN -\code{pg_matrix.tsv}, \code{pr_matrix.tsv} or main \code{report.tsv} -file. File paths will be expressed in canonical form (using -\code{normalizePath()}) before they are processed.} +\code{pg_matrix.tsv}, \code{pr_matrix.tsv}, main \code{report.tsv} or +\code{*.parquet} file. File paths will be expressed in canonical form +(using \code{normalizePath()}) before they are processed.} \item{diannFileType}{Character string indicating what type of input file \code{diannFile} represents. Either \code{"pg_matrix"}, -\code{"pr_matrix"} or \code{"main_report"}.} +\code{"pr_matrix"}, \code{"main_report"} or \code{"parquet"}.} \item{outLevel}{Character string indicating the desired output level. Either \code{"pg"} or \code{"pr"}.} @@ -117,7 +118,7 @@ File paths will be expressed in canonical form (using \item{aName}{Character scalar indicating the desired name of the main assay (if \code{diannFileType} is \code{"pg_matrix"} or \code{"pr_matrix"}), or the column to use for the main assay (if -\code{diannFileType} is \code{"main_report"}).} +\code{diannFileType} is \code{"main_report"} or \code{"parquet"}).} \item{idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol}{Arguments defining the feature identifiers (row names, should be unique), @@ -160,17 +161,29 @@ input file, after removing the \code{iColPattern}.} \item{includeOnlySamples, excludeSamples}{Character vectors defining specific samples to include or exclude from all analyses.} -\item{minScore}{Numeric, minimum score for a protein to be retained in the -analysis. Set to \code{NULL} if no score filtering is desired.} - -\item{minPeptides}{Numeric, minimum number of peptides for a protein to be -retained in the analysis. Set to \code{NULL} if no filtering on the -number of peptides is desired.} - \item{imputeMethod}{Character string defining the imputation method to use. -Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -\code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -more details about the methods.} +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} + +\item{filtersDF}{Named list where each element is a filtering function +that takes a \code{data.frame} (or \code{tibble}) as +input and returns a filtered object of the same class. No other +arguments are allowed. The filtering functions will be applied in the +order they are provided in the list, after reading the long-format text +file or parquet file, and before creating the wide-format assay. Only +applies if \code{diannFileType} is \code{"main_report"} or \code{"parquet"}.} + +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} \item{assaysForExport}{Character vector defining the name(s) of the assays to use for exported abundances and barplots. This could, for example, @@ -221,8 +234,12 @@ average value across all samples in the \code{baselineGroup} from the same batch as the original sample.} \item{normMethod}{Character scalar indicating the normalization method to -use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -or \code{"none"} are valid values.} +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} \item{spikeFeatures}{Character vector indicating the 'spike-in' features to use for estimation of normalization factors. If \code{NULL} diff --git a/man/runFragPipeAnalysis.Rd b/man/runFragPipeAnalysis.Rd index 3b524afd..eef04595 100644 --- a/man/runFragPipeAnalysis.Rd +++ b/man/runFragPipeAnalysis.Rd @@ -21,13 +21,13 @@ runFragPipeAnalysis( stringIdCol = function(df) combineIds(df, combineCols = c("Gene", "Protein.ID"), combineWhen = "missing", makeUnique = FALSE), extraFeatureCols = NULL, + filtersSE = einprotFragPipeFilters, iColPattern, sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -129,6 +129,13 @@ created after the standard columns (\code{einprotId}, \code{einprotGene}, thus these columns can be used as well to create the user-specified ones.} +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} + \item{iColPattern}{Regular expression identifying the columns of the FragPipe \code{combined_protein.tsv} file to use for the analysis. Typically \code{"\\.MaxLFQ\\.Intensity$"}.} @@ -144,17 +151,14 @@ input file, after removing the \code{iColPattern}.} \item{includeOnlySamples, excludeSamples}{Character vectors defining specific samples to include or exclude from all analyses.} -\item{minScore}{Numeric, minimum score for a protein to be retained in the -analysis. Set to \code{NULL} if no score filtering is desired.} - -\item{minPeptides}{Numeric, minimum number of peptides for a protein to be -retained in the analysis. Set to \code{NULL} if no filtering on the -number of peptides is desired.} - \item{imputeMethod}{Character string defining the imputation method to use. -Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -\code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -more details about the methods.} +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} \item{assaysForExport}{Character vector defining the name(s) of the assays to use for exported abundances and barplots. This could, for example, @@ -205,8 +209,12 @@ average value across all samples in the \code{baselineGroup} from the same batch as the original sample.} \item{normMethod}{Character scalar indicating the normalization method to -use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -or \code{"none"} are valid values.} +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} \item{spikeFeatures}{Character vector indicating the 'spike-in' features to use for estimation of normalization factors. If \code{NULL} diff --git a/man/runMaxQuantAnalysis.Rd b/man/runMaxQuantAnalysis.Rd index 370eabff..4f919a5f 100644 --- a/man/runMaxQuantAnalysis.Rd +++ b/man/runMaxQuantAnalysis.Rd @@ -24,13 +24,13 @@ runMaxQuantAnalysis( stringIdCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), combineWhen = "missing", makeUnique = FALSE), extraFeatureCols = NULL, + filtersSE = einprotMQFilters, iColPattern, sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = c("iBAQ", "Top3"), addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -135,6 +135,13 @@ created after the standard columns (\code{einprotId}, \code{einprotGene}, thus these columns can be used as well to create the user-specified ones.} +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} + \item{iColPattern}{Regular expression identifying the columns of the MaxQuant \code{proteinGroups.txt} file to use for the analysis. Typically either \code{"^Intensity\\."}, \code{"^LFQ\\.intensity\\."} or @@ -151,17 +158,14 @@ input file, after removing the \code{iColPattern}.} \item{includeOnlySamples, excludeSamples}{Character vectors defining specific samples to include or exclude from all analyses.} -\item{minScore}{Numeric, minimum score for a protein to be retained in the -analysis. Set to \code{NULL} if no score filtering is desired.} - -\item{minPeptides}{Numeric, minimum number of peptides for a protein to be -retained in the analysis. Set to \code{NULL} if no filtering on the -number of peptides is desired.} - \item{imputeMethod}{Character string defining the imputation method to use. -Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -\code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -more details about the methods.} +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} \item{assaysForExport}{Character vector defining the name(s) of the assays to use for exported abundances and barplots. This could, for example, @@ -212,8 +216,12 @@ average value across all samples in the \code{baselineGroup} from the same batch as the original sample.} \item{normMethod}{Character scalar indicating the normalization method to -use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -or \code{"none"} are valid values.} +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} \item{spikeFeatures}{Character vector indicating the 'spike-in' features to use for estimation of normalization factors. If \code{NULL} diff --git a/man/runPDTMTAnalysis.Rd b/man/runPDTMTAnalysis.Rd index ed8247fa..5003190d 100644 --- a/man/runPDTMTAnalysis.Rd +++ b/man/runPDTMTAnalysis.Rd @@ -24,6 +24,8 @@ runPDTMTAnalysis( stringIdCol = function(df) combineIds(df, combineCols = c("Gene.Symbol", "Accession"), combineWhen = "missing", makeUnique = FALSE), extraFeatureCols = NULL, + filtersSE = if (inputLevel == "Proteins") einprotPDTMTProteinFilters else + einprotPDTMTPeptideGroupFilters, modificationsCol = "Modifications", excludeUnmodifiedPeptides = FALSE, keepModifications = NULL, @@ -31,12 +33,8 @@ runPDTMTAnalysis( sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 2, - minDeltaScore = 0.2, - minPeptides = 2, - minPSMs = 2, - masterProteinsOnly = FALSE, imputeMethod = "MinProb", + imputeArgs = imputeArgs, assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -154,6 +152,13 @@ created after the standard columns (\code{einprotId}, \code{einprotGene}, thus these columns can be used as well to create the user-specified ones.} +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} + \item{modificationsCol}{Character string pointing to a column containing modification details. \code{excludeUnmodifiedPeptides} and \code{keepModifications} will use information from this column. Only @@ -183,24 +188,14 @@ input file, after removing the \code{iColPattern}.} \item{includeOnlySamples, excludeSamples}{Character vectors defining specific samples to include or exclude from all analyses.} -\item{minScore, minDeltaScore}{Numeric, minimum score for a protein (or -delta score for a peptide group) to be retained in the analysis. -Set to \code{NULL} if no score filtering is desired.} - -\item{minPeptides, minPSMs}{Numeric, minimum number of peptides for a protein -(or PSMs for a peptide group) to be retained in the analysis. -Set to \code{NULL} if no filtering on the number of peptides/PTMs is -desired.} - -\item{masterProteinsOnly}{Logical scalar indicating whether only master -proteins (where the \code{Master} column value is -\code{IsMasterProtein}) should be retained. Only used if -\code{inputLevel} is \code{"Proteins"}.} - \item{imputeMethod}{Character string defining the imputation method to use. -Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -\code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -more details about the methods.} +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} \item{assaysForExport}{Character vector defining the name(s) of the assays to use for exported abundances and barplots. This could, for example, @@ -251,8 +246,12 @@ average value across all samples in the \code{baselineGroup} from the same batch as the original sample.} \item{normMethod}{Character scalar indicating the normalization method to -use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -or \code{"none"} are valid values.} +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} \item{spikeFeatures}{Character vector indicating the 'spike-in' features to use for estimation of normalization factors. If \code{NULL} diff --git a/man/runSEAnalysis.Rd b/man/runSEAnalysis.Rd new file mode 100644 index 00000000..3a213a49 --- /dev/null +++ b/man/runSEAnalysis.Rd @@ -0,0 +1,371 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/runSEAnalysis.R +\name{runSEAnalysis} +\alias{runSEAnalysis} +\title{Run analysis on pre-imported data} +\usage{ +runSEAnalysis( + templateRmd = system.file("extdata/process_basic_template.Rmd", package = "einprot"), + outputDir = ".", + outputBaseName = "SEAnalysis", + reportTitle = "Pregenerated data processing", + reportAuthor = "", + forceOverwrite = FALSE, + experimentInfo = list(), + species, + inFile, + summaryInfo = NULL, + aName, + idCol, + labelCol = idCol, + geneIdCol = NULL, + proteinIdCol = NULL, + stringIdCol = NULL, + extraFeatureCols = NULL, + filtersSE = list(), + imputeMethod = "MinProb", + imputeArgs = list(), + assaysForExport = c("iBAQ", "Top3"), + addAbundanceValues = TRUE, + addHeatmaps = TRUE, + mergeGroups = list(), + comparisons = list(), + ctrlGroup = "", + allPairwiseComparisons = TRUE, + singleFit = TRUE, + subtractBaseline = FALSE, + baselineGroup = "", + normMethod = "none", + spikeFeatures = NULL, + stattest = "limma", + minNbrValidValues = 2, + minlFC = 0, + samSignificance = TRUE, + nperm = 250, + volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, + volcanoMaxFeatures = 25, + volcanoLabelSign = "both", + volcanoS0 = 0.1, + volcanoFeaturesToLabel = "", + addInteractiveVolcanos = FALSE, + interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, + complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, + maxComplexSimilarity = 1, + seed = 42, + includeFeatureCollections = c(), + minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", + complexDbPath = NULL, + stringVersion = "11.5", + stringDir = NULL, + linkTableColumns = c(), + customYml = NULL, + doRender = TRUE +) +} +\arguments{ +\item{templateRmd}{Path to the template R Markdown file. Typically does not +need to be modified.} + +\item{outputDir}{Path to a directory where all output files will be +written. Will be created if it doesn't exist.} + +\item{outputBaseName}{Character string providing the 'base name' of the +output files. All output files will start with this prefix.} + +\item{reportTitle, reportAuthor}{Character scalars, giving the title and +author for the result report.} + +\item{forceOverwrite}{Logical, whether to force overwrite an existing +Rmd file with the same \code{outputBaseName} in the \code{outputDir}.} + +\item{experimentInfo}{Named list with information about the experiment. +Each entry of the list must be a scalar value.} + +\item{species}{Character scalar providing the species. Must be one of the +supported species (see \code{getSupportedSpecies()}). Either the common +or the scientific name can be used.} + +\item{inFile}{Character string pointing to an \code{.rds} file containing +a serialized \code{\link[SummarizedExperiment]{SummarizedExperiment}} +object (or a derivative, such as +\code{\link[SingleCellExperiment]{SingleCellExperiment}}, with features +(e.g. proteins) in rows and samples in columns. The object +must have at least one assay (\code{aName}), containing raw intensity +values or equivalent (these will be automatically log-transformed by +einprot).} + +\item{summaryInfo}{Named list with information about the identification +and quantification workflow. This information will be displayed in +table format in the report, under the 'Analysis summary' header. einprot +provides functions to generate such lists for common processing tools, +such as \code{\link{readMaxQuantXML}}, \code{\link{readFragPipeInfo}}, +\code{\link{readProteomeDiscovererInfo}} and \code{\link{readDIANNInfo}}.} + +\item{aName}{Character scalar providing the name of the assay of the +\code{SummarizedExperiment} object in \code{inputFile} that should be +used as the main assay for the analysis. +The assay should contain values on the "raw intensity scale" (i.e., +they will be log-transformed as part of the analysis workflow). Missing +values should be represented by either zeros or NA values.} + +\item{idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol}{Arguments defining +the feature identifiers (row names, should be unique), +feature labels (for plots, can be anything), +gene IDs (single gene symbols, will be matched against complexes and +GO terms, can be \code{NULL}), +protein IDs (UniProt IDs, will be used to create automatic URLs and +match to species-specific identifiers, each entry can consist of +multiple UniProt IDs separated by semicolons), and +stringIdCol (single gene or protein ID, will be used to retrieve +STRING networks, can be \code{NULL}). +Each of these arguments can be either a character vector of column +names in the input file (after application of \code{make.names}), +in which case the corresponding feature ID +is generated by simply concatenating the values in these columns, or a +function with one input argument (a data.frame, corresponding to the +annotation columns of the input file), returning a +character vector corresponding to the desired feature IDs.} + +\item{extraFeatureCols}{Named list (or \code{NULL}) defining additional, +user-specified feature annotation columns to add to the object (in +addition to the ones defined by \code{idCol}, \code{labelCol}, +\code{geneIdCol}, \code{proteinIdCol} and \code{stringIdCol}). Similar +to these column definitions, each entry of the list must be either a +character vector of column names or a function taking a data.frame as +input and returning a single character column. These columns will be +created after the standard columns (\code{einprotId}, \code{einprotGene}, +\code{einprotProtein}, \code{einprotLabel}, \code{IDsForSTRING}), and +thus these columns can be used as well to create the user-specified +ones.} + +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} + +\item{imputeMethod}{Character string defining the imputation method to use. +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} + +\item{assaysForExport}{Character vector defining the name(s) of the assays +to use for exported abundances and barplots. This could, for example, +be set to an assay containing 'absolute' abundances, if available, even +if another assay is used for the actual analysis and comparison of +groups. If set to \code{NULL} or an assay name that does not exist in +the SingleCellExperiment object, the 'main' assay will be used.} + +\item{addAbundanceValues}{Logical scalar defining whether abundance values +for individual samples should be added to the exported result tables.} + +\item{addHeatmaps}{Logical scalar indicating whether to include heatmaps +or not. This controls both the heatmap showing the missing value +pattern in the data, as well as the summary heatmaps of the +quantitative information in the data. For large data sets, excluding +the heatmaps can significantly speed up the processing time.} + +\item{mergeGroups}{Named list of character vectors defining sample groups +to merge to create new groups, that will be used for comparisons. +Any specification of \code{comparisons} or \code{ctrlGroup} should +be done in terms of the new (merged) group names.} + +\item{comparisons}{List of character vectors defining comparisons to +perform. The first element of each vector represents the +denominator of the comparison. If not empty, \code{ctrlGroup} and +\code{allPairwiseComparisons} are ignored.} + +\item{ctrlGroup}{Character vector defining the sample group(s) to use as +control group in comparisons.} + +\item{allPairwiseComparisons}{Logical, should all pairwise comparisons be +performed?} + +\item{singleFit}{Logical scalar indicating whether a single model fit +should be used (and results for pairwise comparisons extracted via +contrasts). If \code{FALSE}, the data set will be subset to the +relevant samples for each comparison. Only applicable if +\code{stattest} is \code{"limma"} or \code{"proDA"}.} + +\item{subtractBaseline}{Logical scalar, whether to subtract the background/ +reference value for each feature in each batch before fitting the +model. If \code{TRUE}, requires that a 'batch' column is available.} + +\item{baselineGroup}{Character scalar representing the reference group. +Only used if \code{subtractBaseline} is \code{TRUE}, in which case the +abundance values for a given sample will be adjusted by subtracting the +average value across all samples in the \code{baselineGroup} from the +same batch as the original sample.} + +\item{normMethod}{Character scalar indicating the normalization method to +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} + +\item{spikeFeatures}{Character vector indicating the 'spike-in' features +to use for estimation of normalization factors. If \code{NULL} +(default), all features are used.} + +\item{stattest}{Either \code{"ttest"}, \code{"limma"} or \code{"proDA"}, +the testing framework to use. Could also be \code{"none"} if no test +should be performed.} + +\item{minNbrValidValues}{Numeric, the minimum number of valid values for a +protein to be used for statistical testing.} + +\item{minlFC}{Numeric, minimum log fold change to test against (only used +if \code{stattest = "limma"}).} + +\item{samSignificance}{Logical scalar, indicating whether the SAM statistic +should be used to determine significance (similar to the approach used by +Perseus). Only used if \code{stattest = "ttest"}. If \code{FALSE}, the +p-values are adjusted using the Benjamini-Hochberg approach and used +to determine significance.} + +\item{nperm}{Numeric, number of permutations to use in the statistical +testing (only used if \code{stattest = "ttest"}).} + +\item{volcanoAdjPvalThr}{Numeric, adjusted p-value threshold to determine +which proteins to highlight in the volcano plots.} + +\item{volcanoLog2FCThr}{Numeric, log-fold change threshold to determine +which proteins to highlight in the volcano plots.} + +\item{volcanoMaxFeatures}{Numeric, maximum number of significant features +to label in the volcano plots.} + +\item{volcanoLabelSign}{Character scalar, either 'both', 'pos', or 'neg', +indicating whether to label the most significant features regardless of +sign, or only those with positive/negative log-fold changes.} + +\item{volcanoS0}{Numeric, S0 value to use to generate the significance +curve in the volcano plots (only used if \code{stattest = "ttest"}).} + +\item{volcanoFeaturesToLabel}{Character vector with features to always +label in the volcano plots (regardless of significance).} + +\item{addInteractiveVolcanos}{Logical scalar indicating whether to add +interactive volcano plots to the html report. For experiments with +many quantified features or many comparisons, setting this to +\code{TRUE} can make the html report very large and difficult to +interact with.} + +\item{interactiveDisplayColumns}{Character vector (or \code{NULL}) +indicating which columns to include in the tooltip for the +interactive volcano plots. The default shows the feature ID.} + +\item{interactiveGroupColumn}{Character scalar (or \code{NULL}, default) +indicating the column to group points by in the interactive volcano +plot. Hovering over a point will highlight all other points with the +same value of this column.} + +\item{complexFDRThr}{Numeric, FDR threshold for significance in testing +of complexes.} + +\item{maxNbrComplexesToPlot}{Numeric, the maximum number of significant +complexes for which to make separate volcano plots. Defaults to +\code{Inf}, i.e., no limit.} + +\item{maxComplexSimilarity}{Numeric scalar. If a significant complex C has a +Jaccard similarity exceeding this value with a complex for which a +volcano plot has already been generated, no volcano plot will be +generated for C. The default value is 1, which means that no complex +will be excluded.} + +\item{seed}{Numeric, random seed to use for any non-deterministic +calculations.} + +\item{includeFeatureCollections}{Character vector, a subset of +\code{c("complexes", "GO", "pathways")}.} + +\item{minSizeToKeepSet}{Numeric scalar indicating the smallest number of +features that have to overlap with the current data set in order to +retain a feature set for testing.} + +\item{customComplexes}{List of character vectors providing custom complexes +to test for significant differences between groups.} + +\item{complexSpecies}{Either \code{"all"} or \code{"current"}, depending +on whether complexes defined for all species, or only those defined +for the current species, should be tested for significance.} + +\item{complexDbPath}{Character string providing path to the complex DB +file (generated with \code{makeComplexDB()}).} + +\item{stringVersion}{Character scalar giving the version of the STRING +database to query.} + +\item{stringDir}{Character scalar (or \code{NULL}) providing the path to a +folder where the STRING files will be downloaded (or loaded from, if +they already exist). If \code{NULL} (default), they will be downloaded +to a temporary directory.} + +\item{linkTableColumns}{Character vector with regular expressions that will +be matched against the column names of the rowData of the generated +SingleCellExperiment object and included in the link table in the end +of the report.} + +\item{customYml}{Character string providing the path to a custom YAML file +that can be used to overwrite default settings in the report. If set +to \code{NULL} (default), no alterations are made.} + +\item{doRender}{Logical scalar. If \code{FALSE}, the Rmd file will be +generated (and any parameters injected), but not rendered.} +} +\value{ +Invisibly, the path to the compiled html report. +} +\description{ +Launch an analysis workflow on data stored in a +\code{\link[SummarizedExperiment]{SummarizedExperiment}} object, generated +from arbitrary source data. +} +\examples{ +if (interactive()) { + sampleAnnot <- read.delim( + system.file("extdata/mq_example/1356_sampleAnnot.txt", + package = "einprot")) + se <- importExperiment( + system.file("extdata/mq_example/1356_proteinGroups.txt", + package = "einprot"), + iColPattern = "^LFQ.intensity.")$sce + se <- addSampleAnnots(se, sampleAnnot) + tmpf <- tempfile(fileext = ".rds") + saveRDS(se, file = tmpf) + settings <- readMaxQuantXML( + system.file("extdata/mq_example/1356_mqpar.xml", + package = "einprot")) + + ## Basic analysis + out <- runSEAnalysis( + outputDir = tempdir(), + outputBaseName = "MQ_LFQ_basic", + species = "mouse", + inFile = tmpf, + summaryInfo = settings, + aName = "LFQ.intensity", + idCol = function(df) getFirstId(df, "Majority.protein.IDs", ";"), + labelCol = function(df) getFirstId(df, "Majority.protein.IDs", ";"), + filtersSE = list() + ) + ## Output file + out +} + +} +\author{ +Charlotte Soneson +} diff --git a/man/runSpectronautAnalysis.Rd b/man/runSpectronautAnalysis.Rd index a8715076..6f51d720 100644 --- a/man/runSpectronautAnalysis.Rd +++ b/man/runSpectronautAnalysis.Rd @@ -29,9 +29,10 @@ runSpectronautAnalysis( sampleAnnot, includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, imputeMethod = "MinProb", + imputeArgs = list(), + filtersDF = list(), + filtersSE = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -161,17 +162,29 @@ input file, after removing the \code{iColPattern}.} \item{includeOnlySamples, excludeSamples}{Character vectors defining specific samples to include or exclude from all analyses.} -\item{minScore}{Numeric, minimum score for a protein to be retained in the -analysis. Set to \code{NULL} if no score filtering is desired.} - -\item{minPeptides}{Numeric, minimum number of peptides for a protein to be -retained in the analysis. Set to \code{NULL} if no filtering on the -number of peptides is desired.} - \item{imputeMethod}{Character string defining the imputation method to use. -Currently, \code{"impSeqRob"}, \code{"MinProb"}, and -\code{"MinProbGlobal"} are supported. See \code{\link{doImputation}} for -more details about the methods.} +Currently, \code{"impSeqRob"}, \code{"MinProb"}, +\code{"MinProbGlobal"}, \code{"MinProbOffset"} and +\code{"MinProbGlobalOffset"} are supported. +See \code{\link{doImputation}} for more details about the methods.} + +\item{imputeArgs}{List with additional arguments to the imputation method. +Will be passed to \link{doImputation}.} + +\item{filtersDF}{Named list where each element is a filtering function +that takes a \code{data.frame} (or \code{tibble}) as +input and returns a filtered object of the same class. No other +arguments are allowed. The filtering functions will be applied in the +order they are provided in the list, after reading the long-format text +file, and before creating the wide-format assay. Only +applies if \code{spectronautFileType} is \code{"long_format"}.} + +\item{filtersSE}{A named \code{list}, where each element is a function +that takes a \code{SummarizedExperiment} object as input and returns +a logical vector of the same length as the number of rows in \code{sce}, +and where \code{TRUE} implies that the row should be retained. Default +sets of filtering functions for input data from different tools are +provided (see \code{?defaultFiltersSE}).} \item{assaysForExport}{Character vector defining the name(s) of the assays to use for exported abundances and barplots. This could, for example, @@ -222,8 +235,12 @@ average value across all samples in the \code{baselineGroup} from the same batch as the original sample.} \item{normMethod}{Character scalar indicating the normalization method to -use. Currently, any method from \code{MsCoreUtils::normalizeMethods()} -or \code{"none"} are valid values.} +use. Currently, \code{"center.mean"}, \code{"center.median"}, +\code{"diff.median"}, \code{"center.mean.shared"}, +\code{"center.median.shared"}, \code{"diff.mean.shared"}, +\code{"diff.median.shared"} (applied on the log-transformed values), +\code{"vsn"} (applied on the natural-scale values), +and \code{"none"}, are valid values.} \item{spikeFeatures}{Character vector indicating the 'spike-in' features to use for estimation of normalization factors. If \code{NULL} diff --git a/tests/testthat/test-checkArgumentsDIANN.R b/tests/testthat/test-checkArgumentsDIANN.R index d960291c..5689a260 100644 --- a/tests/testthat/test-checkArgumentsDIANN.R +++ b/tests/testthat/test-checkArgumentsDIANN.R @@ -34,9 +34,10 @@ test_that("argument checking for DIANN works", { group = c("A", "A", "A", "B", "B", "B")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersDF = list(), + filtersSE = list(), imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -246,6 +247,10 @@ test_that("argument checking for DIANN works", { args <- args0 args$proteinIdCol <- "Protein.ID" expect_null(do.call(.checkArgumentsDIANN, args)) + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsDIANN, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) ## stringIdCol args <- args0 @@ -307,23 +312,29 @@ test_that("argument checking for DIANN works", { expect_error(do.call(.checkArgumentsDIANN, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersDF args <- args0 - args$minScore <- "1" + args$filtersDF <- "1" expect_error(do.call(.checkArgumentsDIANN, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + "'filtersDF' must be of class 'list'") + args$filtersDF <- list(function(x) x) expect_error(do.call(.checkArgumentsDIANN, args), - "'minScore' must have length 1") + "'namesfiltersDF' must not be NULL") + args$filtersDF <- list(f1 = function(x, y) x + y) + expect_error(do.call(.checkArgumentsDIANN, args), + "is not TRUE") - ## minPeptides + ## filtersSE args <- args0 - args$minPeptides <- "1" + args$filtersSE <- "1" + expect_error(do.call(.checkArgumentsDIANN, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(.checkArgumentsDIANN, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(.checkArgumentsDIANN, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -337,6 +348,12 @@ test_that("argument checking for DIANN works", { expect_error(do.call(.checkArgumentsDIANN, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsDIANN, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -351,7 +368,7 @@ test_that("argument checking for DIANN works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(.checkArgumentsDIANN, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-checkArgumentsFragPipe.R b/tests/testthat/test-checkArgumentsFragPipe.R index 81ec6840..e5b763f0 100644 --- a/tests/testthat/test-checkArgumentsFragPipe.R +++ b/tests/testthat/test-checkArgumentsFragPipe.R @@ -31,11 +31,11 @@ test_that("argument checking for FP works", { "Chd4BF", "RBC_ctrl", "RBC_ctrl", "RBC_ctrl")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersSE = einprotFragPipeFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, - addAbundanceValues = TRUE, + addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), @@ -219,6 +219,10 @@ test_that("argument checking for FP works", { args <- args0 args$proteinIdCol <- "Protein.ID" expect_null(do.call(.checkArgumentsFragPipe, args)) + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsFragPipe, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) ## stringIdCol args <- args0 @@ -299,23 +303,17 @@ test_that("argument checking for FP works", { expect_error(do.call(.checkArgumentsFragPipe, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersSE args <- args0 - args$minScore <- "1" - expect_error(do.call(.checkArgumentsFragPipe, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + args$filtersSE <- "1" expect_error(do.call(.checkArgumentsFragPipe, args), - "'minScore' must have length 1") - - ## minPeptides - args <- args0 - args$minPeptides <- "1" + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(.checkArgumentsFragPipe, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(.checkArgumentsFragPipe, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -329,6 +327,12 @@ test_that("argument checking for FP works", { expect_error(do.call(.checkArgumentsFragPipe, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsFragPipe, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -343,7 +347,7 @@ test_that("argument checking for FP works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(.checkArgumentsFragPipe, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-checkArgumentsMaxQuant.R b/tests/testthat/test-checkArgumentsMaxQuant.R index 667b878d..a63f853a 100644 --- a/tests/testthat/test-checkArgumentsMaxQuant.R +++ b/tests/testthat/test-checkArgumentsMaxQuant.R @@ -39,9 +39,9 @@ test_that("argument checking for MQ works", { "Chd4BF", "RBC_ctrl", "RBC_ctrl", "RBC_ctrl")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersSE = einprotMQFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = c("iBAQ", "Top3"), addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -219,6 +219,10 @@ test_that("argument checking for MQ works", { args$proteinIdCol <- 1 expect_error(do.call(.checkArgumentsMaxQuant, args), "'proteinIdCol' must be of class 'character'") + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsMaxQuant, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) ## stringIdCol args <- args0 @@ -298,23 +302,17 @@ test_that("argument checking for MQ works", { expect_error(do.call(.checkArgumentsMaxQuant, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersSE args <- args0 - args$minScore <- "1" - expect_error(do.call(.checkArgumentsMaxQuant, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + args$filtersSE <- "1" expect_error(do.call(.checkArgumentsMaxQuant, args), - "'minScore' must have length 1") - - ## minPeptides - args <- args0 - args$minPeptides <- "1" + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(.checkArgumentsMaxQuant, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(.checkArgumentsMaxQuant, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -328,6 +326,12 @@ test_that("argument checking for MQ works", { expect_error(do.call(.checkArgumentsMaxQuant, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsMaxQuant, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -342,7 +346,7 @@ test_that("argument checking for MQ works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(.checkArgumentsMaxQuant, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-checkArgumentsPDTMT.R b/tests/testthat/test-checkArgumentsPDTMT.R index e17f7c39..344ddb03 100644 --- a/tests/testthat/test-checkArgumentsPDTMT.R +++ b/tests/testthat/test-checkArgumentsPDTMT.R @@ -45,12 +45,9 @@ test_that("argument checking for PD-TMT works", { rep("WT", 4))), includeOnlySamples = "", excludeSamples = "", - minScore = 2, - minDeltaScore = 0.2, - minPeptides = 2, - minPSMs = 2, - masterProteinsOnly = FALSE, + filtersSE = einprotPDTMTProteinFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, addAbundanceValues = TRUE, addHeatmaps = TRUE, @@ -250,6 +247,10 @@ test_that("argument checking for PD-TMT works", { args$proteinIdCol <- 1 expect_error(do.call(.checkArgumentsPDTMT, args), "'proteinIdCol' must be of class 'character'") + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsPDTMT, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) ## stringIdCol args <- args0 @@ -374,60 +375,17 @@ test_that("argument checking for PD-TMT works", { expect_error(do.call(.checkArgumentsPDTMT, args), "Please specify max one of includeOnlySamples") - ## minScore/minDeltaScore - args <- args0 - args$minScore <- "1" - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minScore' must have length 1") - args$inputLevel <- "PeptideGroups" - expect_null(do.call(.checkArgumentsPDTMT, args)) - - args <- args0 - args$inputLevel <- "PeptideGroups" - args$minDeltaScore <- "1" - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minDeltaScore' must be of class 'numeric'") - args$minDeltaScore <- c(1, 2) - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minDeltaScore' must have length 1") - args$inputLevel <- "Proteins" - expect_null(do.call(.checkArgumentsPDTMT, args)) - - ## minPeptides/minPSMs - args <- args0 - args$minPeptides <- "1" - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) - expect_error(do.call(.checkArgumentsPDTMT, args), - "'minPeptides' must have length 1") - args$inputLevel <- "PeptideGroups" - expect_null(do.call(.checkArgumentsPDTMT, args)) - + ## filtersSE args <- args0 - args$inputLevel <- "PeptideGroups" - args$minPSMs <- "1" + args$filtersSE <- "1" expect_error(do.call(.checkArgumentsPDTMT, args), - "'minPSMs' must be of class 'numeric'") - args$minPSMs <- c(1, 2) + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(.checkArgumentsPDTMT, args), - "'minPSMs' must have length 1") - args$inputLevel <- "Proteins" - expect_null(do.call(.checkArgumentsPDTMT, args)) - - ## masterProteinsOnly - args <- args0 - args$masterProteinsOnly <- 1 - expect_error(do.call(.checkArgumentsPDTMT, args), - "'masterProteinsOnly' must be of class 'logical'") - args$masterProteinsOnly <- c(TRUE, FALSE) + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(.checkArgumentsPDTMT, args), - "'masterProteinsOnly' must have length 1") - args$inputLevel <- "PeptideGroups" - expect_null(do.call(.checkArgumentsPDTMT, args)) + "is not TRUE") ## imputeMethod args <- args0 @@ -441,6 +399,12 @@ test_that("argument checking for PD-TMT works", { expect_error(do.call(.checkArgumentsPDTMT, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsPDTMT, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 diff --git a/tests/testthat/test-checkArgumentsSE.R b/tests/testthat/test-checkArgumentsSE.R new file mode 100644 index 00000000..ad3ec858 --- /dev/null +++ b/tests/testthat/test-checkArgumentsSE.R @@ -0,0 +1,682 @@ +test_that("argument checking for SE works", { + ## Working arguments + args0 <- list( + templateRmd = system.file("extdata", "process_basic_template.Rmd", + package = "einprot"), + outputDir = tempdir(), + outputBaseName = "baseName", + reportTitle = "reportTitle", + reportAuthor = "reportAuthor", + forceOverwrite = TRUE, + experimentInfo = list("Experiment type" = "experiment", + "Sample name" = "example"), + species = "roundworm", + inFile = system.file("extdata", "mq_example", "1356_sce_init.rds", + package = "einprot"), + summaryInfo = list(), + aName = "LFQ.intensity", + idCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "nonunique", + splitSeparator = ";", joinSeparator = "."), + labelCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "nonunique", + splitSeparator = ";", joinSeparator = "."), + geneIdCol = function(df) getFirstId(df, colName = "Gene.names", + separator = ";"), + proteinIdCol = "Majority.protein.IDs", + stringIdCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "missing", splitSeparator = ";", + joinSeparator = ".", makeUnique = FALSE), + extraFeatureCols = NULL, + filtersSE = einprotMQFilters, + imputeMethod = "MinProb", + imputeArgs = list(), + assaysForExport = c("iBAQ", "Top3"), + addAbundanceValues = TRUE, + addHeatmaps = TRUE, + mergeGroups = list(), + comparisons = list(), + ctrlGroup = "", + allPairwiseComparisons = TRUE, + singleFit = FALSE, + subtractBaseline = FALSE, + baselineGroup = "", + normMethod = "none", + spikeFeatures = NULL, + stattest = "limma", + minNbrValidValues = 2, + minlFC = 0, + samSignificance = TRUE, + nperm = 100, + volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, + volcanoMaxFeatures = 10, + volcanoLabelSign = "both", + volcanoS0 = 0.1, + volcanoFeaturesToLabel = c(""), + addInteractiveVolcanos = FALSE, + interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, + complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, + maxComplexSimilarity = 1, + seed = 123, + includeFeatureCollections = "complexes", + minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", + complexDbPath = system.file( + "extdata", "complexes", + "complexdb_einprot0.5.0_20220323_orthologs.rds", + package = "einprot"), + stringVersion = "11.5", + stringDir = "", + linkTableColumns = c(), + customYml = NULL, + doRender = TRUE + ) + + ## Check that it works with these parameter values + expect_null(do.call(.checkArgumentsSE, args0)) + + ## templateRmd + args <- args0 + args$templateRmd <- c(args$templateRmd, args$templateRmd) + expect_error(do.call(.checkArgumentsSE, args), + "'templateRmd' must have length 1") + args$templateRmd <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'templateRmd' must be of class 'character'") + args$templateRmd <- "missing_file" + expect_error(do.call(.checkArgumentsSE, args), + "'templateRmd' must point to an existing file") + + ## outputDir + args <- args0 + args$outputDir <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'outputDir' must be of class 'character'") + args$outputDir <- c("dir1", "dir2") + expect_error(do.call(.checkArgumentsSE, args), + "'outputDir' must have length 1") + + ## outputBaseName + args <- args0 + args$outputBaseName <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'outputBaseName' must be of class 'character'") + args$outputBaseName <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'outputBaseName' must have length 1") + + ## reportTitle + args <- args0 + args$reportTitle <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'reportTitle' must be of class 'character'") + args$reportTitle <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'reportTitle' must have length 1") + + ## reportAuthor + args <- args0 + args$reportAuthor <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'reportAuthor' must be of class 'character'") + args$reportAuthor <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'reportAuthor' must have length 1") + + ## forceOverwrite + args <- args0 + args$forceOverwrite <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'forceOverwrite' must be of class 'logical'") + args$forceOverwrite <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'forceOverwrite' must have length 1") + + ## experimentInfo + args <- args0 + args$experimentInfo <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'experimentInfo' must be of class 'list'") + args$experimentInfo <- list(1, 2) + expect_error(do.call(.checkArgumentsSE, args), + "'namesexperimentInfo' must not be NULL") + args$experimentInfo <- list() + expect_null(do.call(.checkArgumentsSE, args)) + + ## species + args <- args0 + args$species <- 1 + expect_warning(do.call(.checkArgumentsSE, args), + "Unknown species 1") + args$species <- c("Mouse", "Human") + expect_error(do.call(.checkArgumentsSE, args), + "length(species) == 1 is not TRUE", fixed = TRUE) + args$species <- "Mouse" + expect_null(do.call(.checkArgumentsSE, args)) + + ## inFile + args <- args0 + args$inFile <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'inFile' must be of class 'character'") + args$inFile <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'inFile' must have length 1") + args$inFile <- "missing" + expect_error(do.call(.checkArgumentsSE, args), + "'inFile' must point to an existing file") + + ## summaryInfo + args <- args0 + args$summaryInfo <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'summaryInfo' must be of class 'list'") + args$summaryInfo <- list("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'namessummaryInfo' must not be NULL") + + ## aName + args <- args0 + args$aName <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'aName' must be of class 'character'") + args$aName <- c("iBAQ", "Unique.peptides") + expect_error(do.call(.checkArgumentsSE, args), + "'aName' must have length 1") + args$aName <- "missing" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'aName' must be one of") + + ## idCol + args <- args0 + args$idCol <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'idCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$labelCol <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'labelCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$geneIdCol <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'geneIdCol' must be of class 'character'") + + ## proteinIdCol + args <- args0 + args$proteinIdCol <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'proteinIdCol' must be of class 'character'") + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsSE, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) + + ## stringIdCol + args <- args0 + args$stringIdCol <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'stringIdCol' must be of class 'character'") + + ## extraFeatureCols + args <- args0 + args$extraFeatureCols <- function(df) df$einprotId + expect_error(do.call(.checkArgumentsSE, args), + "'extraFeatureCols' must be of class 'list'") + args$extraFeatureCols <- list(function(df) df$einprotId) + expect_error(do.call(.checkArgumentsSE, args), + "'namesextraFeatureCols' must not be NULL") + args$extraFeatureCols <- list(newCol = 1) + expect_error(do.call(.checkArgumentsSE, args), + "'i' must be of class 'character'") + args$extraFeatureCols <- list(newCol = function(x, y) "a") + expect_error(do.call(.checkArgumentsSE, args), + "length(formals(i)) == 1 is not TRUE", fixed = TRUE) + + ## filtersSE + args <- args0 + args$filtersSE <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) + expect_error(do.call(.checkArgumentsSE, args), + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) + expect_error(do.call(.checkArgumentsSE, args), + "is not TRUE") + + ## imputeMethod + args <- args0 + args$imputeMethod <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'imputeMethod' must be of class 'character'") + args$imputeMethod <- c("MinProb", "impSeqRob") + expect_error(do.call(.checkArgumentsSE, args), + "'imputeMethod' must have length 1") + args$imputeMethod <- "wrong" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'imputeMethod' must be one of") + + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'imputeArgs' must be of class 'list'") + + ## assaysForExport + args <- args0 + args$assaysForExport <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'assaysForExport' must be of class 'character'") + + ## addAbundanceValues + args <- args0 + args$addAbundanceValues <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'addAbundanceValues' must be of class 'logical'") + args$addAbundanceValues <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'addAbundanceValues' must have length 1") + + ## addHeatmaps + args <- args0 + args$addHeatmaps <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'addHeatmaps' must be of class 'logical'") + args$addHeatmaps <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'addHeatmaps' must have length 1") + + ## mergeGroups + args <- args0 + args$mergeGroups <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'mergeGroups' must be of class 'list'") + args$mergeGroups <- list(c("c1", "c2")) + expect_error(do.call(.checkArgumentsSE, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list(g1 = c("c1", "c2"), + g1 = c("c3", "c4")) + expect_error(do.call(.checkArgumentsSE, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list() + expect_null(do.call(.checkArgumentsSE, args)) + + ## comparisons + args <- args0 + args$comparisons <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'comparisons' must be of class 'list'") + args$comparisons <- list(g1 = c("c1", "c2"), + g2 = c("c2", "c4", "c3")) + expect_error(do.call(.checkArgumentsSE, args), + "Each entry in 'comparisons' must have exactly two elements") + args$comparisons <- list() + expect_null(do.call(.checkArgumentsSE, args)) + + ## ctrlGroup + args <- args0 + args$ctrlGroup <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'ctrlGroup' must be of class 'character'") + args$ctrlGroup <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSE, args), + "'ctrlGroup' must have length 1") + + ## allPairwiseComparisons + args <- args0 + args$allPairwiseComparisons <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'allPairwiseComparisons' must be of class 'logical'") + args$allPairwiseComparisons <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'allPairwiseComparisons' must have length 1") + + ## singleFit + args <- args0 + args$singleFit <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'singleFit' must be of class 'logical'") + args$singleFit <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'singleFit' must have length 1") + + ## subtractBaseline + args <- args0 + args$subtractBaseline <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'subtractBaseline' must be of class 'logical'") + args$subtractBaseline <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'subtractBaseline' must have length 1") + + ## baselineGroup + args <- args0 + args$baselineGroup <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'baselineGroup' must be of class 'character'") + + ## normMethod + args <- args0 + args$normMethod <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'normMethod' must be of class 'character'") + args$normMethod <- c("none", "center.median") + expect_error(do.call(.checkArgumentsSE, args), + "'normMethod' must have length 1") + args$normMethod <- "wrong" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'normMethod' must be one of") + + ## spikeFeatures + args <- args0 + args$spikeFeatures <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'spikeFeatures' must be of class 'character'") + + ## stattest + args <- args0 + args$stattest <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'stattest' must be of class 'character'") + args$stattest <- c("limma", "ttest") + expect_error(do.call(.checkArgumentsSE, args), + "'stattest' must have length 1") + args$stattest <- "wrong" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'stattest' must be one of") + + ## minNbrValidValues + args <- args0 + args$minNbrValidValues <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'minNbrValidValues' must be of class 'numeric'") + args$minNbrValidValues <- c(10, 20) + expect_error(do.call(.checkArgumentsSE, args), + "'minNbrValidValues' must have length 1") + args$minNbrValidValues <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'minNbrValidValues' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## minlFC + args <- args0 + args$minlFC <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'minlFC' must be of class 'numeric'") + args$minlFC <- c(10, 20) + expect_error(do.call(.checkArgumentsSE, args), + "'minlFC' must have length 1") + args$minlFC <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'minlFC' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## samSignificance + args <- args0 + args$samSignificance <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'samSignificance' must be of class 'logical'") + args$samSignificance <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'samSignificance' must have length 1") + + ## nperm + args <- args0 + args$nperm <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'nperm' must be of class 'numeric'") + args$nperm <- c(10, 20) + expect_error(do.call(.checkArgumentsSE, args), + "'nperm' must have length 1") + args$nperm <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'nperm' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoAdjPvalThr + args <- args0 + args$volcanoAdjPvalThr <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoAdjPvalThr' must be of class 'numeric'") + args$volcanoAdjPvalThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoAdjPvalThr' must have length 1") + args$volcanoAdjPvalThr <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoAdjPvalThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## volcanoLog2FCThr + args <- args0 + args$volcanoLog2FCThr <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoLog2FCThr' must be of class 'numeric'") + args$volcanoLog2FCThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoLog2FCThr' must have length 1") + args$volcanoLog2FCThr <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoLog2FCThr' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoMaxFeatures + args <- args0 + args$volcanoMaxFeatures <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoMaxFeatures' must be of class 'numeric'") + args$volcanoMaxFeatures <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoMaxFeatures' must have length 1") + args$volcanoMaxFeatures <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoMaxFeatures' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoLabelSign + args <- args0 + args$volcanoLabelSign <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoLabelSign' must be of class 'character'") + args$volcanoLabelSign <- c("both", "pos") + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoLabelSign' must have length 1") + args$volcanoLabelSign <- "missing" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'volcanoLabelSign' must be one of") + + ## volcanoS0 + args <- args0 + args$volcanoS0 <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoS0' must be of class 'numeric'") + args$volcanoS0 <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoS0' must have length 1") + args$volcanoS0 <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoS0' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoFeaturesToLabel + args <- args0 + args$volcanoFeaturesToLabel <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'volcanoFeaturesToLabel' must be of class 'character'") + + ## addInteractiveVolcanos + args <- args0 + args$addInteractiveVolcanos <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'addInteractiveVolcanos' must be of class 'logical'") + args$addInteractiveVolcanos <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'addInteractiveVolcanos' must have length 1") + + ## interactiveDisplayColumns + args <- args0 + args$interactiveDisplayColumns <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'interactiveDisplayColumns' must be of class 'character'") + + # interactiveGroupColumn + args <- args0 + args$interactiveGroupColumn <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'interactiveGroupColumn' must be of class 'character'") + args$interactiveGroupColumn <- c("col1", "col2") + expect_error(do.call(.checkArgumentsSE, args), + "'interactiveGroupColumn' must have length 1") + + ## complexFDRThr + args <- args0 + args$complexFDRThr <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'complexFDRThr' must be of class 'numeric'") + args$complexFDRThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'complexFDRThr' must have length 1") + args$complexFDRThr <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'complexFDRThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## maxNbrComplexesToPlot + args <- args0 + args$maxNbrComplexesToPlot <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'maxNbrComplexesToPlot' must be of class 'numeric'") + args$maxNbrComplexesToPlot <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'maxNbrComplexesToPlot' must have length 1") + args$maxNbrComplexesToPlot <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'maxNbrComplexesToPlot' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## maxComplexSimilarity + args <- args0 + args$maxComplexSimilarity <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'maxComplexSimilarity' must be of class 'numeric'") + args$maxComplexSimilarity <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'maxComplexSimilarity' must have length 1") + + ## seed + args <- args0 + args$seed <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'seed' must be of class 'numeric'") + args$seed <- c(4, 5) + expect_error(do.call(.checkArgumentsSE, args), + "'seed' must have length 1") + args$seed <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'seed' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## includeFeatureCollections + args <- args0 + args$includeFeatureCollections <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'includeFeatureCollections' must be of class 'character'") + args$includeFeatureCollections <- "wrong" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'includeFeatureCollections' must be one of") + + ## minSizeToKeepSet + args <- args0 + args$minSizeToKeepSet <- "1" + expect_error(do.call(.checkArgumentsSE, args), + "'minSizeToKeepSet' must be of class 'numeric'") + args$minSizeToKeepSet <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSE, args), + "'minSizeToKeepSet' must have length 1") + args$minSizeToKeepSet <- -1 + expect_error(do.call(.checkArgumentsSE, args), + "'minSizeToKeepSet' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## customComplexes + args <- args0 + args$customComplexes <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'customComplexes' must be of class 'list'") + args$customComplexes <- list(c("c1", "c2"), + c("c2", "c4", "c3")) + expect_error(do.call(.checkArgumentsSE, args), + "'namescustomComplexes' must not be NULL") + args$customComplexes <- list() + expect_null(do.call(.checkArgumentsSE, args)) + + ## complexSpecies + args <- args0 + args$complexSpecies <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'complexSpecies' must be of class 'character'") + args$complexSpecies <- c("all", "current") + expect_error(do.call(.checkArgumentsSE, args), + "'complexSpecies' must have length 1") + args$complexSpecies <- "wrong" + expect_error(do.call(.checkArgumentsSE, args), + "All values in 'complexSpecies' must be one of") + + ## complexDbPath + args <- args0 + args$complexDbPath <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'complexDbPath' must be of class 'character'") + args$complexDbPath <- "missing_file" + expect_error(do.call(.checkArgumentsSE, args), + "'complexDbPath' must point to an existing file") + + ## stringVersion + args <- args0 + args$stringVersion <- 11 + expect_error(do.call(.checkArgumentsSE, args), + "'stringVersion' must be of class 'character'") + args$stringVersion <- c("11.0", "11.5") + expect_error(do.call(.checkArgumentsSE, args), + "'stringVersion' must have length 1") + + ## stringDir + args <- args0 + args$stringDir <- 11 + expect_error(do.call(.checkArgumentsSE, args), + "'stringDir' must be of class 'character'") + args$stringDir <- c("", "") + expect_error(do.call(.checkArgumentsSE, args), + "'stringDir' must have length 1") + + ## linkTableColumns + args <- args0 + args$linkTableColumns <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'linkTableColumns' must be of class 'character'") + + ## customYml + args <- args0 + args$customYml <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'customYml' must be of class 'character'") + args$customYml <- "missing_file" + expect_error(do.call(.checkArgumentsSE, args), + "'customYml' must point to an existing file") + + ## doRender + args <- args0 + args$doRender <- 1 + expect_error(do.call(.checkArgumentsSE, args), + "'doRender' must be of class 'logical'") + args$doRender <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSE, args), + "'doRender' must have length 1") +}) diff --git a/tests/testthat/test-checkArgumentsSpectronaut.R b/tests/testthat/test-checkArgumentsSpectronaut.R new file mode 100644 index 00000000..0ae43d24 --- /dev/null +++ b/tests/testthat/test-checkArgumentsSpectronaut.R @@ -0,0 +1,786 @@ +test_that("argument checking for Spectronaut works", { + ## Working arguments + args0 <- list( + templateRmd = system.file("extdata", "process_basic_template.Rmd", + package = "einprot"), + outputDir = tempdir(), + outputBaseName = "baseName", + reportTitle = "reportTitle", + reportAuthor = "reportAuthor", + forceOverwrite = TRUE, + experimentInfo = list("Experiment type" = "experiment", + "Sample name" = "example"), + species = "roundworm", + spectronautFile = system.file("extdata", "spectronaut_example", + "SN_unit_test_subset.tsv", package = "einprot"), + spectronautFileType = "pg_pivot", + outLevel = "pg", + spectronautLogFile = system.file( + "extdata", "spectronaut_example", + "PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt", + package = "einprot"), + aName = "PG.Quantity", + idCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups")), + labelCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups")), + geneIdCol = function(df) getFirstId(df, colName = "PG.Genes"), + proteinIdCol = "PG.ProteinGroups", + stringIdCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups"), + combineWhen = "missing", + makeUnique = FALSE), + extraFeatureCols = NULL, + iColPattern = ".PG.Quantity$", + sampleAnnot = data.frame( + sample = c("LFQ_24min_500ng_2Th_3ms_A_01", + "LFQ_24min_500ng_2Th_3ms_A_02", + "LFQ_24min_500ng_2Th_3ms_A_03", + "LFQ_24min_500ng_2Th_3ms_B_01", + "LFQ_24min_500ng_2Th_3ms_B_02", + "LFQ_24min_500ng_2Th_3ms_B_03"), + group = c("A", "A", "A", "B", "B", "B")), + includeOnlySamples = "", + excludeSamples = "", + filtersDF = list(), + filtersSE = list(), + imputeMethod = "MinProb", + imputeArgs = list(), + assaysForExport = NULL, + addAbundanceValues = TRUE, + addHeatmaps = TRUE, + mergeGroups = list(), + comparisons = list(), + ctrlGroup = "", + allPairwiseComparisons = TRUE, + singleFit = FALSE, + subtractBaseline = FALSE, + baselineGroup = "", + normMethod = "none", + spikeFeatures = NULL, + stattest = "limma", + minNbrValidValues = 2, + minlFC = 0, + samSignificance = TRUE, + nperm = 100, + volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, + volcanoMaxFeatures = 10, + volcanoLabelSign = "both", + volcanoS0 = 0.1, + volcanoFeaturesToLabel = c(""), + addInteractiveVolcanos = FALSE, + interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, + complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, + maxComplexSimilarity = 1, + seed = 123, + includeFeatureCollections = "complexes", + minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", + complexDbPath = system.file( + "extdata", "complexes", + "complexdb_einprot0.5.0_20220323_orthologs.rds", + package = "einprot"), + stringVersion = "11.5", + stringDir = "", + linkTableColumns = c(), + customYml = NULL, + doRender = TRUE + ) + + ## Check that it works with these parameter values + expect_null(do.call(.checkArgumentsSpectronaut, args0)) + + ## templateRmd + args <- args0 + args$templateRmd <- c(args$templateRmd, args$templateRmd) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'templateRmd' must have length 1") + args$templateRmd <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'templateRmd' must be of class 'character'") + args$templateRmd <- "missing_file" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'templateRmd' must point to an existing file") + + ## outputDir + args <- args0 + args$outputDir <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outputDir' must be of class 'character'") + args$outputDir <- c("dir1", "dir2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outputDir' must have length 1") + + ## outputBaseName + args <- args0 + args$outputBaseName <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outputBaseName' must be of class 'character'") + args$outputBaseName <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outputBaseName' must have length 1") + + ## reportTitle + args <- args0 + args$reportTitle <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'reportTitle' must be of class 'character'") + args$reportTitle <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'reportTitle' must have length 1") + + ## reportAuthor + args <- args0 + args$reportAuthor <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'reportAuthor' must be of class 'character'") + args$reportAuthor <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'reportAuthor' must have length 1") + + ## forceOverwrite + args <- args0 + args$forceOverwrite <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'forceOverwrite' must be of class 'logical'") + args$forceOverwrite <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'forceOverwrite' must have length 1") + + ## experimentInfo + args <- args0 + args$experimentInfo <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'experimentInfo' must be of class 'list'") + args$experimentInfo <- list(1, 2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'namesexperimentInfo' must not be NULL") + args$experimentInfo <- list() + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## species + args <- args0 + args$species <- 1 + expect_warning(do.call(.checkArgumentsSpectronaut, args), + "Unknown species 1") + args$species <- c("Mouse", "Human") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "length(species) == 1 is not TRUE", fixed = TRUE) + args$species <- "Mouse" + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## spectronautFile + args <- args0 + args$spectronautFile <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautFile' must be of class 'character'") + args$spectronautFile <- "missing" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautFile' must point to an existing file") + + ## spectronautFileType + args <- args0 + args$spectronautFileType <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautFileType' must be of class 'character'") + args$spectronautFileType <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "values in 'spectronautFileType' must be one of") + args$spectronautFileType = c("pg_pivot", "pg_pivot") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautFileType' must have length 1") + + ## outLevel + args <- args0 + args$outLevel <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outLevel' must be of class 'character'") + args$outLevel <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "values in 'outLevel' must be one of") + args$outLevel = c("pg", "pg") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'outLevel' must have length 1") + + ## spectronautLogFile + args <- args0 + args$spectronautLogFile <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautLogFile' must be of class 'character'") + args$spectronautLogFile <- "missing" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spectronautLogFile' must point to an existing file") + + ## aName + # args <- args0 + # args$aName <- 1 + # expect_error(do.call(.checkArgumentsSpectronaut, args), + # "'aName' must be of class 'character'") + # args$aName <- NULL + # args <- c(args, list(aName = NULL)) + # expect_error(do.call(.checkArgumentsSpectronaut, args), + # "'aName' must not be NULL") + + ## idCol + args <- args0 + args$idCol <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'idCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$labelCol <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'labelCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$geneIdCol <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'geneIdCol' must be of class 'character'") + + ## proteinIdCol + args <- args0 + args$proteinIdCol <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'proteinIdCol' must be of class 'character'") + args <- args0 + args$proteinIdCol <- "Protein.ID" + expect_null(do.call(.checkArgumentsSpectronaut, args)) + args <- args0 + args$proteinIdCol <- function(x, y) x + y + expect_error(do.call(.checkArgumentsSpectronaut, args), + "length(formals(proteinIdCol)) == 1 is not TRUE", fixed = TRUE) + + ## stringIdCol + args <- args0 + args$stringIdCol <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stringIdCol' must be of class 'character'") + + ## extraFeatureCols + args <- args0 + args$extraFeatureCols <- function(df) df$einprotId + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'extraFeatureCols' must be of class 'list'") + args$extraFeatureCols <- list(function(df) df$einprotId) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'namesextraFeatureCols' must not be NULL") + args$extraFeatureCols <- list(newCol = 1) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'i' must be of class 'character'") + args$extraFeatureCols <- list(newCol = function(x, y) "a") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "length(formals(i)) == 1 is not TRUE", fixed = TRUE) + + ## iColPattern + args <- args0 + args$iColPattern <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'iColPattern' must be of class 'character'") + args$iColPattern <- c("\\.PG\\.Quantity$", "\\.PG\\.Quantity$") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'iColPattern' must have length 1") + # args$iColPattern <- c("\\\\.PG\\\\.Quantity$") + # expect_error(do.call(.checkArgumentsSpectronaut, args), + # "All values in 'iColPattern' must be one of") + ## Works without escaped periods + args <- args0 + args$iColPattern <- ".PG.Quantity$" + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## sampleAnnot + args <- args0 + colnames(args$sampleAnnot) <- c("sample", "condition") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "colnames(sampleAnnot)) is not TRUE", fixed = TRUE) + colnames(args$sampleAnnot) <- NULL + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'colnamessampleAnnot' must not be NULL") + args$sampleAnnot <- as.matrix(args0$sampleAnnot) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'sampleAnnot' must be of class 'data.frame'") + args$sampleAnnot <- args0$sampleAnnot + args$sampleAnnot$group <- as.numeric(as.factor(args$sampleAnnot$group)) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'$sampleAnnotgroup' must be of class 'character'", + fixed = TRUE) + # args$sampleAnnot <- args0$sampleAnnot + # args$sampleAnnot$sample[1] <- paste0("iBAQ.", + # args$sampleAnnot$sample[1]) + # expect_error(do.call(.checkArgumentsSpectronaut, args), + # "Not all sample names are available in the sample") + + ## includeOnlySamples + args <- args0 + args$includeOnlySamples <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'includeOnlySamples' must be of class 'character'") + + ## excludeSamples + args <- args0 + args$excludeSamples <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'excludeSamples' must be of class 'character'") + args$includeOnlySamples <- "Adnp" + args$excludeSamples <- "RBC_ctrl" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "Please specify max one of includeOnlySamples") + + ## filtersDF + args <- args0 + args$filtersDF <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'filtersDF' must be of class 'list'") + args$filtersDF <- list(function(x) x) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'namesfiltersDF' must not be NULL") + args$filtersDF <- list(f1 = function(x, y) x + y) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "is not TRUE") + + ## filtersSE + args <- args0 + args$filtersSE <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "is not TRUE") + + ## imputeMethod + args <- args0 + args$imputeMethod <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'imputeMethod' must be of class 'character'") + args$imputeMethod <- c("MinProb", "impSeqRob") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'imputeMethod' must have length 1") + args$imputeMethod <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'imputeMethod' must be one of") + + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'imputeArgs' must be of class 'list'") + + ## assaysForExport + args <- args0 + args$assaysForExport <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'assaysForExport' must be of class 'character'") + + ## addAbundanceValues + args <- args0 + args$addAbundanceValues <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addAbundanceValues' must be of class 'logical'") + args$addAbundanceValues <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addAbundanceValues' must have length 1") + + ## addHeatmaps + args <- args0 + args$addHeatmaps <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addHeatmaps' must be of class 'logical'") + args$addHeatmaps <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addHeatmaps' must have length 1") + + ## mergeGroups + args <- args0 + args$mergeGroups <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'mergeGroups' must be of class 'list'") + args$mergeGroups <- list(c("c1", "c2")) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list(g1 = c("c1", "c2"), + g1 = c("c3", "c4")) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list() + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## comparisons + args <- args0 + args$comparisons <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'comparisons' must be of class 'list'") + args$comparisons <- list(g1 = c("c1", "c2"), + g2 = c("c2", "c4", "c3")) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "Each entry in 'comparisons' must have exactly two elements") + args$comparisons <- list() + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## ctrlGroup + args <- args0 + args$ctrlGroup <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'ctrlGroup' must be of class 'character'") + args$ctrlGroup <- c("name1", "name2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'ctrlGroup' must have length 1") + + ## allPairwiseComparisons + args <- args0 + args$allPairwiseComparisons <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'allPairwiseComparisons' must be of class 'logical'") + args$allPairwiseComparisons <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'allPairwiseComparisons' must have length 1") + + ## singleFit + args <- args0 + args$singleFit <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'singleFit' must be of class 'logical'") + args$singleFit <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'singleFit' must have length 1") + + ## subtractBaseline + args <- args0 + args$subtractBaseline <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'subtractBaseline' must be of class 'logical'") + args$subtractBaseline <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'subtractBaseline' must have length 1") + + ## baselineGroup + args <- args0 + args$baselineGroup <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'baselineGroup' must be of class 'character'") + + ## normMethod + args <- args0 + args$normMethod <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'normMethod' must be of class 'character'") + args$normMethod <- c("none", "center.median") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'normMethod' must have length 1") + args$normMethod <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'normMethod' must be one of") + + ## spikeFeatures + args <- args0 + args$spikeFeatures <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'spikeFeatures' must be of class 'character'") + + ## stattest + args <- args0 + args$stattest <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stattest' must be of class 'character'") + args$stattest <- c("limma", "ttest") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stattest' must have length 1") + args$stattest <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'stattest' must be one of") + + ## minNbrValidValues + args <- args0 + args$minNbrValidValues <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minNbrValidValues' must be of class 'numeric'") + args$minNbrValidValues <- c(10, 20) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minNbrValidValues' must have length 1") + args$minNbrValidValues <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minNbrValidValues' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## minlFC + args <- args0 + args$minlFC <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minlFC' must be of class 'numeric'") + args$minlFC <- c(10, 20) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minlFC' must have length 1") + args$minlFC <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minlFC' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## samSignificance + args <- args0 + args$samSignificance <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'samSignificance' must be of class 'logical'") + args$samSignificance <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'samSignificance' must have length 1") + + ## nperm + args <- args0 + args$nperm <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'nperm' must be of class 'numeric'") + args$nperm <- c(10, 20) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'nperm' must have length 1") + args$nperm <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'nperm' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoAdjPvalThr + args <- args0 + args$volcanoAdjPvalThr <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoAdjPvalThr' must be of class 'numeric'") + args$volcanoAdjPvalThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoAdjPvalThr' must have length 1") + args$volcanoAdjPvalThr <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoAdjPvalThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## volcanoLog2FCThr + args <- args0 + args$volcanoLog2FCThr <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoLog2FCThr' must be of class 'numeric'") + args$volcanoLog2FCThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoLog2FCThr' must have length 1") + args$volcanoLog2FCThr <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoLog2FCThr' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoMaxFeatures + args <- args0 + args$volcanoMaxFeatures <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoMaxFeatures' must be of class 'numeric'") + args$volcanoMaxFeatures <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoMaxFeatures' must have length 1") + args$volcanoMaxFeatures <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoMaxFeatures' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoLabelSign + args <- args0 + args$volcanoLabelSign <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoLabelSign' must be of class 'character'") + args$volcanoLabelSign <- c("both", "pos") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoLabelSign' must have length 1") + args$volcanoLabelSign <- "missing" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'volcanoLabelSign' must be one of") + + ## volcanoS0 + args <- args0 + args$volcanoS0 <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoS0' must be of class 'numeric'") + args$volcanoS0 <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoS0' must have length 1") + args$volcanoS0 <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoS0' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoFeaturesToLabel + args <- args0 + args$volcanoFeaturesToLabel <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'volcanoFeaturesToLabel' must be of class 'character'") + + ## addInteractiveVolcanos + args <- args0 + args$addInteractiveVolcanos <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addInteractiveVolcanos' must be of class 'logical'") + args$addInteractiveVolcanos <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'addInteractiveVolcanos' must have length 1") + + ## interactiveDisplayColumns + args <- args0 + args$interactiveDisplayColumns <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'interactiveDisplayColumns' must be of class 'character'") + + # interactiveGroupColumn + args <- args0 + args$interactiveGroupColumn <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'interactiveGroupColumn' must be of class 'character'") + args$interactiveGroupColumn <- c("col1", "col2") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'interactiveGroupColumn' must have length 1") + + ## complexFDRThr + args <- args0 + args$complexFDRThr <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexFDRThr' must be of class 'numeric'") + args$complexFDRThr <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexFDRThr' must have length 1") + args$complexFDRThr <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexFDRThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## maxNbrComplexesToPlot + args <- args0 + args$maxNbrComplexesToPlot <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'maxNbrComplexesToPlot' must be of class 'numeric'") + args$maxNbrComplexesToPlot <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'maxNbrComplexesToPlot' must have length 1") + args$maxNbrComplexesToPlot <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'maxNbrComplexesToPlot' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## maxComplexSimilarity + args <- args0 + args$maxComplexSimilarity <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'maxComplexSimilarity' must be of class 'numeric'") + args$maxComplexSimilarity <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'maxComplexSimilarity' must have length 1") + + ## seed + args <- args0 + args$seed <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'seed' must be of class 'numeric'") + args$seed <- c(4, 5) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'seed' must have length 1") + args$seed <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'seed' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## includeFeatureCollections + args <- args0 + args$includeFeatureCollections <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'includeFeatureCollections' must be of class 'character'") + args$includeFeatureCollections <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'includeFeatureCollections' must be one of") + + ## minSizeToKeepSet + args <- args0 + args$minSizeToKeepSet <- "1" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minSizeToKeepSet' must be of class 'numeric'") + args$minSizeToKeepSet <- c(0.1, 0.2) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minSizeToKeepSet' must have length 1") + args$minSizeToKeepSet <- -1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'minSizeToKeepSet' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## customComplexes + args <- args0 + args$customComplexes <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'customComplexes' must be of class 'list'") + args$customComplexes <- list(c("c1", "c2"), + c("c2", "c4", "c3")) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'namescustomComplexes' must not be NULL") + args$customComplexes <- list() + expect_null(do.call(.checkArgumentsSpectronaut, args)) + + ## complexSpecies + args <- args0 + args$complexSpecies <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexSpecies' must be of class 'character'") + args$complexSpecies <- c("all", "current") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexSpecies' must have length 1") + args$complexSpecies <- "wrong" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "All values in 'complexSpecies' must be one of") + + ## complexDbPath + args <- args0 + args$complexDbPath <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexDbPath' must be of class 'character'") + args$complexDbPath <- "missing_file" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'complexDbPath' must point to an existing file") + + ## stringVersion + args <- args0 + args$stringVersion <- 11 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stringVersion' must be of class 'character'") + args$stringVersion <- c("11.0", "11.5") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stringVersion' must have length 1") + + ## stringDir + args <- args0 + args$stringDir <- 11 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stringDir' must be of class 'character'") + args$stringDir <- c("", "") + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'stringDir' must have length 1") + + ## linkTableColumns + args <- args0 + args$linkTableColumns <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'linkTableColumns' must be of class 'character'") + + ## customYml + args <- args0 + args$customYml <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'customYml' must be of class 'character'") + args$customYml <- "missing_file" + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'customYml' must point to an existing file") + + ## doRender + args <- args0 + args$doRender <- 1 + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'doRender' must be of class 'logical'") + args$doRender <- c(TRUE, FALSE) + expect_error(do.call(.checkArgumentsSpectronaut, args), + "'doRender' must have length 1") + +}) diff --git a/tests/testthat/test-doFilter.R b/tests/testthat/test-doFilter.R index dddb6f07..39407c96 100644 --- a/tests/testthat/test-doFilter.R +++ b/tests/testthat/test-doFilter.R @@ -1,45 +1,66 @@ test_that("filtering works (MaxQuant)", { ## Fails with wrong argument specification - expect_error(filterMaxQuant(sce = 1, minScore = 10, minPeptides = 2, - plotUpset = TRUE, exclFile = NULL), - "'sce' must be of class 'SummarizedExperiment'") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = "10", - minPeptides = 2, plotUpset = TRUE, - exclFile = NULL), - "'minScore' must be of class 'numeric'") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = c(1, 2), - minPeptides = 2, plotUpset = TRUE, - exclFile = NULL), - "'minScore' must have length 1") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = "2", plotUpset = TRUE, - exclFile = NULL), - "'minPeptides' must be of class 'numeric'") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = c(1, 2), plotUpset = TRUE, - exclFile = NULL), - "'minPeptides' must have length 1") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = 2, plotUpset = 1, - exclFile = NULL), - "'plotUpset' must be of class 'logical'") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = 2, plotUpset = c(TRUE, FALSE), - exclFile = NULL), - "'plotUpset' must have length 1") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = 2, plotUpset = TRUE, - exclFile = 1), - "'exclFile' must be of class 'character'") - expect_error(filterMaxQuant(sce = sce_mq_final, minScore = 10, - minPeptides = 2, plotUpset = TRUE, - exclFile = c(tempfile(), tempfile())), - "'exclFile' must have length 1") + expect_error(filterFeaturesSE( + sce = 1, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = TRUE, exclFile = NULL), + "'sce' must be of class 'SummarizedExperiment'") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = 1, + plotUpset = TRUE, exclFile = NULL), + "'filtersSE' must be of class 'list'") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(function(se) rowData(se)$Score >= 10, + function(se) rowData(se)$Peptides >= 2), + plotUpset = TRUE, exclFile = NULL), + "'namesfiltersSE' must not be NULL") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(Score = function(se, minScore) rowData(se)$Score >= minScore, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = TRUE, exclFile = NULL), + "is not TRUE") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = 1, exclFile = NULL), + "'plotUpset' must be of class 'logical'") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = c(TRUE, FALSE), exclFile = NULL), + "'plotUpset' must have length 1") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = TRUE, exclFile = 1), + "'exclFile' must be of class 'character'") + expect_error(filterFeaturesSE( + sce = sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 2), + plotUpset = TRUE, exclFile = c(tempfile(), tempfile())), + "'exclFile' must have length 1") ## Works with correct argument specification tfl <- tempfile(fileext = ".txt") - out <- filterMaxQuant(sce_mq_final, minScore = 10, minPeptides = 3, - plotUpset = FALSE, exclFile = tfl) + out <- filterFeaturesSE( + sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 10, + Peptides = function(se) rowData(se)$Peptides >= 3, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)), + plotUpset = FALSE, exclFile = tfl) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Score >= 10 & rowData(sce_mq_final)$Peptides >= 3 & @@ -55,8 +76,17 @@ test_that("filtering works (MaxQuant)", { tmpin <- read.delim(tfl) expect_equal(nrow(tmpin), 97L) - out <- filterMaxQuant(sce_mq_final, minScore = 2, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 2, + Peptides = function(se) rowData(se)$Peptides >= 1, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Score >= 2 & rowData(sce_mq_final)$Peptides >= 1 & @@ -69,9 +99,27 @@ test_that("filtering works (MaxQuant)", { ))) expect_equal(nrow(out), 97L) + ## A single filter, with plot + out <- filterFeaturesSE( + sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 2), + plotUpset = TRUE, exclFile = NULL) + expect_equal(nrow(out), length(which( + rowData(sce_mq_final)$Score >= 2 + ))) + expect_equal(nrow(out), 130L) + ## Don't filter on score - out <- filterMaxQuant(sce_mq_final, minScore = NULL, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + sce_mq_final, + filtersSE = list(Peptides = function(se) rowData(se)$Peptides >= 1, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Peptides >= 1 & (rowData(sce_mq_final)$Reverse == "" | @@ -84,8 +132,16 @@ test_that("filtering works (MaxQuant)", { expect_equal(nrow(out), 97L) ## Don't filter on minPeptides - out <- filterMaxQuant(sce_mq_final, minScore = 5, minPeptides = NULL, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + sce_mq_final, + filtersSE = list(Score = function(se) rowData(se)$Score >= 5, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Score >= 5 & (rowData(sce_mq_final)$Reverse == "" | @@ -100,8 +156,17 @@ test_that("filtering works (MaxQuant)", { ## Missing columns - Score tmp <- sce_mq_final rowData(tmp)$Score <- NULL - out <- filterMaxQuant(tmp, minScore = 7, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list(Score = function(se) if ("Score" %in% colnames(rowData(se))) rowData(se)$Score >= 2 else rep(TRUE, nrow(se)), + Peptides = function(se) rowData(se)$Peptides >= 1, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Peptides >= 1 & (rowData(sce_mq_final)$Reverse == "" | @@ -117,8 +182,17 @@ test_that("filtering works (MaxQuant)", { tmp <- sce_mq_final rowData(tmp)$Score <- NULL rowData(tmp)$Only.identified.by.site <- NULL - out <- filterMaxQuant(tmp, minScore = 7, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list(Score = function(se) if ("Score" %in% colnames(rowData(se))) rowData(se)$Score >= 7 else rep(TRUE, nrow(se)), + Peptides = function(se) rowData(se)$Peptides >= 1, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant), + OnlySite = function(se) if ("Only.identified.by.site" %in% colnames(rowData(se))) (as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)) else rep(TRUE, nrow(se))), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Peptides >= 1 & (rowData(sce_mq_final)$Reverse == "" | @@ -128,25 +202,20 @@ test_that("filtering works (MaxQuant)", { ))) expect_equal(nrow(out), 112L) - ## Only one column present - tmp <- sce_mq_final - rowData(tmp)$Score <- NULL - rowData(tmp)$Only.identified.by.site <- NULL - rowData(tmp)$Peptides <- NULL - rowData(tmp)$Reverse <- NULL - out <- filterMaxQuant(tmp, minScore = 7, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) - expect_equal(nrow(out), length(which( - (rowData(sce_mq_final)$Potential.contaminant == "" | - is.na(rowData(sce_mq_final)$Potential.contaminant)) - ))) - expect_equal(nrow(out), 112L) - ## Missing columns - Potential.contaminant tmp <- sce_mq_final rowData(tmp)$Potential.contaminant <- NULL - out <- filterMaxQuant(tmp, minScore = 2, minPeptides = 1, - plotUpset = TRUE, exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list(Score = function(se) if ("Score" %in% colnames(rowData(se))) rowData(se)$Score >= 2 else rep(TRUE, nrow(se)), + Peptides = function(se) rowData(se)$Peptides >= 1, + Reverse = function(se) as.character(rowData(se)$Reverse) == "" | + is.na(rowData(se)$Reverse), + Contaminant = function(se) if ("Potential.contaminant" %in% colnames(rowData(se))) (as.character(rowData(se)$Potential.contaminant) == "" | + is.na(rowData(se)$Potential.contaminant)) else rep(TRUE, nrow(se)), + OnlySite = function(se) if ("Only.identified.by.site" %in% colnames(rowData(se))) (as.character(rowData(se)$Only.identified.by.site) == "" | + is.na(rowData(se)$Only.identified.by.site)) else rep(TRUE, nrow(se))), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_mq_final)$Score >= 2 & rowData(sce_mq_final)$Peptides >= 1 & @@ -159,95 +228,14 @@ test_that("filtering works (MaxQuant)", { }) test_that("filtering works (PD/TMT - proteins)", { - ## Fails with wrong argument specification - expect_error(filterPDTMT(sce = 1, inputLevel = "Proteins", minScore = 10, - minPeptides = 2, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'sce' must be of class 'SummarizedExperiment'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = 1, - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'inputLevel' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = c("Proteins", "PeptideGroups"), - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'inputLevel' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Nonsense", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "All values in 'inputLevel' must be one of") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = "10", minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'minScore' must be of class 'numeric'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = c(1, 2), minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'minScore' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = "2", - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'minPeptides' must be of class 'numeric'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = c(1, 2), - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL), - "'minPeptides' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = "TRUE", plotUpset = TRUE, - exclFile = NULL), - "'masterProteinsOnly' must be of class 'logical'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = c(TRUE, FALSE), plotUpset = TRUE, - exclFile = NULL), - "'masterProteinsOnly' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = 1), - "'plotUpset' must be of class 'logical'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = c(TRUE, FALSE), - exclFile = NULL), - "'plotUpset' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = 1), - "'exclFile' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_final, inputLevel = "Proteins", - minScore = 10, minPeptides = 2, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = c(tempfile(), tempfile())), - "'exclFile' must have length 1") - - ## Works with correct argument specification - out <- filterPDTMT(sce_pd_final, inputLevel = "Proteins", minScore = 10, - minPeptides = 5, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_final, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 5 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 & rowData(sce_pd_final)$Number.of.Peptides >= 5 & @@ -256,10 +244,13 @@ test_that("filtering works (PD/TMT - proteins)", { expect_equal(nrow(out), 23L) ## same test as above, just with precomputed answer ## Don't filter on minPeptides - out <- filterPDTMT(sce_pd_final, inputLevel = "Proteins", minScore = 10, - minPeptides = NULL, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_final, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 & rowData(sce_pd_final)$Contaminant == "False" @@ -267,10 +258,13 @@ test_that("filtering works (PD/TMT - proteins)", { expect_equal(nrow(out), 30L) ## same test as above, just with precomputed answer ## Don't filter on minScore - out <- filterPDTMT(sce_pd_final, inputLevel = "Proteins", minScore = NULL, - minPeptides = 5, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_final, + filtersSE = list( + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 5 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Number.of.Peptides >= 5 & rowData(sce_pd_final)$Contaminant == "False" @@ -278,10 +272,14 @@ test_that("filtering works (PD/TMT - proteins)", { expect_equal(nrow(out), 23L) ## same test as above, just with precomputed answer ## Don't filter on minScore, filter on master proteins - out <- filterPDTMT(sce_pd_final, inputLevel = "Proteins", minScore = NULL, - minPeptides = 5, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = TRUE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_final, + filtersSE = list( + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 5 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + Master = function(sce) if ("Master" %in% colnames(rowData(sce))) rowData(sce)$Master == "IsMasterProtein" & !is.na(rowData(sce)$Master) else rep(TRUE, nrow(sce)) + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Number.of.Peptides >= 5 & rowData(sce_pd_final)$Contaminant == "False" & @@ -290,10 +288,15 @@ test_that("filtering works (PD/TMT - proteins)", { expect_equal(nrow(out), 20L) ## same test as above, just with precomputed answer ## Only master proteins - out <- filterPDTMT(sce_pd_final, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = TRUE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_final, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 3 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + Master = function(sce) if ("Master" %in% colnames(rowData(sce))) rowData(sce)$Master == "IsMasterProtein" & !is.na(rowData(sce)$Master) else rep(TRUE, nrow(sce)) + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 & rowData(sce_pd_final)$Number.of.Peptides >= 3 & @@ -306,10 +309,14 @@ test_that("filtering works (PD/TMT - proteins)", { tfl <- tempfile(fileext = ".txt") tmp <- sce_pd_final rowData(tmp)$Score.Sequest.HT.Sequest.HT <- NULL - out <- filterPDTMT(tmp, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = FALSE, - exclFile = tfl) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 3 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = tfl) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Number.of.Peptides >= 3 & rowData(sce_pd_final)$Contaminant == "False" @@ -322,10 +329,14 @@ test_that("filtering works (PD/TMT - proteins)", { ## Missing columns - Number.of.Peptides tmp <- sce_pd_final rowData(tmp)$Number.of.Peptides <- NULL - out <- filterPDTMT(tmp, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 3 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 & rowData(sce_pd_final)$Contaminant == "False" @@ -336,10 +347,14 @@ test_that("filtering works (PD/TMT - proteins)", { tmp <- sce_pd_final rowData(tmp)$Number.of.Peptides <- NULL rowData(tmp)$Contaminant <- NULL - out <- filterPDTMT(tmp, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 5 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 ))) @@ -349,20 +364,29 @@ test_that("filtering works (PD/TMT - proteins)", { tmp <- sce_pd_final rowData(tmp)$Number.of.Peptides <- NULL rowData(tmp)$Score.Sequest.HT.Sequest.HT <- NULL - out <- filterPDTMT(tmp, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 5 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), nrow(tmp)) expect_equal(nrow(out), 70L) ## same test as above, just with precomputed answer ## Missing columns - Master tmp <- sce_pd_final rowData(tmp)$Master <- NULL - out <- filterPDTMT(tmp, inputLevel = "Proteins", minScore = 10, - minPeptides = 3, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = TRUE, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Score = function(sce) if ("Score.Sequest.HT.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Score.Sequest.HT.Sequest.HT >= 10 & !is.na(rowData(sce)$Score.Sequest.HT.Sequest.HT) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Number.of.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Number.of.Peptides >= 3 & !is.na(rowData(sce)$Number.of.Peptides) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + Master = function(sce) if ("Master" %in% colnames(rowData(sce))) rowData(sce)$Master == "IsMasterProtein" & !is.na(rowData(sce)$Master) else rep(TRUE, nrow(sce)) + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_final)$Score.Sequest.HT.Sequest.HT >= 10 & rowData(sce_pd_final)$Number.of.Peptides >= 3 & @@ -372,185 +396,14 @@ test_that("filtering works (PD/TMT - proteins)", { }) test_that("filtering works (PD/TMT - peptidegroups)", { - ## Fails with wrong argument specification - expect_error(filterPDTMT(sce = 1, inputLevel = "PeptideGroups", minScore = 10, - minPeptides = 2, minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'sce' must be of class 'SummarizedExperiment'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = 1, - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'inputLevel' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = c("Proteins", "PeptideGroups"), - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'inputLevel' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "Nonsense", - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "All values in 'inputLevel' must be one of") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = "10", minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'minDeltaScore' must be of class 'numeric'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = c(1, 2), minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'minDeltaScore' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = "2", - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'minPSMs' must be of class 'numeric'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = c(1, 2), - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'minPSMs' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = 1, - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'modificationsCol' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = c("Modifications", "Modifications"), - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'modificationsCol' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Nonsense", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "All values in 'modificationsCol' must be one of") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = 1, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'excludeUnmodifiedPeptides' must be of class 'logical'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = c(TRUE, FALSE), - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "'excludeUnmodifiedPeptides' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = 1, plotUpset = TRUE, - exclFile = NULL), - "'keepModifications' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 0, minPSMs = 1, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = c("mod1", "mod2"), plotUpset = TRUE, - exclFile = NULL), - "'keepModifications' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = 1, - exclFile = NULL), - "'plotUpset' must be of class 'logical'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = c(TRUE, FALSE), - exclFile = NULL), - "'plotUpset' must have length 1") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = 1), - "'exclFile' must be of class 'character'") - expect_error(filterPDTMT(sce = sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 1, - minDeltaScore = 10, minPSMs = 2, - masterProteinsOnly = FALSE, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = c(tempfile(), tempfile())), - "'exclFile' must have length 1") - - ## Works with correct argument specification - out <- filterPDTMT(sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = 2, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_peptide_initial, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + PSMs = function(sce) if ("Number.of.PSMs" %in% colnames(rowData(sce))) rowData(sce)$Number.of.PSMs >= 2 & !is.na(rowData(sce)$Number.of.PSMs) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(sce_pd_peptide_initial)$Number.of.PSMs >= 2 & @@ -559,26 +412,14 @@ test_that("filtering works (PD/TMT - peptidegroups)", { expect_equal(nrow(out), 4L) ## same test as above, just with precomputed answer ## Works with correct argument specification - out <- filterPDTMT(sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.5, minPSMs = 1, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL) - expect_equal(nrow(out), length(which( - rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.5 & - rowData(sce_pd_peptide_initial)$Number.of.PSMs >= 1 & - rowData(sce_pd_peptide_initial)$Contaminant == "False" - ))) - expect_equal(nrow(out), 20L) ## same test as above, just with precomputed answer - - ## Works with correct argument specification - with modificationsCol = NULL - out <- filterPDTMT(sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.5, minPSMs = 1, - masterProteinsOnly = FALSE, modificationsCol = NULL, - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_peptide_initial, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.5 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + PSMs = function(sce) if ("Number.of.PSMs" %in% colnames(rowData(sce))) rowData(sce)$Number.of.PSMs >= 1 & !is.na(rowData(sce)$Number.of.PSMs) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.5 & rowData(sce_pd_peptide_initial)$Number.of.PSMs >= 1 & @@ -587,12 +428,13 @@ test_that("filtering works (PD/TMT - peptidegroups)", { expect_equal(nrow(out), 20L) ## same test as above, just with precomputed answer ## Don't filter on Number.of.PSMs - out <- filterPDTMT(sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = NULL, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_peptide_initial, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(sce_pd_peptide_initial)$Contaminant == "False" @@ -600,12 +442,13 @@ test_that("filtering works (PD/TMT - peptidegroups)", { expect_equal(nrow(out), 62L) ## same test as above, just with precomputed answer ## Don't filter on delta score - out <- filterPDTMT(sce_pd_peptide_initial, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = NULL, minPSMs = 2, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + sce_pd_peptide_initial, + filtersSE = list( + PSMs = function(sce) if ("Number.of.PSMs" %in% colnames(rowData(sce))) rowData(sce)$Number.of.PSMs >= 2 & !is.na(rowData(sce)$Number.of.PSMs) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Number.of.PSMs >= 2 & rowData(sce_pd_peptide_initial)$Contaminant == "False" @@ -616,12 +459,14 @@ test_that("filtering works (PD/TMT - peptidegroups)", { tfl <- tempfile(fileext = ".txt") tmp <- sce_pd_peptide_initial rowData(tmp)$Number.of.PSMs <- NULL - out <- filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = 2, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = FALSE, - exclFile = tfl) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + PSMs = function(sce) if ("Number.of.PSMs" %in% colnames(rowData(sce))) rowData(sce)$Number.of.PSMs >= 2 & !is.na(rowData(sce)$Number.of.PSMs) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = tfl) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(sce_pd_peptide_initial)$Contaminant == "False" @@ -634,12 +479,14 @@ test_that("filtering works (PD/TMT - peptidegroups)", { ## Missing column - Contaminant tmp <- sce_pd_peptide_initial rowData(tmp)$Contaminant <- NULL - out <- filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = 2, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = FALSE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + PSMs = function(sce) if ("Number.of.PSMs" %in% colnames(rowData(sce))) rowData(sce)$Number.of.PSMs >= 2 & !is.na(rowData(sce)$Number.of.PSMs) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))} + ), + plotUpset = FALSE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_pd_peptide_initial)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(sce_pd_peptide_initial)$Number.of.PSMs >= 2 @@ -649,12 +496,14 @@ test_that("filtering works (PD/TMT - peptidegroups)", { ## Exclude unmodified peptides tmp <- sce_pd_peptide_initial rowData(tmp)$Modifications[c(1, 5, 10, 20)] <- "" - out <- filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = NULL, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = TRUE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + ExclUnmodified = function(sce) if ("Modifications" %in% colnames(rowData(sce))) rowData(sce)$Modifications != "" & !is.na(rowData(sce)$Modifications) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(tmp)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(tmp)$Contaminant == "False" & @@ -665,12 +514,15 @@ test_that("filtering works (PD/TMT - peptidegroups)", { ## Exclude unmodified peptides, keep only Carbamidomethyl modifications tmp <- sce_pd_peptide_initial rowData(tmp)$Modifications[c(1, 5, 10, 20)] <- "" - out <- filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = NULL, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = TRUE, - keepModifications = "Carbamidomethyl", plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + ExclUnmodified = function(sce) if ("Modifications" %in% colnames(rowData(sce))) rowData(sce)$Modifications != "" & !is.na(rowData(sce)$Modifications) else rep(TRUE, nrow(sce)), + KeepMods = function(sce) if ("Modifications" %in% colnames(rowData(sce))) grepl("Carbamidomethyl", rowData(sce)$Modifications) & !is.na(rowData(sce)$Modifications) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(tmp)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(tmp)$Contaminant == "False" & @@ -682,12 +534,15 @@ test_that("filtering works (PD/TMT - peptidegroups)", { ## Exclude unmodified peptides, keep only Carbamidomethyl or 1xTMTpro [K12] modifications tmp <- sce_pd_peptide_initial rowData(tmp)$Modifications[c(1, 5, 10, 20)] <- "" - out <- filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.1, minPSMs = NULL, - masterProteinsOnly = FALSE, modificationsCol = "Modifications", - excludeUnmodifiedPeptides = TRUE, - keepModifications = "Carbamidomethyl|1xTMTpro \\[K12\\]", plotUpset = TRUE, - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + DeltaScore = function(sce) if ("Delta.Score.by.Search.Engine.Sequest.HT" %in% colnames(rowData(sce))) rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & !is.na(rowData(sce)$Delta.Score.by.Search.Engine.Sequest.HT) else rep(TRUE, nrow(sce)), + Contaminant = function(sce) { if ("Contaminant" %in% colnames(rowData(sce))) { rowData(sce)$Contaminant <- as.character(rowData(sce)$Contaminant);rowData(sce)$Contaminant == "False" & !is.na(rowData(sce)$Contaminant) } else rep(TRUE, nrow(sce))}, + ExclUnmodified = function(sce) if ("Modifications" %in% colnames(rowData(sce))) rowData(sce)$Modifications != "" & !is.na(rowData(sce)$Modifications) else rep(TRUE, nrow(sce)), + KeepMods = function(sce) if ("Modifications" %in% colnames(rowData(sce))) grepl("Carbamidomethyl|1xTMTpro \\[K12\\]", rowData(sce)$Modifications) & !is.na(rowData(sce)$Modifications) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(tmp)$Delta.Score.by.Search.Engine.Sequest.HT >= 0.1 & rowData(tmp)$Contaminant == "False" & @@ -696,64 +551,19 @@ test_that("filtering works (PD/TMT - peptidegroups)", { grepl("1xTMTpro \\[K12\\]", rowData(tmp)$Modifications)) ))) expect_equal(nrow(out), 13L) ## same test as above, just with precomputed answer - - ## Fails if the Contaminant column has the wrong type of values (not True/False) - tmp <- sce_pd_peptide_initial - rowData(tmp)$Contaminant[rowData(tmp)$Contaminant == "True"] <- "Trrue" - expect_error(filterPDTMT(tmp, inputLevel = "PeptideGroups", - minScore = 0, minPeptides = 0, minDeltaScore = 0.5, minPSMs = 1, - modificationsCol = "Modifications", - excludeUnmodifiedPeptides = FALSE, - keepModifications = NULL, plotUpset = TRUE, - exclFile = NULL), - "Something went wrong in the filtering") }) test_that("filtering works (FragPipe)", { - ## Fails with wrong argument specification - expect_error(filterFragPipe(sce = 1, minPeptides = 2, - plotUpset = TRUE, - revPattern = "^rev_", exclFile = NULL), - "'sce' must be of class 'SummarizedExperiment'") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = "2", plotUpset = TRUE, - revPattern = "^rev_", exclFile = NULL), - "'minPeptides' must be of class 'numeric'") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = c(1, 2), plotUpset = TRUE, - revPattern = "^rev_", exclFile = NULL), - "'minPeptides' must have length 1") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = 1, - revPattern = "^rev_", exclFile = NULL), - "'plotUpset' must be of class 'logical'") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = c(TRUE, FALSE), - revPattern = "^rev_", exclFile = NULL), - "'plotUpset' must have length 1") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = TRUE, - revPattern = 1, exclFile = NULL), - "'revPattern' must be of class 'character'") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = TRUE, - revPattern = c("p1", "p2"), exclFile = NULL), - "'revPattern' must have length 1") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = TRUE, - revPattern = "^rev_", exclFile = 1), - "'exclFile' must be of class 'character'") - expect_error(filterFragPipe(sce = sce_fp_final, - minPeptides = 2, plotUpset = TRUE, - revPattern = "^rev_", - exclFile = c(tempfile(), tempfile())), - "'exclFile' must have length 1") - ## Works with correct argument specification tfl <- tempfile(fileext = ".txt") - out <- filterFragPipe(sce_fp_final, minPeptides = 3, - plotUpset = FALSE, revPattern = "^rev_", - exclFile = tfl) + out <- filterFeaturesSE( + sce_fp_final, + filtersSE = list( + Contaminant = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^contam_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Reverse = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^rev_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Combined.Total.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Combined.Total.Peptides >= 3 & !is.na(rowData(sce)$Combined.Total.Peptides) else rep(TRUE, nrow(sce)) + ), + plotUpset = FALSE, exclFile = tfl) expect_equal(nrow(out), length(which( rowData(sce_fp_final)$Combined.Total.Peptides >= 3 & !grepl("^rev_", rownames(sce_fp_final)) & @@ -764,9 +574,14 @@ test_that("filtering works (FragPipe)", { tmpin <- read.delim(tfl) expect_equal(nrow(tmpin), 150L - 87L) - out <- filterFragPipe(sce_fp_final, minPeptides = 1, - plotUpset = TRUE, revPattern = "^rev_", - exclFile = NULL) + out <- filterFeaturesSE( + sce_fp_final, + filtersSE = list( + Contaminant = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^contam_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Reverse = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^rev_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Combined.Total.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Combined.Total.Peptides >= 1 & !is.na(rowData(sce)$Combined.Total.Peptides) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( rowData(sce_fp_final)$Combined.Total.Peptides >= 1 & !grepl("^rev_", rownames(sce_fp_final)) & @@ -775,9 +590,13 @@ test_that("filtering works (FragPipe)", { expect_equal(nrow(out), 113L) ## Don't filter on minPeptides - out <- filterFragPipe(sce_fp_final, minPeptides = NULL, - plotUpset = TRUE, revPattern = "^rev_", - exclFile = NULL) + out <- filterFeaturesSE( + sce_fp_final, + filtersSE = list( + Contaminant = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^contam_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Reverse = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^rev_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( !grepl("^rev_", rownames(sce_fp_final)) & !grepl("^contam_", rownames(sce_fp_final)) @@ -787,12 +606,22 @@ test_that("filtering works (FragPipe)", { ## Missing columns - Combined.Total.Peptides tmp <- sce_fp_final rowData(tmp)$Combined.Total.Peptides <- NULL - out <- filterFragPipe(tmp, minPeptides = 3, - plotUpset = TRUE, revPattern = "^rev_", - exclFile = NULL) + out <- filterFeaturesSE( + tmp, + filtersSE = list( + Contaminant = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^contam_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Reverse = function(sce) if ("Protein" %in% colnames(rowData(sce))) !grepl("^rev_", rowData(sce)$Protein) & !is.na(rowData(sce)$Protein) else rep(TRUE, nrow(sce)), + Peptides = function(sce) if ("Combined.Total.Peptides" %in% colnames(rowData(sce))) rowData(sce)$Combined.Total.Peptides >= 3 & !is.na(rowData(sce)$Combined.Total.Peptides) else rep(TRUE, nrow(sce)) + ), + plotUpset = TRUE, exclFile = NULL) expect_equal(nrow(out), length(which( !grepl("^rev_", rownames(sce_fp_final)) & !grepl("^contam_", rownames(sce_fp_final)) ))) expect_equal(nrow(out), 113L) + + ## Empty filter list -> no filtering + out <- filterFeaturesSE(sce_fp_final, filtersSE = list(), plotUpset = TRUE, + exclFile = NULL) + expect_identical(sce_fp_final, out) }) diff --git a/tests/testthat/test-doImputation.R b/tests/testthat/test-doImputation.R index 4989e920..67910f2d 100644 --- a/tests/testthat/test-doImputation.R +++ b/tests/testthat/test-doImputation.R @@ -1,6 +1,7 @@ test_that("minProbGlobalFun works", { set.seed(123L) mat <- matrix(runif(70, min = 10, max = 15), nrow = 10) + mat0 <- mat missingpos <- cbind(row = c(1, 1, 1, 4, 6, 9), col = c(2, 3, 7, 1, 6, 7)) mat[missingpos] <- NA expect_equal(sum(is.na(mat)), nrow(missingpos)) @@ -30,6 +31,10 @@ test_that("minProbGlobalFun works", { multSigma = c(1, 2)), "'multSigma' must have length 1") + set.seed(1L) + out <- .minProbGlobalFun(mat0, lowQuantile = 0.01, multSigma = 1) + expect_identical(out, mat0) + set.seed(1L) out <- .minProbGlobalFun(mat, lowQuantile = 0.01, multSigma = 1) trueq <- stats::quantile(mat[!is.na(mat)], 0.01) @@ -45,51 +50,233 @@ test_that("minProbGlobalFun works", { expect_lte(abs(mean(imputed_values) - trueq), 0.06) }) +test_that("minProbGlobalOffsetFun works", { + set.seed(123L) + mat <- matrix(runif(70, min = 10, max = 15), nrow = 10) + mat0 <- mat + missingpos <- cbind(row = c(1, 1, 1, 4, 6, 9), col = c(2, 3, 7, 1, 6, 7)) + mat[missingpos] <- NA + expect_equal(sum(is.na(mat)), nrow(missingpos)) + for (i in seq_len(nrow(missingpos))) { + expect_equal(mat[missingpos[i, 1], missingpos[i, 2]], NA_real_) + } + + expect_error(.minProbGlobalOffsetFun(mat = 1, lowQuantile = 0.01, + multSigma = 1, constOffset = NULL, + relOffset = NULL), + "'mat' must be of class 'matrix'") + expect_error(.minProbGlobalOffsetFun(mat = data.frame(mat), lowQuantile = 0.01, + multSigma = 1, constOffset = NULL, + relOffset = NULL), + "'mat' must be of class 'matrix'") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 1, + multSigma = 1, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must be within") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = "0.5", + multSigma = 1, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must be of class 'numeric'") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = c(0.2, 0.3), + multSigma = 1, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must have length 1") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = "1", constOffset = NULL, + relOffset = NULL), + "'multSigma' must be of class 'numeric'") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = c(1, 2), constOffset = NULL, + relOffset = NULL), + "'multSigma' must have length 1") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, constOffset = "1", + relOffset = NULL), + "'constOffset' must be of class 'numeric'") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, constOffset = c(1, 2), + relOffset = NULL), + "'constOffset' must have length 1") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, constOffset = NULL, + relOffset = "1"), + "'relOffset' must be of class 'numeric'") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, constOffset = NULL, + relOffset = c(1, 2)), + "'relOffset' must have length 1") + expect_error(.minProbGlobalOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, constOffset = -0.1, + relOffset = -0.5), + "At most one of constOffset and relOffset can be specified") + + set.seed(1L) + out <- .minProbGlobalOffsetFun(mat0, lowQuantile = 0.01, multSigma = 1, + constOffset = -0.5, relOffset = NULL) + expect_identical(out, mat0) + + set.seed(1L) + out <- .minProbGlobalOffsetFun(mat, lowQuantile = 0.01, multSigma = 1, + constOffset = NULL, relOffset = NULL) + trueq <- stats::quantile(mat[!is.na(mat)], 0.01) + expect_equal(mat[!is.na(mat)], out[!is.na(mat)]) + imputed_values <- out[missingpos] + expect_lte(abs(mean(imputed_values) - trueq), 0.06) + + set.seed(1L) + out <- .minProbGlobalOffsetFun(mat, lowQuantile = 0.01, multSigma = 1, + constOffset = -0.4, relOffset = NULL) + trueq <- stats::quantile(mat[!is.na(mat)], 0.01) - 0.4 + expect_equal(mat[!is.na(mat)], out[!is.na(mat)]) + imputed_values <- out[missingpos] + expect_lte(abs(mean(imputed_values) - trueq), 0.06) + + set.seed(1L) + out <- .minProbGlobalOffsetFun(mat, lowQuantile = 0.2, multSigma = 1, + constOffset = NULL, relOffset = -0.4) + trueq <- stats::quantile(mat[!is.na(mat)], 0.2) - 0.4 * 1.552274 + expect_equal(mat[!is.na(mat)], out[!is.na(mat)]) + imputed_values <- out[missingpos] + expect_lte(abs(mean(imputed_values) - trueq), 0.06) +}) + +test_that("minProbOffsetFun works", { + set.seed(123L) + mat <- matrix(runif(70, min = 10, max = 15), nrow = 10) + mat0 <- mat + missingpos <- cbind(row = c(1, 1, 1, 4, 6, 9), col = c(2, 3, 7, 1, 6, 7)) + mat[missingpos] <- NA + expect_equal(sum(is.na(mat)), nrow(missingpos)) + for (i in seq_len(nrow(missingpos))) { + expect_equal(mat[missingpos[i, 1], missingpos[i, 2]], NA_real_) + } + + expect_error(.minProbOffsetFun(mat = 1, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = NULL), + "'mat' must be of class 'matrix'") + expect_error(.minProbOffsetFun(mat = data.frame(mat), lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = NULL), + "'mat' must be of class 'matrix'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 1, + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must be within") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = "0.5", + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must be of class 'numeric'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = c(0.2, 0.3), + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = NULL), + "'lowQuantile' must have length 1") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = "1", margin = 2L, constOffset = NULL, + relOffset = NULL), + "'multSigma' must be of class 'numeric'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = c(1, 2), margin = 2L, constOffset = NULL, + relOffset = NULL), + "'multSigma' must have length 1") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = "2", constOffset = NULL, + relOffset = NULL), + "'margin' must be of class 'numeric'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 3L, constOffset = NULL, + relOffset = NULL), + "'margin' must be one of") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = "1", + relOffset = NULL), + "'constOffset' must be of class 'numeric'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = c(1, 2), + relOffset = NULL), + "'constOffset' must have length 1") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = "1"), + "'relOffset' must be of class 'numeric'") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = NULL, + relOffset = c(1, 2)), + "'relOffset' must have length 1") + expect_error(.minProbOffsetFun(mat = mat, lowQuantile = 0.01, + multSigma = 1, margin = 2L, constOffset = -0.1, + relOffset = -0.5), + "At most one of constOffset and relOffset can be specified") + + set.seed(1L) + out <- .minProbOffsetFun(mat0, lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = 0.2) + expect_identical(out, mat0) + + set.seed(1L) + out <- .minProbOffsetFun(mat, lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = NULL) + set.seed(1L) + out2 <- MsCoreUtils::impute_MinProb(mat, q = 0.01, sigma = 1, MARGIN = 2L) + expect_equal(out, out2) + + set.seed(1L) + out <- .minProbOffsetFun(mat, lowQuantile = 0.01, multSigma = 1, + margin = 1L, constOffset = NULL, relOffset = NULL) + set.seed(1L) + out2 <- MsCoreUtils::impute_MinProb(mat, q = 0.01, sigma = 1, MARGIN = 1L) + expect_equal(out, out2) +}) + test_that("imputation works", { - expect_error(doImputation(sce = 1, method = "MinProb", assayName = "iBAQ", + expect_error(doImputation(sce = 1, imputeMethod = "MinProb", assayName = "iBAQ", imputedAssayName = "imputed"), "'sce' must be of class 'SummarizedExperiment'") - expect_error(doImputation(sce = sce_mq_preimputation, method = 1, + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = 1, assayName = "iBAQ", imputedAssayName = "imputed"), - "'method' must be of class 'character'") + "'imputeMethod' must be of class 'character'") expect_error(doImputation(sce = sce_mq_preimputation, - method = c("impSeqRob", "MinProb"), + imputeMethod = c("impSeqRob", "MinProb"), assayName = "iBAQ", imputedAssayName = "imputed"), - "'method' must have length 1") + "'imputeMethod' must have length 1") expect_error(doImputation(sce = sce_mq_preimputation, - method = c("missing"), + imputeMethod = c("missing"), assayName = "iBAQ", imputedAssayName = "imputed"), - "All values in 'method' must be one of") - expect_error(doImputation(sce = sce_mq_preimputation, method = "MinProb", + "All values in 'imputeMethod' must be one of") + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = 1, imputedAssayName = "imputed"), "'assayName' must be of class 'character'") - expect_error(doImputation(sce = sce_mq_preimputation, method = "MinProb", + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = c("iBAQ", "iBAQ"), imputedAssayName = "imputed"), "'assayName' must have length 1") - expect_error(doImputation(sce = sce_mq_preimputation, method = "MinProb", + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = "missing", imputedAssayName = "imputed"), "All values in 'assayName' must be one of") - expect_error(doImputation(sce = sce_mq_preimputation, method = "MinProb", + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = "iBAQ", imputedAssayName = 1), "'imputedAssayName' must be of class 'character'") - expect_error(doImputation(sce = sce_mq_preimputation, method = "MinProb", + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = "iBAQ", imputedAssayName = c("imputed", "imputed")), "'imputedAssayName' must have length 1") + expect_error(doImputation(sce = sce_mq_preimputation, imputeMethod = "custom", + assayName = "iBAQ", + imputedAssayName = "imputed", FUN = "1"), + "Please specify an imputation method") expect_true(sum(is.na(SummarizedExperiment::assay(sce_mq_preimputation, "iBAQ"))) == 507) ## MinProb set.seed(42L) - impout <- doImputation(sce = sce_mq_preimputation, method = "MinProb", + impout <- doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProb", assayName = "log2_iBAQ_withNA", imputedAssayName = "imputedAssay") expect_s4_class(impout, "SummarizedExperiment") @@ -113,12 +300,121 @@ test_that("imputation works", { expect_lte(abs(mean(imputed_values) - stats::quantile(observed_values, 0.01)) / stats::quantile(observed_values, 0.01), 0.025) } + set.seed(42L) + impout2 <- doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProbOffset", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = NULL) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout2, "imputedAssay")) + # with constant offset + set.seed(42L) + impout2 <- doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProbOffset", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = -0.5, relOffset = NULL) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout2, "imputedAssay") + + 0.5 * is.na(SummarizedExperiment::assay(impout2, "log2_iBAQ_withNA"))) + # with relative offset + set.seed(42L) + impout2 <- doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProbOffset", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + lowQuantile = 0.01, multSigma = 1, + margin = 2L, constOffset = NULL, relOffset = -1) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout2, "imputedAssay") + + 1.159449 * is.na(SummarizedExperiment::assay(impout2, "log2_iBAQ_withNA")), + tolerance = 1e-5) + + ## MinProb, by row + # ... first make sure that there are no features with all NA values (removes 5 rows) + tmp <- sce_mq_preimputation[rowSums(!is.na(SummarizedExperiment::assay(sce_mq_preimputation))) > 0, ] + set.seed(42L) + impout <- doImputation(sce = tmp, imputeMethod = "MinProb", + assayName = "log2_iBAQ_withNA", MARGIN = 1L, + imputedAssayName = "imputedAssay", sigma = 0.25) + expect_s4_class(impout, "SummarizedExperiment") + expect_true("imputedAssay" %in% SummarizedExperiment::assayNames(impout)) + expect_true(sum(is.na(SummarizedExperiment::assay(impout, + "log2_iBAQ_withNA"))) == 507 - 5 * 9) + expect_true(all(!is.na(SummarizedExperiment::assay(impout, + "imputedAssay")))) + expect_equal(SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"), + SummarizedExperiment::assay(tmp, "log2_iBAQ_withNA")) + expect_equal(SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[!is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))], + SummarizedExperiment::assay(impout, "imputedAssay")[!is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))]) + for (i in seq_len(145)) { + imputed_values <- SummarizedExperiment::assay(impout, "imputedAssay")[i, is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[i, ])] + if (length(imputed_values) > 0) { + observed_values <- SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[i, !is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[i, ])] + ## Relative error should be less than 10% + expect_lte(abs(mean(imputed_values) - stats::quantile(observed_values, 0.01)) / + stats::quantile(observed_values, 0.01), 0.1) + } + } + set.seed(42L) + impout2 <- doImputation(sce = tmp, imputeMethod = "MinProbOffset", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + lowQuantile = 0.01, multSigma = 0.25, + margin = 1L, constOffset = NULL, relOffset = NULL) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout2, "imputedAssay")) + set.seed(42L) + impout3 <- doImputation(sce = tmp, imputeMethod = "custom", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + FUN = einprot:::.minProbOffsetFun, + lowQuantile = 0.01, multSigma = 0.25, + margin = 1L, constOffset = NULL, relOffset = NULL) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout3, "imputedAssay")) ## MinProbGlobal set.seed(42L) - impout <- doImputation(sce = sce_mq_preimputation, method = "MinProbGlobal", + impout <- doImputation(sce = sce_mq_preimputation, imputeMethod = "MinProbGlobal", assayName = "log2_iBAQ_withNA", - imputedAssayName = "imputedAssay") + imputedAssayName = "imputedAssay", lowQuantile = 0.05) + expect_s4_class(impout, "SummarizedExperiment") + expect_true("imputedAssay" %in% SummarizedExperiment::assayNames(impout)) + expect_true(sum(is.na(SummarizedExperiment::assay(impout, + "log2_iBAQ_withNA"))) == 507) + expect_true(all(!is.na(SummarizedExperiment::assay(impout, + "imputedAssay")))) + expect_equal(SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"), + SummarizedExperiment::assay(sce_mq_preimputation, "log2_iBAQ_withNA")) + expect_equal(SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[!is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))], + SummarizedExperiment::assay(impout, "imputedAssay")[!is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))]) + imputed_values <- SummarizedExperiment::assay(impout, "imputedAssay")[is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))] + observed_values <- SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[!is.na( + SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))] + expect_lte(abs(mean(imputed_values) - stats::quantile(observed_values, 0.05)) / + stats::quantile(observed_values, 0.05), 0.01) + set.seed(42L) + impout2 <- doImputation(sce = sce_mq_preimputation, imputeMethod = "custom", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + FUN = einprot:::.minProbGlobalFun, lowQuantile = 0.05) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay"), + SummarizedExperiment::assay(impout2, "imputedAssay")) + + ## MinProbGlobalOffset + set.seed(42L) + impout <- doImputation(sce = sce_mq_preimputation, + imputeMethod = "MinProbGlobalOffset", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", constOffset = -0.5) expect_s4_class(impout, "SummarizedExperiment") expect_true("imputedAssay" %in% SummarizedExperiment::assayNames(impout)) expect_true(sum(is.na(SummarizedExperiment::assay(impout, @@ -136,10 +432,19 @@ test_that("imputation works", { observed_values <- SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")[!is.na( SummarizedExperiment::assay(impout, "log2_iBAQ_withNA"))] expect_lte(abs(mean(imputed_values) - stats::quantile(observed_values, 0.01)) / - stats::quantile(observed_values, 0.01), 0.01) + stats::quantile(observed_values, 0.01) - 0.5, 0.01) + set.seed(42L) + impout2 <- doImputation(sce = sce_mq_preimputation, imputeMethod = "custom", + assayName = "log2_iBAQ_withNA", + imputedAssayName = "imputedAssay", + FUN = einprot:::.minProbGlobalOffsetFun, + lowQuantile = 0.01, constOffset = -0.7) + expect_equal(SummarizedExperiment::assay(impout, "imputedAssay") - + 0.2 * is.na(SummarizedExperiment::assay(impout, "log2_iBAQ_withNA")), + SummarizedExperiment::assay(impout2, "imputedAssay")) ## impSeqRob - impout <- doImputation(sce = sce_mq_preimputation, method = "impSeqRob", + impout <- doImputation(sce = sce_mq_preimputation, imputeMethod = "impSeqRob", assayName = "iBAQ", imputedAssayName = "imputedAssay2") expect_s4_class(impout, "SummarizedExperiment") diff --git a/tests/testthat/test-doNormalization.R b/tests/testthat/test-doNormalization.R index c203cb6c..64d6918b 100644 --- a/tests/testthat/test-doNormalization.R +++ b/tests/testthat/test-doNormalization.R @@ -16,7 +16,7 @@ test_that("normalization works", { spikeFeatures = NULL), "'method' must have length 1") expect_error(doNormalization(sce = sce_mq_preimputation, - method = c("missing"), + method = "missing", assayName = "iBAQ", normalizedAssayName = "normalized", spikeFeatures = NULL), @@ -77,6 +77,68 @@ test_that("normalization works", { na.rm = TRUE), rep(0L, ncol(normout)), ignore_attr = TRUE) + ## diff.median + normout <- doNormalization(sce = sce_mq_preimputation, + method = "diff.median", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL) + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + expect_equal(apply(assay(normout, "normalizedAssay"), 2, stats::median, + na.rm = TRUE), + rep(stats::median(assay(normout, "iBAQ"), na.rm = TRUE), ncol(normout)), + ignore_attr = TRUE) + + ## center.median.shared + normout <- doNormalization(sce = sce_mq_preimputation, + method = "center.median.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL) + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + shared <- which(rowSums(is.na(SummarizedExperiment::assay(normout, "iBAQ"))) == 0) + expect_equal(apply(assay(normout, "normalizedAssay")[shared, ], 2, stats::median, + na.rm = TRUE), rep(0L, ncol(normout)), + ignore_attr = TRUE) + + ## diff.median.shared + normout <- doNormalization(sce = sce_mq_preimputation, + method = "diff.median.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL) + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + shared <- which(rowSums(is.na(SummarizedExperiment::assay(normout, "iBAQ"))) == 0) + expect_equal(apply(assay(normout, "normalizedAssay")[shared, ], 2, stats::median, + na.rm = TRUE), + rep(stats::median(apply(assay(normout, "iBAQ")[shared, ], 2, stats::median, + na.rm = TRUE)), ncol(normout)), + ignore_attr = TRUE) + + ## center.median.shared, no shared features + notshared <- which(rowSums(is.na(SummarizedExperiment::assay(sce_mq_preimputation, "iBAQ"))) != 0) + expect_error(doNormalization(sce = sce_mq_preimputation[notshared, ], + method = "center.median.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL), + "No features observed in all samples") + ## center.mean normout <- doNormalization(sce = sce_mq_preimputation, method = "center.mean", @@ -93,6 +155,51 @@ test_that("normalization works", { na.rm = TRUE), rep(0L, ncol(normout)), ignore_attr = TRUE, tolerance = 1e-5) + ## center.mean.shared + normout <- doNormalization(sce = sce_mq_preimputation, + method = "center.mean.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL) + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + shared <- which(rowSums(is.na(SummarizedExperiment::assay(normout, "iBAQ"))) == 0) + expect_equal(apply(assay(normout, "normalizedAssay")[shared, ], 2, mean, + na.rm = TRUE), rep(0L, ncol(normout)), + ignore_attr = TRUE, tolerance = 1e-7) + + ## diff.mean.shared + normout <- doNormalization(sce = sce_mq_preimputation, + method = "diff.mean.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL) + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + shared <- which(rowSums(is.na(SummarizedExperiment::assay(normout, "iBAQ"))) == 0) + expect_equal(apply(assay(normout, "normalizedAssay")[shared, ], 2, mean, + na.rm = TRUE), + rep(mean(apply(assay(normout, "iBAQ")[shared, ], 2, mean, + na.rm = TRUE)), ncol(normout)), + ignore_attr = TRUE) + + ## center.mean.shared, no shared features + notshared <- which(rowSums(is.na(SummarizedExperiment::assay(sce_mq_preimputation, "iBAQ"))) != 0) + expect_error(doNormalization(sce = sce_mq_preimputation[notshared, ], + method = "center.mean.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = NULL), + "No features observed in all samples") + ## div.mean normout <- doNormalization(sce = sce_mq_preimputation, method = "div.mean", @@ -169,6 +276,30 @@ test_that("normalization works", { na.rm = TRUE) expect_true(max(spikeMeans) - min(spikeMeans) < 1e-8) + ## spike-in features, center.mean, all features + spikes <- rownames(sce_mq_preimputation) + expect_message({ + normout <- doNormalization(sce = sce_mq_preimputation, + method = "center.mean", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay", + spikeFeatures = spikes) + }, "47/150 spike features found with no missing values") + expect_s4_class(normout, "SummarizedExperiment") + expect_true("normalizedAssay" %in% SummarizedExperiment::assayNames(normout)) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "iBAQ"))) == 507) + expect_true(sum(is.na(SummarizedExperiment::assay(normout, + "normalizedAssay"))) == 507) + # should give the same results as diff.mean.shared normalization (use all + # shared features, add back global mean) + normout2 <- doNormalization(sce = sce_mq_preimputation, + method = "diff.mean.shared", + assayName = "iBAQ", + normalizedAssayName = "normalizedAssay") + expect_equal(assay(normout, "normalizedAssay"), + assay(normout2, "normalizedAssay")) + ## spike-in features, no features without missing values spikes <- rownames(sce_mq_preimputation)[c(1, 2, 124)] expect_warning({ diff --git a/tests/testthat/test-importDIANN.R b/tests/testthat/test-importDIANN.R index 2aeb01ac..37e04db0 100644 --- a/tests/testthat/test-importDIANN.R +++ b/tests/testthat/test-importDIANN.R @@ -10,9 +10,9 @@ test_that("DIANN import works", { ## ------------------------------------------------------------------------- expect_error(importDIANN(inFile = 1), "'inFile' must be of class 'character'") - expect_error(importExperiment(inFile = c(pgmat, prmat)), + expect_error(importDIANN(inFile = c(pgmat, prmat)), "'inFile' must have length 1") - expect_error(importExperiment(inFile = "missing"), + expect_error(importDIANN(inFile = "missing"), "file.exists(inFile) is not TRUE", fixed = TRUE) expect_error(importDIANN(inFile = pgmat, fileType = 1), @@ -136,7 +136,7 @@ test_that("DIANN import works", { expect_equal(sort(rownames(out$sce)), sort(unique(maintmp$Protein.Group))) expect_equal(SummarizedExperiment::assayNames(out$sce), c("PG.MaxLFQ", "PG.Quantity", "PG.Normalised", "PG.Q.Value", - "Global.PG.Q.Value", "Lib.PG.Q.Value", "Protein.Ids")) + "Protein.Ids", "Protein.Names", "Genes")) ## Manual checks aNames <- SummarizedExperiment::assayNames(out$sce) @@ -151,9 +151,13 @@ test_that("DIANN import works", { sub2, ignore_attr = TRUE) } - infoCols <- c("Protein.Group") - expect_true(all(infoCols %in% - colnames(SummarizedExperiment::rowData(out$sce)))) + infoCols <- c("Protein.Group", "Genes", "Protein.Names", "Protein.Ids") + rd <- SummarizedExperiment::rowData(out$sce) + expect_true(all(infoCols %in% colnames(rd))) + expect_identical(unname(rd$Genes[rd$Protein.Group == "O60716"]), "CTNND1") + expect_identical(unname(rd$Protein.Ids[rd$Protein.Group == "O60716"]), + "O60716;A0A669KB05;A0A669KB62;C9JZR2;A0A804HIL4;A0A804HK15;H0YC95") + expect_identical(unname(rd$Protein.Names[rd$Protein.Group == "O60716"]), "CTND1_HUMAN") expect_false(any(grepl("scratch", colnames(out$sce)))) expect_false(any(grepl("mzML", colnames(out$sce)))) @@ -239,7 +243,7 @@ test_that("DIANN import works", { expect_equal(sort(rownames(out$sce)), sort(unique(maintmp$Protein.Group[grep("Condition_A", maintmp$Run)]))) expect_equal(SummarizedExperiment::assayNames(out$sce), c("PG.MaxLFQ", "PG.Quantity", "PG.Normalised", "PG.Q.Value", - "Global.PG.Q.Value", "Lib.PG.Q.Value", "Protein.Ids")) + "Protein.Ids", "Protein.Names", "Genes")) ## Manual checks aNames <- SummarizedExperiment::assayNames(out$sce) @@ -260,4 +264,40 @@ test_that("DIANN import works", { expect_false(any(grepl("scratch", colnames(out$sce)))) expect_false(any(grepl("mzML", colnames(out$sce)))) + ## ------------------------------------------------------------------------- + ## Specifying samples to include, and filtering - main_report/pg + ## ------------------------------------------------------------------------- + out <- importDIANN(inFile = mainrep, fileType = "main_report", + outLevel = "pg", filtersDF = einprotDIANNFiltersDF, + includeOnlySamples = "Condition_A", excludeSamples = "", + stopIfEmpty = FALSE, aName = "PG.MaxLFQ") + expect_type(out, "list") + expect_named(out, c("sce", "aName")) + expect_equal(out$aName, "PG.MaxLFQ") + expect_equal(nrow(out$sce), 3L) ## length(unique(maintmp$Protein.Group[grep("Condition_A", maintmp$Run)])) + expect_equal(ncol(out$sce), 3L) + expect_s4_class(out$sce, "SingleCellExperiment") + expect_equal(sort(rownames(out$sce)), c("P0A7J3", "P25694", "Q9NVA2")) + expect_equal(SummarizedExperiment::assayNames(out$sce), + c("PG.MaxLFQ", "PG.Quantity", "PG.Normalised", "PG.Q.Value", + "Protein.Ids", "Protein.Names", "Genes")) + + ## Manual checks + aNames <- SummarizedExperiment::assayNames(out$sce) + sub1 <- subset(maintmp, Run == "LFQ_Orbitrap_AIF_Condition_A_Sample_Beta_01") + for (an in aNames) { + sub2 <- sub1[match(c("P0A7J3"), + sub1$Protein.Group), an] + sub2[is.na(sub2)] <- 0 + expect_equal(SummarizedExperiment::assay( + out$sce, an)[c("P0A7J3"), + "LFQ_Orbitrap_AIF_Condition_A_Sample_Beta_01"], + sub2, ignore_attr = TRUE) + } + + infoCols <- c("Protein.Group") + expect_true(all(infoCols %in% + colnames(SummarizedExperiment::rowData(out$sce)))) + expect_false(any(grepl("scratch", colnames(out$sce)))) + expect_false(any(grepl("mzML", colnames(out$sce)))) }) diff --git a/tests/testthat/test-importSpectronaut.R b/tests/testthat/test-importSpectronaut.R new file mode 100644 index 00000000..ab33f521 --- /dev/null +++ b/tests/testthat/test-importSpectronaut.R @@ -0,0 +1,158 @@ +test_that("Spectronaut import works", { + pgpivot <- system.file("extdata", "spectronaut_example", + "SN_unit_test_subset.tsv", + package = "einprot") + + ## Fails with wrong arguments + ## ------------------------------------------------------------------------- + expect_error(importSpectronaut(inFile = 1), + "'inFile' must be of class 'character'") + expect_error(importSpectronaut(inFile = c(pgpivot, pgpivot)), + "'inFile' must have length 1") + expect_error(importSpectronaut(inFile = "missing"), + "file.exists(inFile) is not TRUE", fixed = TRUE) + + expect_error(importSpectronaut(inFile = pgpivot, fileType = 1), + "'fileType' must be of class 'character'") + expect_error(importSpectronaut(inFile = pgpivot, fileType = c("long_format", "pg_pivot")), + "'fileType' must have length 1") + expect_error(importSpectronaut(inFile = pgpivot, fileType = "missing"), + "values in 'fileType' must be one of") + + expect_error(importSpectronaut(inFile = pgpivot, outLevel = 1), + "'outLevel' must be of class 'character'") + expect_error(importSpectronaut(inFile = pgpivot, outLevel = c("pg", "pg")), + "'outLevel' must have length 1") + expect_error(importSpectronaut(inFile = pgpivot, outLevel = "missing"), + "values in 'outLevel' must be one of") + + expect_error(importSpectronaut(inFile = pgpivot, outLevel = "pg", + iColPattern = 1), + "'iColPattern' must be of class 'character'") + expect_error(importSpectronaut(inFile = pgpivot, outLevel = "pg", + iColPattern = c(".PG.Quantity$", ".PG.Quantity$")), + "'iColPattern' must have length 1") + expect_error(importSpectronaut(inFile = pgpivot, outLevel = "pg", + iColPattern = "missing"), + "Invalid iColPattern") + + expect_error(importSpectronaut(inFile = pgpivot, includeOnlySamples = 1), + "'includeOnlySamples' must be of class 'character'") + expect_error(importSpectronaut(inFile = pgpivot, excludeSamples = 1), + "'excludeSamples' must be of class 'character'") + expect_error(importSpectronaut(inFile = pgpivot, includeOnlySamples = "s1", + excludeSamples = "s2"), + "Please specify max one of includeOnlySamples and exclude") + + expect_error(importSpectronaut(inFile = pgpivot, stopIfEmpty = 1), + "'stopIfEmpty' must be of class 'logical'") + expect_error(importSpectronaut(inFile = pgpivot, stopIfEmpty = c(TRUE, FALSE)), + "'stopIfEmpty' must have length 1") + + expect_error(importSpectronaut(inFile = pgpivot, fileType = "pg_pivot", + outLevel = "pg", filtersDF = 1), + "'filtersDF' must be of class 'list'") + + ## Extract some values to compare to later + pgtmp <- read.delim(pgpivot, sep = "\t", nrow = 20) + + ## Works with correct arguments + ## ------------------------------------------------------------------------- + ## Without specifying samples to include/exclude - pg_pivot + ## ------------------------------------------------------------------------- + out <- importSpectronaut(inFile = pgpivot, fileType = "pg_pivot", + outLevel = "pg", iColPattern = ".PG.Quantity$", + includeOnlySamples = "", excludeSamples = "", + stopIfEmpty = FALSE, aName = "PG.Quantity", + filtersDF = list(), nrows = 20) + expect_type(out, "list") + expect_named(out, c("sce", "aName")) + expect_equal(out$aName, "PG.Quantity") + expect_equal(nrow(out$sce), 20) + expect_equal(ncol(out$sce), 6L) + expect_s4_class(out$sce, "SingleCellExperiment") + expect_equal(rownames(out$sce), as.character(seq_len(20))) + expect_equal(SummarizedExperiment::assayNames(out$sce), + c("PG.Quantity", "PG.IsSingleHit", + "PG.NrOfPrecursorsUsedForQuantification", + "PG.MS1Quantity", "PG.IBAQ", "PG.Cscore..Run.Wise.", + "PG.QValue..Run.Wise.", "PG.RunEvidenceCount")) + expect_equal(SummarizedExperiment::assay( + out$sce, "PG.Quantity")[, "LFQ_24min_500ng_2Th_3ms_A_02"], + pgtmp[, "X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.Quantity"], ignore_attr = TRUE) + infoCols <- c("PG.Qvalue", "PG.Cscore", "PG.ProteinGroups", "PG.Genes", + "PG.ProteinDescriptions", + "PG.Completeness", "PG.CV") + expect_true(all(infoCols %in% + colnames(SummarizedExperiment::rowData(out$sce)))) + for (ic in infoCols) { + expect_equal(SummarizedExperiment::rowData(out$sce)[, ic], + pgtmp[, ic]) + } + + ## ------------------------------------------------------------------------- + ## Specifying samples to include - pg_pivot + ## ------------------------------------------------------------------------- + out <- importSpectronaut(inFile = pgpivot, fileType = "pg_pivot", + outLevel = "pg", iColPattern = ".PG.Quantity$", + includeOnlySamples = "_A_", excludeSamples = "", + stopIfEmpty = FALSE, aName = "PG.Quantity", + filtersDF = list(), nrows = 20) + expect_type(out, "list") + expect_named(out, c("sce", "aName")) + expect_equal(out$aName, "PG.Quantity") + expect_equal(nrow(out$sce), 20) + expect_equal(ncol(out$sce), 3L) + expect_s4_class(out$sce, "SingleCellExperiment") + expect_equal(rownames(out$sce), as.character(seq_len(20))) + expect_equal(SummarizedExperiment::assayNames(out$sce), + c("PG.Quantity", "PG.IsSingleHit", + "PG.NrOfPrecursorsUsedForQuantification", + "PG.MS1Quantity", "PG.IBAQ", "PG.Cscore..Run.Wise.", + "PG.QValue..Run.Wise.", "PG.RunEvidenceCount")) + expect_equal(SummarizedExperiment::assay( + out$sce, "PG.Quantity")[, "LFQ_24min_500ng_2Th_3ms_A_02"], + pgtmp[, "X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.Quantity"], ignore_attr = TRUE) + infoCols <- c("PG.Qvalue", "PG.Cscore", "PG.ProteinGroups", "PG.Genes", + "PG.ProteinDescriptions", + "PG.Completeness", "PG.CV") + expect_true(all(infoCols %in% + colnames(SummarizedExperiment::rowData(out$sce)))) + for (ic in infoCols) { + expect_equal(SummarizedExperiment::rowData(out$sce)[, ic], + pgtmp[, ic]) + } + + ## ------------------------------------------------------------------------- + ## Specifying samples to exclude - pg_pivot + ## ------------------------------------------------------------------------- + out <- importSpectronaut(inFile = pgpivot, fileType = "pg_pivot", + outLevel = "pg", iColPattern = ".PG.Quantity$", + includeOnlySamples = "", excludeSamples = "_B_", + stopIfEmpty = FALSE, aName = "PG.Quantity", + filtersDF = list(), nrows = 20) + expect_type(out, "list") + expect_named(out, c("sce", "aName")) + expect_equal(out$aName, "PG.Quantity") + expect_equal(nrow(out$sce), 20) + expect_equal(ncol(out$sce), 3L) + expect_s4_class(out$sce, "SingleCellExperiment") + expect_equal(rownames(out$sce), as.character(seq_len(20))) + expect_equal(SummarizedExperiment::assayNames(out$sce), + c("PG.Quantity", "PG.IsSingleHit", + "PG.NrOfPrecursorsUsedForQuantification", + "PG.MS1Quantity", "PG.IBAQ", "PG.Cscore..Run.Wise.", + "PG.QValue..Run.Wise.", "PG.RunEvidenceCount")) + expect_equal(SummarizedExperiment::assay( + out$sce, "PG.Quantity")[, "LFQ_24min_500ng_2Th_3ms_A_02"], + pgtmp[, "X.2..LFQ_24min_500ng_2Th_3ms_A_02.raw.PG.Quantity"], ignore_attr = TRUE) + infoCols <- c("PG.Qvalue", "PG.Cscore", "PG.ProteinGroups", "PG.Genes", + "PG.ProteinDescriptions", + "PG.Completeness", "PG.CV") + expect_true(all(infoCols %in% + colnames(SummarizedExperiment::rowData(out$sce)))) + for (ic in infoCols) { + expect_equal(SummarizedExperiment::rowData(out$sce)[, ic], + pgtmp[, ic]) + } +}) diff --git a/tests/testthat/test-makeAbundanceHeatmap.R b/tests/testthat/test-makeAbundanceHeatmap.R index 2797c0a7..c191afc5 100644 --- a/tests/testthat/test-makeAbundanceHeatmap.R +++ b/tests/testthat/test-makeAbundanceHeatmap.R @@ -26,6 +26,14 @@ test_that("makeAbundanceHeatmap works", { expect_error(makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", doCenter = FALSE, settings = "missing"), "All values in 'settings' must be one of") + expect_error(makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", + doCenter = FALSE, settings = "report", + clusterRows = 1), + "'clusterRows' must be of class 'logical'") + expect_error(makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", + doCenter = FALSE, settings = "report", + clusterRows = c(TRUE, FALSE)), + "'clusterRows' must have length 1") ## settings = 'report' ht <- makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", @@ -36,6 +44,16 @@ test_that("makeAbundanceHeatmap works", { expect_equal(ht@row_names_param$labels, rownames(sce_mq_final)) expect_equal(ht@row_names_param$show, FALSE) + ## ... clusterRows = FALSE + ht <- makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", + doCenter = FALSE, settings = "report", + clusterRows = FALSE) + expect_s4_class(ht, "Heatmap") + expect_equal(ht@name, "log2_iBAQ") + expect_equal(dim(ht@matrix), dim(sce_mq_final)) + expect_equal(ht@row_names_param$labels, rownames(sce_mq_final)) + expect_equal(ht@row_names_param$show, FALSE) + ## settings = 'export' ht <- makeAbundanceHeatmap(sce = sce_mq_final, assayToPlot = "log2_iBAQ", doCenter = TRUE, settings = "export") diff --git a/tests/testthat/test-makeComplexDB.R b/tests/testthat/test-makeComplexDB.R index c2f44b16..054b1a96 100644 --- a/tests/testthat/test-makeComplexDB.R +++ b/tests/testthat/test-makeComplexDB.R @@ -330,7 +330,8 @@ test_that("makeComplexDB works", { Source = "Custom") write.table(custom, file = custompath2, col.names = TRUE, row.names = FALSE, quote = FALSE, sep = "\t") - dbs <- makeComplexDB(dbDir = dbdir, customComplexTxt = custompath2, + dbs <- makeComplexDB(dbDir = file.path(dbdir, "newdir"), + customComplexTxt = custompath2, Cyc2008Db = cyc2008db, CorumDb = corumdb, PombaseDb = pombasedb, HuMAP2Db = humap2db, CPortal9606Db = cportal9606db, diff --git a/tests/testthat/test-plotMissingValues.R b/tests/testthat/test-plotMissingValues.R index 9692e7ee..10c0cfc1 100644 --- a/tests/testthat/test-plotMissingValues.R +++ b/tests/testthat/test-plotMissingValues.R @@ -51,6 +51,17 @@ test_that("missing value plots work", { expect_equal(out@column_title, "Missing value pattern (white = missing)") expect_equal(out@name, "imputed") + out <- plotMissingValuesHeatmap(sce = sce_mq_preimputation, + assayMissing = "imputed_iBAQ", + onlyRowsWithMissing = FALSE, + settings = "sorted") + expect_s4_class(out, "Heatmap") + expect_length(out@column_names_param$labels, 9L) + expect_true(out@column_names_param$show) + expect_length(out@row_names_param$labels, 150L) + expect_equal(out@column_title, "Missing value pattern (white = missing)") + expect_equal(out@name, "imputed") + out <- plotMissingValuesHeatmap(sce = sce_mq_preimputation, assayMissing = "imputed_iBAQ", onlyRowsWithMissing = FALSE, @@ -99,18 +110,58 @@ test_that("missing value plots work", { dfNA = dfNA), 'all(c("sample", "pNA") %in% colnames(dfNA)) is not TRUE', fixed = TRUE) + dfNA <- as.data.frame(nbr_na_mq$nNAcols) %>% + dplyr::rename(sample = name) + expect_error(plotFractionDetectedPerSample( + dfNA = dfNA, valueType = 1 + ), "'valueType' must be of class 'character'") + expect_error(plotFractionDetectedPerSample( + dfNA = dfNA, valueType = c("fraction", "percentage") + ), "'valueType' must have length 1") + expect_error(plotFractionDetectedPerSample( + dfNA = dfNA, valueType = "error" + ), "'valueType' must be one of") + dfNA$pNA <- 1 + dfNA$pNA + expect_error(plotFractionDetectedPerSample( + dfNA = dfNA, valueType = "fraction" + ), "'$dfNApNA' must be within", fixed = TRUE) + dfNA$pNA <- 99 + dfNA$pNA + expect_error(plotFractionDetectedPerSample( + dfNA = dfNA, valueType = "percentage" + ), "'$dfNApNA' must be within", fixed = TRUE) - out <- plotFractionDetectedPerSample( - dfNA = as.data.frame(nbr_na_mq$nNAcols) %>% - dplyr::rename(sample = name)) + expect_message( + out <- plotFractionDetectedPerSample( + dfNA = as.data.frame(nbr_na_mq$nNAcols) %>% + dplyr::rename(sample = name)), + "Inferred valueType: fraction") expect_s3_class(out, "ggplot") expect_named(out$data, c("sample", "nNA", "pNA", "assay")) - out <- plotFractionDetectedPerSample( + out2 <- plotFractionDetectedPerSample( dfNA = DataFrame(as.data.frame(nbr_na_mq$nNAcols) %>% - dplyr::rename(sample = name))) - expect_s3_class(out, "ggplot") - expect_named(out$data, c("sample", "nNA", "pNA", "assay")) + dplyr::rename(sample = name)), + valueType = "fraction") + expect_s3_class(out2, "ggplot") + expect_named(out2$data, c("sample", "nNA", "pNA", "assay")) + expect_identical(out$data, out2$data) + + expect_message( + out3 <- plotFractionDetectedPerSample( + dfNA = DataFrame(as.data.frame(nbr_na_mq$nNAcols) %>% + dplyr::rename(sample = name) %>% + dplyr::mutate(pNA = 100 * pNA))), + "Inferred valueType: percentage") + expect_s3_class(out3, "ggplot") + expect_named(out3$data, c("sample", "nNA", "pNA", "assay")) + + out4 <- plotFractionDetectedPerSample( + dfNA = DataFrame(as.data.frame(nbr_na_mq$nNAcols) %>% + dplyr::rename(sample = name) %>% + dplyr::mutate(pNA = 100 * pNA)), + valueType = "percentage") + expect_s3_class(out4, "ggplot") + expect_named(out4$data, c("sample", "nNA", "pNA", "assay")) ## ------------------------------------------------------------------------- ## plotDetectedInSamples @@ -125,8 +176,29 @@ test_that("missing value plots work", { dfNA = dfNA), 'all(c("pNA", "nNA") %in% colnames(dfNA)) is not TRUE', fixed = TRUE) + dfNA <- as.data.frame(nbr_na_mq$nNArows) %>% + dplyr::rename(sample = name) + expect_error(plotDetectedInSamples( + dfNA = dfNA, valueType = 1 + ), "'valueType' must be of class 'character'") + expect_error(plotDetectedInSamples( + dfNA = dfNA, valueType = c("fraction", "percentage") + ), "'valueType' must have length 1") + expect_error(plotDetectedInSamples( + dfNA = dfNA, valueType = "error" + ), "'valueType' must be one of") + dfNA$pNA <- 1 + dfNA$pNA + expect_error(plotDetectedInSamples( + dfNA = dfNA, valueType = "fraction" + ), "'$dfNApNA' must be within", fixed = TRUE) + dfNA$pNA <- 99 + dfNA$pNA + expect_error(plotDetectedInSamples( + dfNA = dfNA, valueType = "percentage" + ), "'$dfNApNA' must be within", fixed = TRUE) - out <- plotDetectedInSamples(dfNA = as.data.frame(nbr_na_mq$nNArows)) + expect_message( + out <- plotDetectedInSamples(dfNA = as.data.frame(nbr_na_mq$nNArows)), + 'Inferred valueType: fraction') expect_s3_class(out, "ggplot") expect_named(out$data, c("nNA", "n", "nObs")) for (i in c(0, seq_len(9))) { @@ -135,7 +207,8 @@ test_that("missing value plots work", { } expect_equal(levels(out$data$nObs), as.character(c(0, seq_len(9)))) - out <- plotDetectedInSamples(dfNA = DataFrame(nbr_na_mq$nNArows)) + out <- plotDetectedInSamples(dfNA = DataFrame(nbr_na_mq$nNArows), + valueType = "fraction") expect_s3_class(out, "ggplot") expect_named(out$data, c("nNA", "n", "nObs")) for (i in c(0, seq_len(9))) { @@ -145,7 +218,22 @@ test_that("missing value plots work", { expect_equal(levels(out$data$nObs), as.character(c(0, seq_len(9)))) ## PD data - out <- plotDetectedInSamples(dfNA = as.data.frame(nbr_na_pd$nNArows)) + expect_message( + out <- plotDetectedInSamples(dfNA = as.data.frame(nbr_na_pd$nNArows) |> + dplyr::mutate(pNA = 100 * pNA)), + "Inferred valueType: percentage") + expect_s3_class(out, "ggplot") + expect_named(out$data, c("nNA", "n", "nObs")) + for (i in c(0, seq_len(16))) { + expect_equal(sum(nbr_na_pd$nNArows$nNA == 16 - i), + out$data$n[out$data$nObs == i]) + } + expect_equal(levels(out$data$nObs), as.character(c(0, seq_len(16)))) + + ## PD data, specify valueType + out <- plotDetectedInSamples(dfNA = as.data.frame(nbr_na_pd$nNArows) |> + dplyr::mutate(pNA = 100 * pNA), + valueType = "percentage") expect_s3_class(out, "ggplot") expect_named(out$data, c("nNA", "n", "nObs")) for (i in c(0, seq_len(16))) { diff --git a/tests/testthat/test-plotVolcano.R b/tests/testthat/test-plotVolcano.R index a5e0781f..bae554c3 100644 --- a/tests/testthat/test-plotVolcano.R +++ b/tests/testthat/test-plotVolcano.R @@ -331,6 +331,23 @@ test_that("volcano plots work", { ## .complexBarPlot ## ------------------------------------------------------------------------- ## limma + ## ... all values NA + tmp <- out_limma$tests[[1]] + idx <- grep("iBAQ", colnames(tmp)) + for (i in idx) { + tmp[[i]] <- NA + } + out <- .complexBarPlot( + res = tmp, + prs = fcoll_mq_final$complexes[[1]], + sce = sce_mq_final, + cplx = names(fcoll_mq_final$complexes)[1], + colpat = "iBAQ", + groupmap = NULL + ) + expect_null(out) + + ## ... actual values out <- .complexBarPlot( res = out_limma$tests[[1]], prs = fcoll_mq_final$complexes[[1]], @@ -782,7 +799,7 @@ test_that("volcano plots work", { outl <- plotVolcano(sce = sce_mq_final, res = out_limma$tests[[1]], testType = "limma", xv = "logFC", yv = "mlog10p", xvma = "AveExpr", - volcind = "showInVolcano", + pv = "P.Value", volcind = "showInVolcano", plotnote = out_limma$plotnotes[[1]], plottitle = out_limma$plottitles[[1]], plotsubtitle = out_limma$plotsubtitles[[1]], @@ -1588,7 +1605,7 @@ test_that("volcano plots work", { maxTextWidthBarplot = NULL) }) for (wn in wns) { - expect_match(wn, "containing missing values") + expect_match(wn, "containing") # 'containing non-finite' or 'containing missing' } expect_type(outl, "list") expect_length(outl, 6) @@ -1640,7 +1657,7 @@ test_that("volcano plots work", { maxTextWidthBarplot = NULL) }) for (wn in wns) { - expect_match(wn, "containing missing values") + expect_match(wn, "containing") # 'containing non-finite' or 'containing missing' } expect_type(outl, "list") expect_length(outl, 6) @@ -1692,7 +1709,7 @@ test_that("volcano plots work", { maxTextWidthBarplot = NULL) }) for (wn in wns) { - expect_match(wn, "containing missing values") + expect_match(wn, "containing") # 'containing non-finite' or 'containing missing' } expect_type(outl, "list") expect_length(outl, 6) diff --git a/tests/testthat/test-prepareFeatureCollections.R b/tests/testthat/test-prepareFeatureCollections.R index c441d8d3..40add75a 100644 --- a/tests/testthat/test-prepareFeatureCollections.R +++ b/tests/testthat/test-prepareFeatureCollections.R @@ -211,7 +211,7 @@ test_that("preparing feature collections works", { ## Works with correct arguments args <- args0 args$includeFeatureCollections <- c("complexes", "GO") - fcoll <- do.call(prepareFeatureCollections, args) + suppressMessages(fcoll <- do.call(prepareFeatureCollections, args)) expect_type(fcoll, "list") expect_named(fcoll, c("complexes", "GO")) expect_s4_class(fcoll$complexes, "CharacterList") @@ -236,6 +236,35 @@ test_that("preparing feature collections works", { expect_named(mcc, c("genes", "nGenes", "sharedGenes", "nSharedGenes")) expect_equal(lengths(fcoll$GO), mcc$nSharedGenes) + ## Use built-in complexes file + args <- args0 + args$includeFeatureCollections <- c("complexes", "pathways") + args$complexDbPath <- NULL + args <- c(args, list(complexDbPath = NULL)) + suppressMessages(fcoll <- do.call(prepareFeatureCollections, args)) + expect_type(fcoll, "list") + expect_named(fcoll, c("complexes", "pathways")) + expect_s4_class(fcoll$complexes, "CharacterList") + expect_length(fcoll$complexes, 19) + expect_true(all(lengths(fcoll$complexes) >= 2)) + expect_true(all(unlist(fcoll$complexes) %in% rownames(sce))) + mcc <- S4Vectors::mcols(fcoll$complexes) + expect_s4_class(mcc, "DFrame") + expect_named(mcc, c("Species.common", "Source", "PMID", "All.names", + "genes", "nGenes", "sharedGenes", "nSharedGenes")) + expect_equal(lengths(fcoll$complexes), mcc$nSharedGenes) + expect_equal(mcc$Species.common, rep("mouse", 19)) + + expect_s4_class(fcoll$pathways, "CharacterList") + # expect_length(fcoll$pathways, 1537) + expect_true(all(lengths(fcoll$pathways) >= 2)) + expect_equal(lengths(fcoll$pathways)[1:5], c(2, 4, 2, 2, 2), ignore_attr = TRUE) + expect_true(all(unlist(fcoll$pathways) %in% rownames(sce))) + mcc <- S4Vectors::mcols(fcoll$pathways) + expect_s4_class(mcc, "DFrame") + expect_named(mcc, c("genes", "nGenes", "sharedGenes", "nSharedGenes")) + expect_equal(lengths(fcoll$pathways), mcc$nSharedGenes) + ## Wrong column for IDs - empty output args <- args0 args$idCol <- "Majority.protein.IDs" diff --git a/tests/testthat/test-readFragPipeInfo.R b/tests/testthat/test-readFragPipeInfo.R index bf7bcdec..eebd30f5 100644 --- a/tests/testthat/test-readFragPipeInfo.R +++ b/tests/testthat/test-readFragPipeInfo.R @@ -13,14 +13,15 @@ test_that("readFragPipeInfo works", { system.file("extdata", "fp_example", package = "einprot")) expect_type(fp, "list") - expect_equal(length(fp), 15) + expect_equal(length(fp), 16) expect_named(fp, c("FragPipe version", "FragPipe parameter file", "FragPipe log file", "Search engine", "Raw file location", "Raw files", "Sample names", "Databases", "Peptides (ranges)", "Mass error tolerances", "Quantification settings (LFQ)", "Enzymes", "Variable modifications", - "Fixed modifications", "Database decoy tag")) + "Fixed modifications", "Database decoy tag", + "MSBooster")) ## All entries should be scalar values expect_true(all(vapply(fp, length, 0) == 1)) @@ -42,6 +43,7 @@ test_that("readFragPipeInfo works", { expect_equal(fp$`Variable modifications`, "M(15.9949), N-term(42.0106)") expect_equal(fp$`Fixed modifications`, "C(57.0215)") expect_equal(fp$`Database decoy tag`, "rev_") + expect_equal(fp$MSBooster, "false") ## Workflow file missing -> get values from log file ## ------------------------------------------------------------------------- @@ -51,14 +53,15 @@ test_that("readFragPipeInfo works", { to = file.path(tempdir(), "tempfp")) fp <- readFragPipeInfo(file.path(tempdir(), "tempfp")) expect_type(fp, "list") - expect_equal(length(fp), 14) + expect_equal(length(fp), 15) expect_named(fp, c("FragPipe version", "FragPipe log file", "Search engine", "Raw file location", "Raw files", "Sample names", "Databases", "Peptides (ranges)", "Mass error tolerances", "Quantification settings (LFQ)", "Enzymes", "Variable modifications", - "Fixed modifications", "Database decoy tag")) + "Fixed modifications", "Database decoy tag", + "MSBooster")) ## All entries should be scalar values expect_true(all(vapply(fp, length, 0) == 1)) @@ -79,6 +82,7 @@ test_that("readFragPipeInfo works", { expect_equal(fp$`Variable modifications`, "M(15.9949), N-term(42.0106)") expect_equal(fp$`Fixed modifications`, "C(57.0215)") expect_equal(fp$`Database decoy tag`, "rev_") + expect_equal(fp$MSBooster, "false") ## ------------------------------------------------------------------------- ## Create file where msfragger.search_enzyme_name_2 is not null @@ -93,14 +97,15 @@ test_that("readFragPipeInfo works", { writeLines(tmp, file.path(tempdir(), "tempfp", "fragpipe.workflow")) fp <- readFragPipeInfo(file.path(tempdir(), "tempfp")) expect_type(fp, "list") - expect_equal(length(fp), 15) + expect_equal(length(fp), 16) expect_named(fp, c("FragPipe version", "FragPipe parameter file", "FragPipe log file", "Search engine", "Raw file location", "Raw files", "Sample names", "Databases", "Peptides (ranges)", "Mass error tolerances", "Quantification settings (LFQ)", "Enzymes", "Variable modifications", - "Fixed modifications", "Database decoy tag")) + "Fixed modifications", "Database decoy tag", + "MSBooster")) ## All entries should be scalar values expect_true(all(vapply(fp, length, 0) == 1)) @@ -122,5 +127,5 @@ test_that("readFragPipeInfo works", { expect_equal(fp$`Variable modifications`, "M(15.9949), N-term(42.0106)") expect_equal(fp$`Fixed modifications`, "C(57.0215)") expect_equal(fp$`Database decoy tag`, "rev_") - + expect_equal(fp$MSBooster, "false") }) diff --git a/tests/testthat/test-readSpectronautSetup.R b/tests/testthat/test-readSpectronautSetup.R new file mode 100644 index 00000000..26e64d5e --- /dev/null +++ b/tests/testthat/test-readSpectronautSetup.R @@ -0,0 +1,33 @@ +test_that("reading Spectronaut setup file works", { + ## Mis-specified arguments + expect_error(readSpectronautSetup(1), + "'spectronautSetupFile' must be of class 'character'") + expect_error(readSpectronautSetup("missing"), "doesn't exist") + + ## Read proper file and check that output is a + ## correctly named list of the right length + setupfile <- system.file("extdata", "spectronaut_example", + "PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt", + package = "einprot") + sn <- readSpectronautSetup(setupfile) + expect_type(sn, "list") + expect_equal(length(sn), 4) + expect_named(sn, c("Spectronaut version", "Setup file", "Raw files", + "Databases")) + + ## All entries should be scalar values + expect_true(all(vapply(sn, length, 0) == 1)) + + ## Check individual values + expect_equal(sn$`Spectronaut version`, "Spectronaut 20.4.260109.92449") + expect_equal(sn$`Setup file`, setupfile) + expect_equal(sn$`Raw files`, + "LFQ_24min_500ng_2Th_3ms_A_01.raw, LFQ_24min_500ng_2Th_3ms_A_02.raw, LFQ_24min_500ng_2Th_3ms_A_03.raw, LFQ_24min_500ng_2Th_3ms_B_01.raw, LFQ_24min_500ng_2Th_3ms_B_02.raw, LFQ_24min_500ng_2Th_3ms_B_03.raw") + expect_equal(sn$`Databases`, + "ECOLI__250312.fasta, HUMAN__230321.fasta, YEAST__230321.fasta") + + ## Missing file + sn <- readSpectronautSetup(spectronautSetupFile = NULL) + expect_type(sn, "list") + expect_equal(length(sn), 0) +}) diff --git a/tests/testthat/test-runDIANNAnalysis.R b/tests/testthat/test-runDIANNAnalysis.R index e5f6091f..e50cacf5 100644 --- a/tests/testthat/test-runDIANNAnalysis.R +++ b/tests/testthat/test-runDIANNAnalysis.R @@ -35,11 +35,12 @@ test_that("runDIANNAnalysis works", { group = c("A", "A", "A", "B", "B", "B")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersDF = list(), + filtersSE = list(), imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, - addAbundanceValues = TRUE, + addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), @@ -300,23 +301,29 @@ test_that("runDIANNAnalysis works", { expect_error(do.call(runDIANNAnalysis, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersDF args <- args0 - args$minScore <- "1" + args$filtersDF <- "1" expect_error(do.call(runDIANNAnalysis, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + "'filtersDF' must be of class 'list'") + args$filtersDF <- list(function(x) x) expect_error(do.call(runDIANNAnalysis, args), - "'minScore' must have length 1") + "'namesfiltersDF' must not be NULL") + args$filtersDF <- list(f1 = function(x, y) x + y) + expect_error(do.call(runDIANNAnalysis, args), + "is not TRUE") - ## minPeptides + ## filtersSE args <- args0 - args$minPeptides <- "1" + args$filtersSE <- "1" + expect_error(do.call(runDIANNAnalysis, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(runDIANNAnalysis, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(runDIANNAnalysis, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -330,6 +337,12 @@ test_that("runDIANNAnalysis works", { expect_error(do.call(runDIANNAnalysis, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runDIANNAnalysis, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -344,7 +357,7 @@ test_that("runDIANNAnalysis works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(runDIANNAnalysis, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-runFragPipeAnalysis.R b/tests/testthat/test-runFragPipeAnalysis.R index 83421d10..fd23cafe 100644 --- a/tests/testthat/test-runFragPipeAnalysis.R +++ b/tests/testthat/test-runFragPipeAnalysis.R @@ -33,11 +33,11 @@ test_that("runFragPipeAnalysis works", { "Chd4BF", "RBC_ctrl", "RBC_ctrl", "RBC_ctrl")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersSE = einprotFragPipeFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, - addAbundanceValues = TRUE, + addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), @@ -263,23 +263,17 @@ test_that("runFragPipeAnalysis works", { expect_error(do.call(runFragPipeAnalysis, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersSE args <- args0 - args$minScore <- "1" + args$filtersSE <- "1" expect_error(do.call(runFragPipeAnalysis, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(runFragPipeAnalysis, args), - "'minScore' must have length 1") - - ## minPeptides - args <- args0 - args$minPeptides <- "1" + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(runFragPipeAnalysis, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) - expect_error(do.call(runFragPipeAnalysis, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -293,6 +287,12 @@ test_that("runFragPipeAnalysis works", { expect_error(do.call(runFragPipeAnalysis, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runFragPipeAnalysis, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -307,7 +307,7 @@ test_that("runFragPipeAnalysis works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(runFragPipeAnalysis, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-runMaxQuantAnalysis.R b/tests/testthat/test-runMaxQuantAnalysis.R index 14526540..9f77da7c 100644 --- a/tests/testthat/test-runMaxQuantAnalysis.R +++ b/tests/testthat/test-runMaxQuantAnalysis.R @@ -37,11 +37,11 @@ test_that("runMaxQuantAnalysis works", { "Chd4BF", "RBC_ctrl", "RBC_ctrl", "RBC_ctrl")), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minPeptides = 2, + filtersSE = einprotMQFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = c("iBAQ", "Top3"), - addAbundanceValues = TRUE, + addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), @@ -288,23 +288,17 @@ test_that("runMaxQuantAnalysis works", { expect_error(do.call(runMaxQuantAnalysis, args), "Please specify max one of includeOnlySamples") - ## minScore + ## filtersSE args <- args0 - args$minScore <- "1" + args$filtersSE <- "1" expect_error(do.call(runMaxQuantAnalysis, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(runMaxQuantAnalysis, args), - "'minScore' must have length 1") - - ## minPeptides - args <- args0 - args$minPeptides <- "1" + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(runMaxQuantAnalysis, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) - expect_error(do.call(runMaxQuantAnalysis, args), - "'minPeptides' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -318,6 +312,12 @@ test_that("runMaxQuantAnalysis works", { expect_error(do.call(runMaxQuantAnalysis, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runMaxQuantAnalysis, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -332,7 +332,7 @@ test_that("runMaxQuantAnalysis works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(runMaxQuantAnalysis, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-runPDTMTAnalysis.R b/tests/testthat/test-runPDTMTAnalysis.R index eec08dc3..34f98c93 100644 --- a/tests/testthat/test-runPDTMTAnalysis.R +++ b/tests/testthat/test-runPDTMTAnalysis.R @@ -44,14 +44,11 @@ test_that("runPDTMTAnalysis works", { rep("WT", 4))), includeOnlySamples = "", excludeSamples = "", - minScore = 10, - minDeltaScore = 0.2, - minPeptides = 2, - minPSMs = 2, - masterProteinsOnly = FALSE, + filtersSE = einprotPDTMTProteinFilters, imputeMethod = "MinProb", + imputeArgs = list(), assaysForExport = NULL, - addAbundanceValues = TRUE, + addAbundanceValues = TRUE, addHeatmaps = TRUE, mergeGroups = list(), comparisons = list(), @@ -354,50 +351,17 @@ test_that("runPDTMTAnalysis works", { expect_error(do.call(runPDTMTAnalysis, args), "Please specify max one of includeOnlySamples") - ## minScore/minDeltaScore + ## filtersSE args <- args0 - args$minScore <- "1" + args$filtersSE <- "1" expect_error(do.call(runPDTMTAnalysis, args), - "'minScore' must be of class 'numeric'") - args$minScore <- c(1, 2) + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) expect_error(do.call(runPDTMTAnalysis, args), - "'minScore' must have length 1") - - args <- args0 - args$inputLevel <- "PeptideGroups" - args$minDeltaScore <- "1" + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) expect_error(do.call(runPDTMTAnalysis, args), - "'minDeltaScore' must be of class 'numeric'") - args$minDeltaScore <- c(1, 2) - expect_error(do.call(runPDTMTAnalysis, args), - "'minDeltaScore' must have length 1") - - ## minPeptides/minPSMs - args <- args0 - args$minPeptides <- "1" - expect_error(do.call(runPDTMTAnalysis, args), - "'minPeptides' must be of class 'numeric'") - args$minPeptides <- c(1, 2) - expect_error(do.call(runPDTMTAnalysis, args), - "'minPeptides' must have length 1") - - args <- args0 - args$inputLevel <- "PeptideGroups" - args$minPSMs <- "1" - expect_error(do.call(runPDTMTAnalysis, args), - "'minPSMs' must be of class 'numeric'") - args$minPSMs <- c(1, 2) - expect_error(do.call(runPDTMTAnalysis, args), - "'minPSMs' must have length 1") - - ## masterProteinsOnly - args <- args0 - args$masterProteinsOnly <- 1 - expect_error(do.call(runPDTMTAnalysis, args), - "'masterProteinsOnly' must be of class 'logical'") - args$masterProteinsOnly <- c(TRUE, FALSE) - expect_error(do.call(runPDTMTAnalysis, args), - "'masterProteinsOnly' must have length 1") + "is not TRUE") ## imputeMethod args <- args0 @@ -411,6 +375,12 @@ test_that("runPDTMTAnalysis works", { expect_error(do.call(runPDTMTAnalysis, args), "All values in 'imputeMethod' must be one of") + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runPDTMTAnalysis, args), + "'imputeArgs' must be of class 'list'") + ## assaysForExport args <- args0 args$assaysForExport <- 1 @@ -425,7 +395,7 @@ test_that("runPDTMTAnalysis works", { args$addAbundanceValues <- c(TRUE, FALSE) expect_error(do.call(runPDTMTAnalysis, args), "'addAbundanceValues' must have length 1") - + ## addHeatmaps args <- args0 args$addHeatmaps <- 1 diff --git a/tests/testthat/test-runSEAnalysis.R b/tests/testthat/test-runSEAnalysis.R new file mode 100644 index 00000000..c3511f73 --- /dev/null +++ b/tests/testthat/test-runSEAnalysis.R @@ -0,0 +1,742 @@ +test_that("runSEAnalysis works", { + outDir <- tempdir() + outBaseName <- "SEAnalysis" + args0 <- list( + templateRmd = system.file("extdata/process_basic_template.Rmd", + package = "einprot"), + outputDir = outDir, + outputBaseName = outBaseName, + reportTitle = "SE LFQ data processing", + reportAuthor = "", + forceOverwrite = TRUE, + experimentInfo = list("Experiment type" = "type1"), + species = "mouse", + inFile = system.file("extdata", "mq_example", "1356_sce_init.rds", + package = "einprot"), + summaryInfo = list(), + aName = "LFQ.intensity", + idCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "nonunique", + splitSeparator = ";", joinSeparator = "."), + labelCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "nonunique", + splitSeparator = ";", joinSeparator = "."), + geneIdCol = function(df) getFirstId(df, colName = "Gene.names", + separator = ";"), + proteinIdCol = function(df) getFirstId(df, colName = "Majority.protein.IDs", + separator = ";"), + stringIdCol = function(df) combineIds(df, combineCols = c("Gene.names", "Majority.protein.IDs"), + combineWhen = "missing", makeUnique = FALSE), + extraFeatureCols = NULL, + filtersSE = einprotMQFilters, + imputeMethod = "MinProb", + imputeArgs = list(), + assaysForExport = c("iBAQ", "Top3"), + addAbundanceValues = TRUE, + addHeatmaps = TRUE, + mergeGroups = list(), + comparisons = list(), + ctrlGroup = "", + allPairwiseComparisons = TRUE, + singleFit = FALSE, + subtractBaseline = FALSE, + baselineGroup = "", + normMethod = "none", + spikeFeatures = NULL, + stattest = "limma", + minNbrValidValues = 2, + minlFC = 0, + samSignificance = TRUE, + nperm = 250, + volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, + volcanoMaxFeatures = 25, + volcanoLabelSign = "both", + volcanoS0 = 0.1, + volcanoFeaturesToLabel = "", + addInteractiveVolcanos = FALSE, + interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, + complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, + maxComplexSimilarity = 1, + seed = 42, + includeFeatureCollections = "complexes", + minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", + complexDbPath = system.file( + "extdata", "complexes", + "complexdb_einprot0.5.0_20220323_orthologs.rds", + package = "einprot"), + stringVersion = "11.5", + stringDir = "", + linkTableColumns = c(), + customYml = NULL, + doRender = FALSE + ) + + ## Fail with wrong parameter values (essentially the same tests as for + ## .checkArgumentsSE()) + ## ------------------------------------------------------------------------- + ## templateRmd + args <- args0 + args$templateRmd <- c(args$templateRmd, args$templateRmd) + expect_error(do.call(runSEAnalysis, args), + "'templateRmd' must have length 1") + args$templateRmd <- 1 + expect_error(do.call(runSEAnalysis, args), + "'templateRmd' must be of class 'character'") + args$templateRmd <- "missing_file" + expect_error(do.call(runSEAnalysis, args), + "'templateRmd' must point to an existing file") + + ## outputDir + args <- args0 + args$outputDir <- 1 + expect_error(do.call(runSEAnalysis, args), + "'outputDir' must be of class 'character'") + args$outputDir <- c("dir1", "dir2") + expect_error(do.call(runSEAnalysis, args), + "'outputDir' must have length 1") + + ## outputBaseName + args <- args0 + args$outputBaseName <- 1 + expect_error(do.call(runSEAnalysis, args), + "'outputBaseName' must be of class 'character'") + args$outputBaseName <- c("name1", "name2") + expect_error(do.call(runSEAnalysis, args), + "'outputBaseName' must have length 1") + + ## reportTitle + args <- args0 + args$reportTitle <- 1 + expect_error(do.call(runSEAnalysis, args), + "'reportTitle' must be of class 'character'") + args$reportTitle <- c("name1", "name2") + expect_error(do.call(runSEAnalysis, args), + "'reportTitle' must have length 1") + + ## reportAuthor + args <- args0 + args$reportAuthor <- 1 + expect_error(do.call(runSEAnalysis, args), + "'reportAuthor' must be of class 'character'") + args$reportAuthor <- c("name1", "name2") + expect_error(do.call(runSEAnalysis, args), + "'reportAuthor' must have length 1") + + ## forceOverwrite + args <- args0 + args$forceOverwrite <- 1 + expect_error(do.call(runSEAnalysis, args), + "'forceOverwrite' must be of class 'logical'") + args$forceOverwrite <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'forceOverwrite' must have length 1") + + ## doRender + args <- args0 + args$doRender <- 1 + expect_error(do.call(runSEAnalysis, args), + "'doRender' must be of class 'logical'") + args$doRender <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'doRender' must have length 1") + + ## experimentInfo + args <- args0 + args$experimentInfo <- 1 + expect_error(do.call(runSEAnalysis, args), + "'experimentInfo' must be of class 'list'") + args$experimentInfo <- list(1, 2) + expect_error(do.call(runSEAnalysis, args), + "'namesexperimentInfo' must not be NULL") + + ## species + args <- args0 + args$species <- c("Mouse", "Human") + expect_error(do.call(runSEAnalysis, args), + "length(species) == 1 is not TRUE", fixed = TRUE) + + ## inFile + args <- args0 + args$inFile <- 1 + expect_error(do.call(runSEAnalysis, args), + "'inFile' must be of class 'character'") + args$inFile <- c("name1", "name2") + expect_error(do.call(runSEAnalysis, args), + "'inFile' must have length 1") + args$inFile <- "missing" + expect_error(do.call(runSEAnalysis, args), + "'inFile' must point to an existing file") + + ## summaryInfo + args <- args0 + args$summaryInfo <- 1 + expect_error(do.call(runSEAnalysis, args), + "'summaryInfo' must be of class 'list'") + args$summaryInfo <- list("name1", "name2") + expect_error(do.call(runSEAnalysis, args), + "'namessummaryInfo' must not be NULL") + + ## aName + args <- args0 + args$aName <- 1 + expect_error(do.call(runSEAnalysis, args), + "'aName' must be of class 'character'") + args$aName <- c("iBAQ", "Unique.peptides") + expect_error(do.call(runSEAnalysis, args), + "'aName' must have length 1") + args$aName <- "missing" + expect_error(do.call(runSEAnalysis, args), + "All values in 'aName' must be one of") + + ## idCol + args <- args0 + args$idCol <- 1 + expect_error(do.call(runSEAnalysis, args), + "'idCol' must be of class 'character'") + + ## labelCol + args <- args0 + args$labelCol <- 1 + expect_error(do.call(runSEAnalysis, args), + "'labelCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$geneIdCol <- 1 + expect_error(do.call(runSEAnalysis, args), + "'geneIdCol' must be of class 'character'") + + ## proteinIdCol + args <- args0 + args$proteinIdCol <- 1 + expect_error(do.call(runSEAnalysis, args), + "'proteinIdCol' must be of class 'character'") + + ## stringIdCol + args <- args0 + args$stringIdCol <- 1 + expect_error(do.call(runSEAnalysis, args), + "'stringIdCol' must be of class 'character'") + + ## extraFeatureCols + args <- args0 + args$extraFeatureCols <- function(df) df$einprotId + expect_error(do.call(runSEAnalysis, args), + "'extraFeatureCols' must be of class 'list'") + args$extraFeatureCols <- list(function(df) df$einprotId) + expect_error(do.call(runSEAnalysis, args), + "'namesextraFeatureCols' must not be NULL") + args$extraFeatureCols <- list(newCol = 1) + expect_error(do.call(runSEAnalysis, args), + "'i' must be of class 'character'") + args$extraFeatureCols <- list(newCol = function(x, y) "a") + expect_error(do.call(runSEAnalysis, args), + "length(formals(i)) == 1 is not TRUE", fixed = TRUE) + + ## filtersSE + args <- args0 + args$filtersSE <- "1" + expect_error(do.call(runSEAnalysis, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) + expect_error(do.call(runSEAnalysis, args), + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) + expect_error(do.call(runSEAnalysis, args), + "is not TRUE") + + ## imputeMethod + args <- args0 + args$imputeMethod <- 1 + expect_error(do.call(runSEAnalysis, args), + "'imputeMethod' must be of class 'character'") + args$imputeMethod <- c("MinProb", "impSeqRob") + expect_error(do.call(runSEAnalysis, args), + "'imputeMethod' must have length 1") + args$imputeMethod <- "wrong" + expect_error(do.call(runSEAnalysis, args), + "All values in 'imputeMethod' must be one of") + + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runSEAnalysis, args), + "'imputeArgs' must be of class 'list'") + + ## assaysForExport + args <- args0 + args$assaysForExport <- 1 + expect_error(do.call(runSEAnalysis, args), + "'assaysForExport' must be of class 'character'") + + ## addAbundanceValues + args <- args0 + args$addAbundanceValues <- 1 + expect_error(do.call(runSEAnalysis, args), + "'addAbundanceValues' must be of class 'logical'") + args$addAbundanceValues <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'addAbundanceValues' must have length 1") + + ## addHeatmaps + args <- args0 + args$addHeatmaps <- 1 + expect_error(do.call(runSEAnalysis, args), + "'addHeatmaps' must be of class 'logical'") + args$addHeatmaps <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'addHeatmaps' must have length 1") + + ## mergeGroups + args <- args0 + args$mergeGroups <- 1 + expect_error(do.call(runSEAnalysis, args), + "'mergeGroups' must be of class 'list'") + args$mergeGroups <- list(c("c1", "c2")) + expect_error(do.call(runSEAnalysis, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list(g1 = c("c1", "c2"), + g1 = c("c3", "c4")) + expect_error(do.call(runSEAnalysis, args), + "'mergeGroups' must be a named list") + + ## comparisons + args <- args0 + args$comparisons <- 1 + expect_error(do.call(runSEAnalysis, args), + "'comparisons' must be of class 'list'") + args$comparisons <- list(g1 = c("c1", "c2"), + g2 = c("c2", "c4", "c3")) + expect_error(do.call(runSEAnalysis, args), + "Each entry in 'comparisons' must have exactly two elements") + + ## ctrlGroup + args <- args0 + args$ctrlGroup <- 1 + expect_error(do.call(runSEAnalysis, args), + "'ctrlGroup' must be of class 'character'") + # args$ctrlGroup <- c("name1", "name2") + # expect_error(do.call(runSEAnalysis, args), + # "'ctrlGroup' must have length 1") + + ## allPairwiseComparisons + args <- args0 + args$allPairwiseComparisons <- 1 + expect_error(do.call(runSEAnalysis, args), + "'allPairwiseComparisons' must be of class 'logical'") + args$allPairwiseComparisons <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'allPairwiseComparisons' must have length 1") + + ## singleFit + args <- args0 + args$singleFit <- 1 + expect_error(do.call(runSEAnalysis, args), + "'singleFit' must be of class 'logical'") + args$singleFit <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'singleFit' must have length 1") + + ## subtractBaseline + args <- args0 + args$subtractBaseline <- 1 + expect_error(do.call(runSEAnalysis, args), + "'subtractBaseline' must be of class 'logical'") + args$subtractBaseline <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'subtractBaseline' must have length 1") + + ## baselineGroup + args <- args0 + args$baselineGroup <- 1 + expect_error(do.call(runSEAnalysis, args), + "'baselineGroup' must be of class 'character'") + + ## normMethod + args <- args0 + args$normMethod <- 1 + expect_error(do.call(runSEAnalysis, args), + "'normMethod' must be of class 'character'") + args$normMethod <- c("none", "center.median") + expect_error(do.call(runSEAnalysis, args), + "'normMethod' must have length 1") + args$normMethod <- "wrong" + expect_error(do.call(runSEAnalysis, args), + "All values in 'normMethod' must be one of") + + ## spikeFeatures + args <- args0 + args$spikeFeatures <- 1 + expect_error(do.call(runSEAnalysis, args), + "'spikeFeatures' must be of class 'character'") + + ## stattest + args <- args0 + args$stattest <- 1 + expect_error(do.call(runSEAnalysis, args), + "'stattest' must be of class 'character'") + args$stattest <- c("limma", "ttest") + expect_error(do.call(runSEAnalysis, args), + "'stattest' must have length 1") + args$stattest <- "wrong" + expect_error(do.call(runSEAnalysis, args), + "All values in 'stattest' must be one of") + + ## minNbrValidValues + args <- args0 + args$minNbrValidValues <- "1" + expect_error(do.call(runSEAnalysis, args), + "'minNbrValidValues' must be of class 'numeric'") + args$minNbrValidValues <- c(10, 20) + expect_error(do.call(runSEAnalysis, args), + "'minNbrValidValues' must have length 1") + args$minNbrValidValues <- -1 + expect_error(do.call(runSEAnalysis, args), + "'minNbrValidValues' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## minlFC + args <- args0 + args$minlFC <- "1" + expect_error(do.call(runSEAnalysis, args), + "'minlFC' must be of class 'numeric'") + args$minlFC <- c(10, 20) + expect_error(do.call(runSEAnalysis, args), + "'minlFC' must have length 1") + args$minlFC <- -1 + expect_error(do.call(runSEAnalysis, args), + "'minlFC' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## samSignificance + args <- args0 + args$samSignificance <- "1" + expect_error(do.call(runSEAnalysis, args), + "'samSignificance' must be of class 'logical'") + args$samSignificance <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'samSignificance' must have length 1") + + ## nperm + args <- args0 + args$nperm <- "1" + expect_error(do.call(runSEAnalysis, args), + "'nperm' must be of class 'numeric'") + args$nperm <- c(10, 20) + expect_error(do.call(runSEAnalysis, args), + "'nperm' must have length 1") + args$nperm <- -1 + expect_error(do.call(runSEAnalysis, args), + "'nperm' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoAdjPvalThr + args <- args0 + args$volcanoAdjPvalThr <- "1" + expect_error(do.call(runSEAnalysis, args), + "'volcanoAdjPvalThr' must be of class 'numeric'") + args$volcanoAdjPvalThr <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'volcanoAdjPvalThr' must have length 1") + args$volcanoAdjPvalThr <- -1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoAdjPvalThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## volcanoLog2FCThr + args <- args0 + args$volcanoLog2FCThr <- "1" + expect_error(do.call(runSEAnalysis, args), + "'volcanoLog2FCThr' must be of class 'numeric'") + args$volcanoLog2FCThr <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'volcanoLog2FCThr' must have length 1") + args$volcanoLog2FCThr <- -1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoLog2FCThr' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoMaxFeatures + args <- args0 + args$volcanoMaxFeatures <- "1" + expect_error(do.call(runSEAnalysis, args), + "'volcanoMaxFeatures' must be of class 'numeric'") + args$volcanoMaxFeatures <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'volcanoMaxFeatures' must have length 1") + args$volcanoMaxFeatures <- -1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoMaxFeatures' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoLabelSign + args <- args0 + args$volcanoLabelSign <- 1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoLabelSign' must be of class 'character'") + args$volcanoLabelSign <- c("both", "pos") + expect_error(do.call(runSEAnalysis, args), + "'volcanoLabelSign' must have length 1") + args$volcanoLabelSign <- "missing" + expect_error(do.call(runSEAnalysis, args), + "All values in 'volcanoLabelSign' must be one of") + + ## volcanoS0 + args <- args0 + args$volcanoS0 <- "1" + expect_error(do.call(runSEAnalysis, args), + "'volcanoS0' must be of class 'numeric'") + args$volcanoS0 <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'volcanoS0' must have length 1") + args$volcanoS0 <- -1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoS0' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoFeaturesToLabel + args <- args0 + args$volcanoFeaturesToLabel <- 1 + expect_error(do.call(runSEAnalysis, args), + "'volcanoFeaturesToLabel' must be of class 'character'") + + ## addInteractiveVolcanos + args <- args0 + args$addInteractiveVolcanos <- 1 + expect_error(do.call(runSEAnalysis, args), + "'addInteractiveVolcanos' must be of class 'logical'") + args$addInteractiveVolcanos <- c(TRUE, FALSE) + expect_error(do.call(runSEAnalysis, args), + "'addInteractiveVolcanos' must have length 1") + + # interactiveDisplayColumns + args <- args0 + args$interactiveDisplayColumns <- 1 + expect_error(do.call(runSEAnalysis, args), + "'interactiveDisplayColumns' must be of class 'character'") + + # interactiveGroupColumn + args <- args0 + args$interactiveGroupColumn <- 1 + expect_error(do.call(runSEAnalysis, args), + "'interactiveGroupColumn' must be of class 'character'") + args$interactiveGroupColumn <- c("col1", "col2") + expect_error(do.call(runSEAnalysis, args), + "'interactiveGroupColumn' must have length 1") + + ## complexFDRThr + args <- args0 + args$complexFDRThr <- "1" + expect_error(do.call(runSEAnalysis, args), + "'complexFDRThr' must be of class 'numeric'") + args$complexFDRThr <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'complexFDRThr' must have length 1") + args$complexFDRThr <- -1 + expect_error(do.call(runSEAnalysis, args), + "'complexFDRThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## maxNbrComplexesToPlot + args <- args0 + args$maxNbrComplexesToPlot <- "1" + expect_error(do.call(runSEAnalysis, args), + "'maxNbrComplexesToPlot' must be of class 'numeric'") + args$maxNbrComplexesToPlot <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'maxNbrComplexesToPlot' must have length 1") + args$maxNbrComplexesToPlot <- -1 + expect_error(do.call(runSEAnalysis, args), + "'maxNbrComplexesToPlot' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## maxComplexSimilarity + args <- args0 + args$maxComplexSimilarity <- "1" + expect_error(do.call(runSEAnalysis, args), + "'maxComplexSimilarity' must be of class 'numeric'") + args$maxComplexSimilarity <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'maxComplexSimilarity' must have length 1") + + ## seed + args <- args0 + args$seed <- "1" + expect_error(do.call(runSEAnalysis, args), + "'seed' must be of class 'numeric'") + args$seed <- c(4, 5) + expect_error(do.call(runSEAnalysis, args), + "'seed' must have length 1") + args$seed <- -1 + expect_error(do.call(runSEAnalysis, args), + "'seed' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## includeFeatureCollections + args <- args0 + args$includeFeatureCollections <- 1 + expect_error(do.call(runSEAnalysis, args), + "'includeFeatureCollections' must be of class 'character'") + args$includeFeatureCollections <- "wrong" + expect_error(do.call(runSEAnalysis, args), + "All values in 'includeFeatureCollections' must be one of") + + ## minSizeToKeepSet + args <- args0 + args$minSizeToKeepSet <- "1" + expect_error(do.call(runSEAnalysis, args), + "'minSizeToKeepSet' must be of class 'numeric'") + args$minSizeToKeepSet <- c(0.1, 0.2) + expect_error(do.call(runSEAnalysis, args), + "'minSizeToKeepSet' must have length 1") + args$minSizeToKeepSet <- -1 + expect_error(do.call(runSEAnalysis, args), + "'minSizeToKeepSet' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## customComplexes + args <- args0 + args$customComplexes <- 1 + expect_error(do.call(runSEAnalysis, args), + "'customComplexes' must be of class 'list'") + args$customComplexes <- list(c("c1", "c2"), + c("c2", "c4", "c3")) + expect_error(do.call(runSEAnalysis, args), + "'namescustomComplexes' must not be NULL") + + ## complexSpecies + args <- args0 + args$complexSpecies <- 1 + expect_error(do.call(runSEAnalysis, args), + "'complexSpecies' must be of class 'character'") + args$complexSpecies <- c("all", "current") + expect_error(do.call(runSEAnalysis, args), + "'complexSpecies' must have length 1") + args$complexSpecies <- "wrong" + expect_error(do.call(runSEAnalysis, args), + "All values in 'complexSpecies' must be one of") + + ## complexDbPath + args <- args0 + args$complexDbPath <- 1 + expect_error(do.call(runSEAnalysis, args), + "'complexDbPath' must be of class 'character'") + args$complexDbPath <- "missing_file" + expect_error(do.call(runSEAnalysis, args), + "'complexDbPath' must point to an existing file") + + ## stringVersion + args <- args0 + args$stringVersion <- 11 + expect_error(do.call(runSEAnalysis, args), + "'stringVersion' must be of class 'character'") + args$stringVersion <- c("11.0", "11.5") + expect_error(do.call(runSEAnalysis, args), + "'stringVersion' must have length 1") + + ## stringDir + args <- args0 + args$stringDir <- 11 + expect_error(do.call(runSEAnalysis, args), + "'stringDir' must be of class 'character'") + args$stringDir <- c("", "") + expect_error(do.call(runSEAnalysis, args), + "'stringDir' must have length 1") + + ## linkTableColumns + args <- args0 + args$linkTableColumns <- 1 + expect_error(do.call(runSEAnalysis, args), + "'linkTableColumns' must be of class 'character'") + + ## customYml + args <- args0 + args$customYml <- 1 + expect_error(do.call(runSEAnalysis, args), + "'customYml' must be of class 'character'") + args$customYml <- "missing_file" + expect_error(do.call(runSEAnalysis, args), + "'customYml' must point to an existing file") + + ## Test fix for backwards compatibility with mergeGroups/ctrlGroup + args <- args0 + args$mergeGroups <- list(G1 = c("Adnp", "RBC_ctrl")) + args$ctrlGroup <- c("Adnp", "RBC_ctrl") + expect_error(do.call(runSEAnalysis, args), + "If 'mergeGroups' is specified, 'ctrlGroup' should not") + + ## Note that the tests below depend on the value of 'fcn' in + ## generateConfigChunk ("deparse" or "dump") + args <- args0 + args$doRender <- FALSE + args$ctrlGroup <- c("Adnp", "RBC_ctrl") + res <- do.call(runSEAnalysis, args) + expect_type(res, "character") + tmp <- readLines(res) + ## if fcn = "dump" + idx <- grep("ctrlGroup <-", tmp, fixed = TRUE) + expect_length(length(idx), 1L) + # expect_equal(tmp[idx + 1], '\"Adnp.RBC_ctrl\"') + idx <- grep("mergeGroups <-", tmp, fixed = TRUE) + expect_length(length(idx), 1L) + # expect_equal(tmp[idx + 1], 'list(Adnp.RBC_ctrl = c(\"Adnp\", \"RBC_ctrl\"))') + ## if fcn = "deparse" + # expect_true(length( + # grep('ctrlGroup <- \n\"Adnp.RBC_ctrl\"', tmp, fixed = TRUE)) > 0) + # expect_true(length( + # grep('mergeGroups <- list(Adnp.RBC_ctrl = c(\"Adnp\", \"RBC_ctrl\"))', + # tmp, fixed = TRUE)) > 0) + + + ## Generate report + ## ------------------------------------------------------------------------- + ## Without rendering + args <- args0 + res <- do.call(runSEAnalysis, args) + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".Rmd")) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".Rmd")))) + + ## Stop if forceOverwrite = FALSE + args <- args0 + args$forceOverwrite <- FALSE + expect_error(res <- do.call(runSEAnalysis, args)) + + ## Message if forceOverwrite = TRUE + args <- args0 + args$forceOverwrite <- TRUE + expect_message(res <- do.call(runSEAnalysis, args), + "already exists but forceOverwrite = TRUE") + + ## In new, non-existing directory and with custom yml + args <- args0 + args$outputDir <- file.path(outDir, "new_se_dir") + args$customYml <- system.file("extdata", "custom.yml", + package = "einprot") + res <- do.call(runSEAnalysis, args) + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".Rmd")) + expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))) + tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))) + # expect_true(grepl("theme: journal", tmp[4])) + + ## With rendering + skip_if(!capabilities()["X11"]) + args <- args0 + args$doRender <- TRUE + res <- do.call(runSEAnalysis, args) + + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".html")) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".Rmd")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".html")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_iSEE.R")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_sce.rds")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_heatmap_centered.pdf")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_feature_info.txt")))) +}) diff --git a/tests/testthat/test-runSpectronautAnalysis.R b/tests/testthat/test-runSpectronautAnalysis.R new file mode 100644 index 00000000..8f948200 --- /dev/null +++ b/tests/testthat/test-runSpectronautAnalysis.R @@ -0,0 +1,814 @@ +test_that("runSpectronautAnalysis works", { + outDir <- tempdir() + outBaseName <- "SpectronautAnalysis" + args0 <- list( + templateRmd = system.file("extdata", "process_basic_template.Rmd", + package = "einprot"), + outputDir = outDir, + outputBaseName = outBaseName, + reportTitle = "reportTitle", + reportAuthor = "reportAuthor", + forceOverwrite = TRUE, + experimentInfo = list("Experiment type" = "experiment", + "Sample name" = "example"), + species = "roundworm", + spectronautFile = system.file("extdata", "spectronaut_example", + "SN_unit_test_subset.tsv", package = "einprot"), + spectronautFileType = "pg_pivot", + outLevel = "pg", + spectronautLogFile = system.file( + "extdata", "spectronaut_example", + "PG.QValRUN_005_PGPEP_075_Minlog2PrecInt_0_reduced_pivot_filtered.setup.txt", + package = "einprot"), + aName = "PG.Quantity", + idCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups")), + labelCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups")), + geneIdCol = function(df) getFirstId(df, colName = "PG.Genes"), + proteinIdCol = "PG.ProteinGroups", + stringIdCol = function(df) combineIds(df, combineCols = c("PG.Genes", + "PG.ProteinGroups"), + combineWhen = "missing", + makeUnique = FALSE), + extraFeatureCols = NULL, + iColPattern = ".PG.Quantity$", + sampleAnnot = data.frame( + sample = c("LFQ_24min_500ng_2Th_3ms_A_01", + "LFQ_24min_500ng_2Th_3ms_A_02", + "LFQ_24min_500ng_2Th_3ms_A_03", + "LFQ_24min_500ng_2Th_3ms_B_01", + "LFQ_24min_500ng_2Th_3ms_B_02", + "LFQ_24min_500ng_2Th_3ms_B_03"), + group = c("A", "A", "A", "B", "B", "B")), + includeOnlySamples = "", + excludeSamples = "", + filtersDF = list(), + filtersSE = list(), + imputeMethod = "MinProb", + imputeArgs = list(), + assaysForExport = NULL, + addAbundanceValues = TRUE, + addHeatmaps = TRUE, + mergeGroups = list(), + comparisons = list(), + ctrlGroup = "", + allPairwiseComparisons = TRUE, + singleFit = FALSE, + subtractBaseline = FALSE, + baselineGroup = "", + normMethod = "none", + spikeFeatures = NULL, + stattest = "limma", + minNbrValidValues = 2, + minlFC = 0, + samSignificance = TRUE, + nperm = 100, + volcanoAdjPvalThr = 0.05, + volcanoLog2FCThr = 1, + volcanoMaxFeatures = 10, + volcanoLabelSign = "both", + volcanoS0 = 0.1, + volcanoFeaturesToLabel = c(""), + addInteractiveVolcanos = FALSE, + interactiveDisplayColumns = NULL, + interactiveGroupColumn = NULL, + complexFDRThr = 0.1, + maxNbrComplexesToPlot = Inf, + maxComplexSimilarity = 1, + seed = 123, + includeFeatureCollections = "complexes", + minSizeToKeepSet = 2, + customComplexes = list(), + complexSpecies = "all", + complexDbPath = system.file( + "extdata", "complexes", + "complexdb_einprot0.5.0_20220323_orthologs.rds", + package = "einprot"), + stringVersion = "11.5", + stringDir = "", + linkTableColumns = c(), + customYml = NULL, + doRender = FALSE + ) + + ## Fail with wrong parameter values (essentially the same tests as for + ## .checkArgumentsSpectronaut()) + ## ------------------------------------------------------------------------- + ## templateRmd + args <- args0 + args$templateRmd <- c(args$templateRmd, args$templateRmd) + expect_error(do.call(runSpectronautAnalysis, args), + "'templateRmd' must have length 1") + args$templateRmd <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'templateRmd' must be of class 'character'") + args$templateRmd <- "missing_file" + expect_error(do.call(runSpectronautAnalysis, args), + "'templateRmd' must point to an existing file") + + ## outputDir + args <- args0 + args$outputDir <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'outputDir' must be of class 'character'") + args$outputDir <- c("dir1", "dir2") + expect_error(do.call(runSpectronautAnalysis, args), + "'outputDir' must have length 1") + + ## outputBaseName + args <- args0 + args$outputBaseName <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'outputBaseName' must be of class 'character'") + args$outputBaseName <- c("name1", "name2") + expect_error(do.call(runSpectronautAnalysis, args), + "'outputBaseName' must have length 1") + + ## reportTitle + args <- args0 + args$reportTitle <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'reportTitle' must be of class 'character'") + args$reportTitle <- c("name1", "name2") + expect_error(do.call(runSpectronautAnalysis, args), + "'reportTitle' must have length 1") + + ## reportAuthor + args <- args0 + args$reportAuthor <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'reportAuthor' must be of class 'character'") + args$reportAuthor <- c("name1", "name2") + expect_error(do.call(runSpectronautAnalysis, args), + "'reportAuthor' must have length 1") + + ## forceOverwrite + args <- args0 + args$forceOverwrite <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'forceOverwrite' must be of class 'logical'") + args$forceOverwrite <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'forceOverwrite' must have length 1") + + ## experimentInfo + args <- args0 + args$experimentInfo <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'experimentInfo' must be of class 'list'") + args$experimentInfo <- list(1, 2) + expect_error(do.call(runSpectronautAnalysis, args), + "'namesexperimentInfo' must not be NULL") + + ## species + args <- args0 + args$species <- c("Mouse", "Human") + expect_error(do.call(runSpectronautAnalysis, args), + "length(species) == 1 is not TRUE", fixed = TRUE) + + ## spectronautFile + args <- args0 + args$spectronautFile <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautFile' must be of class 'character'") + args$spectronautFile <- "missing" + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautFile' must point to an existing file") + + ## spectronautFileType + args <- args0 + args$spectronautFileType <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautFileType' must be of class 'character'") + args$spectronautFileType <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "values in 'spectronautFileType' must be one of") + args$spectronautFileType = c("pg_pivot", "pg_pivot") + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautFileType' must have length 1") + + ## outLevel + args <- args0 + args$outLevel <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'outLevel' must be of class 'character'") + args$outLevel <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "values in 'outLevel' must be one of") + args$outLevel = c("pg", "pg") + expect_error(do.call(runSpectronautAnalysis, args), + "'outLevel' must have length 1") + + ## spectronautLogFile + args <- args0 + args$spectronautLogFile <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautLogFile' must be of class 'character'") + args$spectronautLogFile <- "missing" + expect_error(do.call(runSpectronautAnalysis, args), + "'spectronautLogFile' must point to an existing file") + + ## aName + # args <- args0 + # args$aName <- 1 + # expect_error(do.call(runSpectronautAnalysis, args), + # "'aName' must be of class 'character'") + # args$aName <- NULL + # args <- c(args, list(aName = NULL)) + # expect_error(do.call(runSpectronautAnalysis, args), + # "'aName' must not be NULL") + + ## idCol + args <- args0 + args$idCol <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'idCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$labelCol <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'labelCol' must be of class 'character'") + + ## geneIdCol + args <- args0 + args$geneIdCol <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'geneIdCol' must be of class 'character'") + + ## proteinIdCol + args <- args0 + args$proteinIdCol <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'proteinIdCol' must be of class 'character'") + + ## stringIdCol + args <- args0 + args$stringIdCol <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'stringIdCol' must be of class 'character'") + + ## extraFeatureCols + args <- args0 + args$extraFeatureCols <- function(df) df$einprotId + expect_error(do.call(runSpectronautAnalysis, args), + "'extraFeatureCols' must be of class 'list'") + args$extraFeatureCols <- list(function(df) df$einprotId) + expect_error(do.call(runSpectronautAnalysis, args), + "'namesextraFeatureCols' must not be NULL") + args$extraFeatureCols <- list(newCol = 1) + expect_error(do.call(runSpectronautAnalysis, args), + "'i' must be of class 'character'") + args$extraFeatureCols <- list(newCol = function(x, y) "a") + expect_error(do.call(runSpectronautAnalysis, args), + "length(formals(i)) == 1 is not TRUE", fixed = TRUE) + + ## iColPattern + args <- args0 + args$iColPattern <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'iColPattern' must be of class 'character'") + args$iColPattern <- c("\\.PG\\.Quantity$", "\\.PG\\.Quantity$") + expect_error(do.call(runSpectronautAnalysis, args), + "'iColPattern' must have length 1") + # args$iColPattern <- c("\\\\.PG\\\\.Quantity$") + # expect_error(do.call(runSpectronautAnalysis, args), + # "All values in 'iColPattern' must be one of") + + ## sampleAnnot + args <- args0 + colnames(args$sampleAnnot) <- c("sample", "condition") + expect_error(do.call(runSpectronautAnalysis, args), + "colnames(sampleAnnot)) is not TRUE", fixed = TRUE) + colnames(args$sampleAnnot) <- NULL + expect_error(do.call(runSpectronautAnalysis, args), + "'colnamessampleAnnot' must not be NULL") + args$sampleAnnot <- as.matrix(args0$sampleAnnot) + expect_error(do.call(runSpectronautAnalysis, args), + "'sampleAnnot' must be of class 'data.frame'") + args$sampleAnnot <- args0$sampleAnnot + args$sampleAnnot$group <- as.numeric(as.factor(args$sampleAnnot$group)) + expect_error(do.call(runSpectronautAnalysis, args), + "'$sampleAnnotgroup' must be of class 'character'", + fixed = TRUE) + # args$sampleAnnot <- args0$sampleAnnot + # args$sampleAnnot$sample[1] <- paste0("iBAQ.", + # args$sampleAnnot$sample[1]) + # expect_error(do.call(runSpectronautAnalysis, args), + # "Not all sample names are available in the sample") + + ## includeOnlySamples + args <- args0 + args$includeOnlySamples <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'includeOnlySamples' must be of class 'character'") + + ## excludeSamples + args <- args0 + args$excludeSamples <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'excludeSamples' must be of class 'character'") + args$includeOnlySamples <- "Adnp" + args$excludeSamples <- "RBC_ctrl" + expect_error(do.call(runSpectronautAnalysis, args), + "Please specify max one of includeOnlySamples") + + ## filtersDF + args <- args0 + args$filtersDF <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'filtersDF' must be of class 'list'") + args$filtersDF <- list(function(x) x) + expect_error(do.call(runSpectronautAnalysis, args), + "'namesfiltersDF' must not be NULL") + args$filtersDF <- list(f1 = function(x, y) x + y) + expect_error(do.call(runSpectronautAnalysis, args), + "is not TRUE") + + ## filtersSE + args <- args0 + args$filtersSE <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'filtersSE' must be of class 'list'") + args$filtersSE <- list(function(x) x) + expect_error(do.call(runSpectronautAnalysis, args), + "'namesfiltersSE' must not be NULL") + args$filtersSE <- list(f1 = function(x, y) x + y) + expect_error(do.call(runSpectronautAnalysis, args), + "is not TRUE") + + ## imputeMethod + args <- args0 + args$imputeMethod <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'imputeMethod' must be of class 'character'") + args$imputeMethod <- c("MinProb", "impSeqRob") + expect_error(do.call(runSpectronautAnalysis, args), + "'imputeMethod' must have length 1") + args$imputeMethod <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'imputeMethod' must be one of") + + ## imputeArgs + args <- args0 + args$imputeArgs <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'imputeArgs' must be of class 'list'") + + ## assaysForExport + args <- args0 + args$assaysForExport <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'assaysForExport' must be of class 'character'") + + ## addAbundanceValues + args <- args0 + args$addAbundanceValues <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'addAbundanceValues' must be of class 'logical'") + args$addAbundanceValues <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'addAbundanceValues' must have length 1") + + ## addHeatmaps + args <- args0 + args$addHeatmaps <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'addHeatmaps' must be of class 'logical'") + args$addHeatmaps <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'addHeatmaps' must have length 1") + + ## mergeGroups + args <- args0 + args$mergeGroups <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'mergeGroups' must be of class 'list'") + args$mergeGroups <- list(c("c1", "c2")) + expect_error(do.call(runSpectronautAnalysis, args), + "'mergeGroups' must be a named list") + args$mergeGroups <- list(g1 = c("c1", "c2"), + g1 = c("c3", "c4")) + expect_error(do.call(runSpectronautAnalysis, args), + "'mergeGroups' must be a named list") + + ## comparisons + args <- args0 + args$comparisons <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'comparisons' must be of class 'list'") + args$comparisons <- list(g1 = c("c1", "c2"), + g2 = c("c2", "c4", "c3")) + expect_error(do.call(runSpectronautAnalysis, args), + "Each entry in 'comparisons' must have exactly two elements") + + ## ctrlGroup + args <- args0 + args$ctrlGroup <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'ctrlGroup' must be of class 'character'") + + ## allPairwiseComparisons + args <- args0 + args$allPairwiseComparisons <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'allPairwiseComparisons' must be of class 'logical'") + args$allPairwiseComparisons <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'allPairwiseComparisons' must have length 1") + + ## singleFit + args <- args0 + args$singleFit <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'singleFit' must be of class 'logical'") + args$singleFit <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'singleFit' must have length 1") + + ## subtractBaseline + args <- args0 + args$subtractBaseline <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'subtractBaseline' must be of class 'logical'") + args$subtractBaseline <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'subtractBaseline' must have length 1") + + ## baselineGroup + args <- args0 + args$baselineGroup <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'baselineGroup' must be of class 'character'") + + ## normMethod + args <- args0 + args$normMethod <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'normMethod' must be of class 'character'") + args$normMethod <- c("none", "center.median") + expect_error(do.call(runSpectronautAnalysis, args), + "'normMethod' must have length 1") + args$normMethod <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'normMethod' must be one of") + + ## spikeFeatures + args <- args0 + args$spikeFeatures <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'spikeFeatures' must be of class 'character'") + + ## stattest + args <- args0 + args$stattest <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'stattest' must be of class 'character'") + args$stattest <- c("limma", "ttest") + expect_error(do.call(runSpectronautAnalysis, args), + "'stattest' must have length 1") + args$stattest <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'stattest' must be one of") + + ## minNbrValidValues + args <- args0 + args$minNbrValidValues <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'minNbrValidValues' must be of class 'numeric'") + args$minNbrValidValues <- c(10, 20) + expect_error(do.call(runSpectronautAnalysis, args), + "'minNbrValidValues' must have length 1") + args$minNbrValidValues <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'minNbrValidValues' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## minlFC + args <- args0 + args$minlFC <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'minlFC' must be of class 'numeric'") + args$minlFC <- c(10, 20) + expect_error(do.call(runSpectronautAnalysis, args), + "'minlFC' must have length 1") + args$minlFC <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'minlFC' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## samSignificance + args <- args0 + args$samSignificance <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'samSignificance' must be of class 'logical'") + args$samSignificance <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'samSignificance' must have length 1") + + ## nperm + args <- args0 + args$nperm <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'nperm' must be of class 'numeric'") + args$nperm <- c(10, 20) + expect_error(do.call(runSpectronautAnalysis, args), + "'nperm' must have length 1") + args$nperm <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'nperm' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoAdjPvalThr + args <- args0 + args$volcanoAdjPvalThr <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoAdjPvalThr' must be of class 'numeric'") + args$volcanoAdjPvalThr <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoAdjPvalThr' must have length 1") + args$volcanoAdjPvalThr <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoAdjPvalThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## volcanoLog2FCThr + args <- args0 + args$volcanoLog2FCThr <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoLog2FCThr' must be of class 'numeric'") + args$volcanoLog2FCThr <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoLog2FCThr' must have length 1") + args$volcanoLog2FCThr <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoLog2FCThr' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoMaxFeatures + args <- args0 + args$volcanoMaxFeatures <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoMaxFeatures' must be of class 'numeric'") + args$volcanoMaxFeatures <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoMaxFeatures' must have length 1") + args$volcanoMaxFeatures <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoMaxFeatures' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoLabelSign + args <- args0 + args$volcanoLabelSign <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoLabelSign' must be of class 'character'") + args$volcanoLabelSign <- c("both", "pos") + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoLabelSign' must have length 1") + args$volcanoLabelSign <- "missing" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'volcanoLabelSign' must be one of") + + ## volcanoS0 + args <- args0 + args$volcanoS0 <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoS0' must be of class 'numeric'") + args$volcanoS0 <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoS0' must have length 1") + args$volcanoS0 <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoS0' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## volcanoFeaturesToLabel + args <- args0 + args$volcanoFeaturesToLabel <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'volcanoFeaturesToLabel' must be of class 'character'") + + ## addInteractiveVolcanos + args <- args0 + args$addInteractiveVolcanos <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'addInteractiveVolcanos' must be of class 'logical'") + args$addInteractiveVolcanos <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'addInteractiveVolcanos' must have length 1") + + ## interactiveDisplayColumns + args <- args0 + args$interactiveDisplayColumns <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'interactiveDisplayColumns' must be of class 'character'") + + # interactiveGroupColumn + args <- args0 + args$interactiveGroupColumn <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'interactiveGroupColumn' must be of class 'character'") + args$interactiveGroupColumn <- c("col1", "col2") + expect_error(do.call(runSpectronautAnalysis, args), + "'interactiveGroupColumn' must have length 1") + + ## complexFDRThr + args <- args0 + args$complexFDRThr <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'complexFDRThr' must be of class 'numeric'") + args$complexFDRThr <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'complexFDRThr' must have length 1") + args$complexFDRThr <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'complexFDRThr' must be within [0,1] (inclusive)", + fixed = TRUE) + + ## maxNbrComplexesToPlot + args <- args0 + args$maxNbrComplexesToPlot <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'maxNbrComplexesToPlot' must be of class 'numeric'") + args$maxNbrComplexesToPlot <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'maxNbrComplexesToPlot' must have length 1") + args$maxNbrComplexesToPlot <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'maxNbrComplexesToPlot' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## maxComplexSimilarity + args <- args0 + args$maxComplexSimilarity <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'maxComplexSimilarity' must be of class 'numeric'") + args$maxComplexSimilarity <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'maxComplexSimilarity' must have length 1") + + ## seed + args <- args0 + args$seed <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'seed' must be of class 'numeric'") + args$seed <- c(4, 5) + expect_error(do.call(runSpectronautAnalysis, args), + "'seed' must have length 1") + args$seed <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'seed' must be within [1,Inf] (inclusive)", + fixed = TRUE) + + ## includeFeatureCollections + args <- args0 + args$includeFeatureCollections <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'includeFeatureCollections' must be of class 'character'") + args$includeFeatureCollections <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'includeFeatureCollections' must be one of") + + ## minSizeToKeepSet + args <- args0 + args$minSizeToKeepSet <- "1" + expect_error(do.call(runSpectronautAnalysis, args), + "'minSizeToKeepSet' must be of class 'numeric'") + args$minSizeToKeepSet <- c(0.1, 0.2) + expect_error(do.call(runSpectronautAnalysis, args), + "'minSizeToKeepSet' must have length 1") + args$minSizeToKeepSet <- -1 + expect_error(do.call(runSpectronautAnalysis, args), + "'minSizeToKeepSet' must be within [0,Inf] (inclusive)", + fixed = TRUE) + + ## customComplexes + args <- args0 + args$customComplexes <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'customComplexes' must be of class 'list'") + args$customComplexes <- list(c("c1", "c2"), + c("c2", "c4", "c3")) + expect_error(do.call(runSpectronautAnalysis, args), + "'namescustomComplexes' must not be NULL") + + ## complexSpecies + args <- args0 + args$complexSpecies <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'complexSpecies' must be of class 'character'") + args$complexSpecies <- c("all", "current") + expect_error(do.call(runSpectronautAnalysis, args), + "'complexSpecies' must have length 1") + args$complexSpecies <- "wrong" + expect_error(do.call(runSpectronautAnalysis, args), + "All values in 'complexSpecies' must be one of") + + ## complexDbPath + args <- args0 + args$complexDbPath <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'complexDbPath' must be of class 'character'") + args$complexDbPath <- "missing_file" + expect_error(do.call(runSpectronautAnalysis, args), + "'complexDbPath' must point to an existing file") + + ## stringVersion + args <- args0 + args$stringVersion <- 11 + expect_error(do.call(runSpectronautAnalysis, args), + "'stringVersion' must be of class 'character'") + args$stringVersion <- c("11.0", "11.5") + expect_error(do.call(runSpectronautAnalysis, args), + "'stringVersion' must have length 1") + + ## stringDir + args <- args0 + args$stringDir <- 11 + expect_error(do.call(runSpectronautAnalysis, args), + "'stringDir' must be of class 'character'") + args$stringDir <- c("", "") + expect_error(do.call(runSpectronautAnalysis, args), + "'stringDir' must have length 1") + + ## linkTableColumns + args <- args0 + args$linkTableColumns <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'linkTableColumns' must be of class 'character'") + + ## customYml + args <- args0 + args$customYml <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'customYml' must be of class 'character'") + args$customYml <- "missing_file" + expect_error(do.call(runSpectronautAnalysis, args), + "'customYml' must point to an existing file") + + ## doRender + args <- args0 + args$doRender <- 1 + expect_error(do.call(runSpectronautAnalysis, args), + "'doRender' must be of class 'logical'") + args$doRender <- c(TRUE, FALSE) + expect_error(do.call(runSpectronautAnalysis, args), + "'doRender' must have length 1") + + + ## Test fix for backwards compatibility with mergeGroups/ctrlGroup + args <- args0 + args$mergeGroups <- list(G1 = c("A", "B")) + args$ctrlGroup <- c("A", "B") + expect_error(do.call(runSpectronautAnalysis, args), + "If 'mergeGroups' is specified, 'ctrlGroup' should not") + + ## Generate report + ## ------------------------------------------------------------------------- + ## Without rendering + args <- args0 + res <- do.call(runSpectronautAnalysis, args) + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".Rmd")) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".Rmd")))) + + ## Stop if forceOverwrite = FALSE + args <- args0 + args$forceOverwrite <- FALSE + expect_error(res <- do.call(runSpectronautAnalysis, args)) + + ## Message if forceOverwrite = TRUE + args <- args0 + args$forceOverwrite <- TRUE + expect_message(res <- do.call(runSpectronautAnalysis, args), + "already exists but forceOverwrite = TRUE") + + ## In new, non-existing directory and with custom yml + args <- args0 + args$outputDir <- file.path(outDir, "new_Spectronaut_dir") + args$customYml <- system.file("extdata", "custom.yml", + package = "einprot") + res <- do.call(runSpectronautAnalysis, args) + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".Rmd")) + expect_true(file.exists(file.path(args$outputDir, paste0(outBaseName, ".Rmd")))) + tmp <- readLines(file.path(args$outputDir, paste0(outBaseName, ".Rmd"))) + # expect_true(grepl("theme: journal", tmp[4])) + + ## With rendering + skip_if(!capabilities()["X11"]) + args <- args0 + args$doRender <- TRUE + res <- do.call(runSpectronautAnalysis, args) + + expect_type(res, "character") + expect_equal(basename(res), paste0(outBaseName, ".html")) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".Rmd")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, ".html")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_iSEE.R")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_sce.rds")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_heatmap_centered.pdf")))) + expect_true(file.exists(file.path(outDir, paste0(outBaseName, "_feature_info.txt")))) +}) diff --git a/tests/testthat/test-textSnippets.R b/tests/testthat/test-textSnippets.R index 765bfbe3..b75086b5 100644 --- a/tests/testthat/test-textSnippets.R +++ b/tests/testthat/test-textSnippets.R @@ -141,6 +141,11 @@ test_that("text snippet generation works", { expect_true(grepl("[Spectronaut](https://biognosys.com/", introText(expType = "Spectronaut"), fixed = TRUE)) + expect_type(introText(expType = "SE"), "character") + expect_equal(length(introText(expType = "SE")), 1) + expect_true(grepl("SummarizedExperiment object", + introText(expType = "SE"), fixed = TRUE)) + ## inputText expect_error(inputText(expTypeLevel = 1), "'expTypeLevel' must be of class 'character'") @@ -179,6 +184,11 @@ test_that("text snippet generation works", { expect_true(grepl("The input to this workflow is a `Report.tsv`", inputText(expTypeLevel = "Spectronaut"), fixed = TRUE)) + expect_type(inputText(expTypeLevel = "SE"), "character") + expect_equal(length(inputText(expTypeLevel = "SE")), 1) + expect_true(grepl("The input to this workflow is a serialized SummarizedExperiment", + inputText(expTypeLevel = "SE"), fixed = TRUE)) + ## emptySampleText sce0 <- sce_mq_final expect_error(emptySampleText(sce = 1, assayName = "log2_iBAQ_withNA"), @@ -205,4 +215,44 @@ test_that("text snippet generation works", { "features and will be removed from further analysis: ", "Adnp_IP05, Chd4BF_IP08.")) + ## filterByModText + expect_error(filterByModText(excludeUnmodifiedPeptides = 1, + keepModifications = "mod1"), + "'excludeUnmodifiedPeptides' must be of class 'logical'") + expect_error(filterByModText(excludeUnmodifiedPeptides = c(TRUE, FALSE), + keepModifications = "mod1"), + "'excludeUnmodifiedPeptides' must have length 1") + expect_error(filterByModText(excludeUnmodifiedPeptides = TRUE, + keepModifications = 1), + "'keepModifications' must be of class 'character'") + + expect_type(filterByModText(excludeUnmodifiedPeptides = TRUE, + keepModifications = NULL), "character") + expect_equal(filterByModText(excludeUnmodifiedPeptides = TRUE, + keepModifications = NULL), + "Next, we filter out unmodified peptides.") + expect_equal(filterByModText(excludeUnmodifiedPeptides = TRUE, + keepModifications = "mod1"), + "Next, we filter out unmodified peptides and peptides without any of the requested modifications (mod1).") + expect_equal(filterByModText(excludeUnmodifiedPeptides = FALSE, + keepModifications = NULL), + "") + expect_equal(filterByModText(excludeUnmodifiedPeptides = FALSE, + keepModifications = "mod1"), + "Next, we filter out peptides without any of the requested modifications (mod1).") + + ## featureCollectionText + expect_error(featureCollectionText(featureCollections = 1), + "'featureCollections' must be of class 'character'") + + expect_type(featureCollectionText(featureCollections = "complexes"), "character") + expect_equal(featureCollectionText(featureCollections = c()), + "No feature collections were tested.") + expect_true(grepl("Complexes are obtained from Corum", + featureCollectionText(featureCollections = c("complexes", "GO", "pathways")))) + expect_true(grepl("GO terms are obtained from MSigDB.", + featureCollectionText(featureCollections = c("complexes", "GO", "pathways")))) + expect_true(grepl("Pathway information is obtained from", + featureCollectionText(featureCollections = c("complexes", "GO", "pathways")))) + })