Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
88346f5
Version bump
csoneson Oct 31, 2025
602b022
Define new filterFeaturesSE function, replacing tool-specific filteri…
csoneson Oct 31, 2025
ba6d957
Adapt unit tests to use new filterFeaturesSE function
csoneson Oct 31, 2025
823957c
Add filtersDF argument to importDIANN, allow importing parquet files
csoneson Oct 31, 2025
df1a186
Add filtersDF argument to importSpectronaut
csoneson Oct 31, 2025
c6b7a25
Add duckplyr to Suggests
csoneson Oct 31, 2025
dd6e85f
Update NAMESPACE
csoneson Oct 31, 2025
6fe21ff
Add default DF filter for DIA-NN
csoneson Oct 31, 2025
87fb10d
Add test for importDIANN with filtering
csoneson Oct 31, 2025
0338653
Remove old filtering arguments in .check* functions, add checks for n…
csoneson Oct 31, 2025
9ed574d
Update default filters to match previous defaults
csoneson Oct 31, 2025
eaa9482
Swap filtering arguments in run*() functions
csoneson Oct 31, 2025
bc2d928
Update filtering step in Rmd template
csoneson Oct 31, 2025
df905d4
Add test for no filtering
csoneson Oct 31, 2025
033b872
Update tests
csoneson Oct 31, 2025
6f7d923
Update NEWS
csoneson Oct 31, 2025
6fee918
Add p-value histograms to pdfs with test result plots
csoneson Oct 31, 2025
5edde4d
Capture MSBooster information in readFragPipeInfo
csoneson Oct 31, 2025
9f81299
Bug fixes to p-value histogram plotting
csoneson Nov 1, 2025
56dfeab
Add dependency on R >= 4.1 (pipe)
csoneson Nov 3, 2025
c5f426e
Allow parquet format for DIANN also in argument checking
csoneson Nov 3, 2025
568b306
Properly handle situation where DIANN log file is NULL
csoneson Nov 3, 2025
8a9e146
Ignore 'iBAQ.peptides' column if present
csoneson Dec 8, 2025
17955c0
Update unit tests (ggplot2 changes)
csoneson Dec 8, 2025
658a23a
Add genes, Protein.Names and Protein.Ids columns to DIA-NN import (as…
csoneson Jan 22, 2026
e5eafbd
Fix filtering in importDIANN for large parquet files and add missing …
csoneson Jan 23, 2026
6dd6b4d
Bump version
csoneson Feb 13, 2026
8723b7e
Add runSEAnalysis function
csoneson Feb 13, 2026
1975c3e
Adapt functions to allow 'SE' expType
csoneson Feb 13, 2026
4c07cfa
Set default labelCol to idCol, filtersSE = list() in runSEAnalysis()
csoneson Feb 21, 2026
c8ef25f
Check that default assay is a matrix
csoneson Feb 21, 2026
55da788
Generate test SE object
csoneson Feb 21, 2026
54cb1c3
Reoxygenize
csoneson Feb 21, 2026
caa9645
Add tests for checkArgumentsSE and runSEAnalysis
csoneson Feb 21, 2026
4f15a82
Use arrow instead of duckplyr to read parquet files
csoneson Mar 6, 2026
0fcd728
Accommodate name change of msigdbdf to msigdbrdata
csoneson Mar 12, 2026
a18a6fc
Protect against all abundances in barplot of significant features bei…
csoneson Mar 16, 2026
82cf1d2
Allow PEP.Quantity as iColPattern
csoneson Apr 12, 2026
529ff78
Add clusterRows argument to makeAbundanceHeatmap
csoneson Apr 12, 2026
85cad32
Add "sorted" settings to plotMissingValuesHeatmap
csoneson Apr 12, 2026
debb0af
Update analysis template to only cluster heatmaps if the number of fe…
csoneson Apr 12, 2026
175d9e8
Add valueType argument to plotFractionDetectedPerSample, specify "per…
csoneson Apr 26, 2026
42d00d3
Update documentation
csoneson Apr 26, 2026
10c5b1b
fix exclusion of se.logFC columns in prepareFinalSCE
csoneson Apr 29, 2026
de8efe3
exclude some lines from coverage calculations
csoneson Apr 29, 2026
0e3bc7e
Add assertions in text snippet functions
csoneson Apr 29, 2026
814c3f2
Expand unit tests
csoneson Apr 29, 2026
72683c0
Add Spectronaut example data
csoneson Apr 29, 2026
e9b24c9
Add tests for Spectronaut functions
csoneson Apr 29, 2026
47207e7
Update .Rbuildignore
csoneson Jun 10, 2026
d837433
Limit supported normalization methods in workflows
csoneson Jun 10, 2026
7c5173e
Adapt to roxygen 8.0.0
csoneson Jun 10, 2026
83562df
Fix tests
csoneson Jun 10, 2026
241a1be
Bump version (0.10.2)
csoneson Jun 23, 2026
1e9e004
Add unit tests
csoneson Jun 28, 2026
5e52bd7
Support additional imputation functions, rename method argument of do…
csoneson Jun 28, 2026
a245cbb
Expose additional arguments to doImputation in workflow functions
csoneson Jun 28, 2026
eaa79cf
Add 'valueType' argument to plotFractionDetectedPerSample
csoneson Jun 28, 2026
84777fb
If normalizing based on shared features only, add boxplot of normaliz…
csoneson Jun 28, 2026
3cc49a3
Expand documentation
csoneson Jul 24, 2026
ab03f14
Implement diff.mean.shared and diff.median.shared normalization options
csoneson Jul 26, 2026
2c97869
Fix typo, rerender documentation
csoneson Aug 2, 2026
e7ed72b
Update docker image in GHA
csoneson Aug 2, 2026
5806228
Increase tolerance in unit test to accommodate arm differences
csoneson Aug 2, 2026
6211287
Fix check note
csoneson Aug 2, 2026
06e533d
Update actions
csoneson Aug 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
^\.Rproj\.user$
^LICENSE\.md$
^\.github$
^\.positai$
^\.claude$
6 changes: 3 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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') }}
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")),
Expand All @@ -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,
Expand Down Expand Up @@ -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
19 changes: 15 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -73,6 +76,7 @@ export(runMaxQuantAnalysis)
export(runPDTMTAnalysis)
export(runPDTMTptmAnalysis)
export(runPTMTest)
export(runSEAnalysis)
export(runSpectronautAnalysis)
export(runTest)
export(saText)
Expand Down Expand Up @@ -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)
Expand All @@ -122,14 +127,18 @@ 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)
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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
39 changes: 29 additions & 10 deletions R/checkArgumentsDIANN.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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"))
Expand Down
30 changes: 20 additions & 10 deletions R/checkArgumentsFragPipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"))
Expand Down
30 changes: 20 additions & 10 deletions R/checkArgumentsMaxQuant.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"))
Expand Down
Loading
Loading