From 1052098ccba46d3d53908d198963044242826a7c Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 16 Sep 2025 17:41:50 -0400 Subject: [PATCH 1/4] fix(spectronaut): Fix spectronaut converter to account for anomaly detection updates --- .github/pull_request_template.md | 19 +++++++++++ .github/workflows/dry-run-build.yml | 18 ++++++++++ DESCRIPTION | 2 +- R/MSstatsLiP.R | 4 +-- R/SpectronauttoMSstatsLiPFormat.R | 49 ++++++++++++++++++---------- man/MSstatsLiP.Rd | 5 ++- man/SpectronauttoMSstatsLiPFormat.Rd | 4 +-- 7 files changed, 77 insertions(+), 24 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/dry-run-build.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a630617 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ +# Motivation and Context + +Please include relevant motivation and context of the problem along with a short summary of the solution. + +## Changes + +Please provide a detailed bullet point list of your changes. + +- + +## Testing + +Please describe any unit tests you added or modified to verify your changes. + +## Checklist Before Requesting a Review +- [ ] I have read the MSstats [contributing guidelines](https://github.com/Vitek-Lab/MSstatsConvert/blob/master/.github/CONTRIBUTING.md) +- [ ] My changes generate no new warnings +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have run the devtools::document() command after my changes and committed the added files \ No newline at end of file diff --git a/.github/workflows/dry-run-build.yml b/.github/workflows/dry-run-build.yml new file mode 100644 index 0000000..a5c529a --- /dev/null +++ b/.github/workflows/dry-run-build.yml @@ -0,0 +1,18 @@ +name: Dry runs for PRs +on: + pull_request: + branches: [devel] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup R and Bioconductor + uses: grimbough/bioc-actions/setup-bioc@v1 + with: + bioc-version: devel + - name: Install dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + - name: Build, Install, Check + uses: grimbough/bioc-actions/build-install-check@v1 \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 189935e..130fcb9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,4 +31,4 @@ BugReports: https://github.com/Vitek-Lab/MSstatsLiP/issues Encoding: UTF-8 LazyData: TRUE Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/R/MSstatsLiP.R b/R/MSstatsLiP.R index a87c7bf..7154c5d 100644 --- a/R/MSstatsLiP.R +++ b/R/MSstatsLiP.R @@ -39,6 +39,6 @@ #' coverage. #' } #' -#' @docType package #' @name MSstatsLiP -NULL +#' @keywords internal +"_PACKAGE" diff --git a/R/SpectronauttoMSstatsLiPFormat.R b/R/SpectronauttoMSstatsLiPFormat.R index 3ba8ff5..d46c1b3 100644 --- a/R/SpectronauttoMSstatsLiPFormat.R +++ b/R/SpectronauttoMSstatsLiPFormat.R @@ -1,7 +1,7 @@ -#' Converts raw LiP MS data from Spectronautt into the format needed for +#' Converts raw LiP MS data from Spectronaut into the format needed for #' MSstatsLiP. #' -#' Takes as as input both raw LiP and Trp outputs from Spectronautt. +#' Takes as as input both raw LiP and Trp outputs from Spectronaut. #' #' @export #' @importFrom MSstats SpectronauttoMSstatsFormat @@ -143,26 +143,39 @@ SpectronauttoMSstatsLiPFormat <- function(LiP.data, getOption("MSstatsLog")("INFO", "Formatting LiP data..") ## MSstats process - df.lip <- SpectronauttoMSstatsFormat(LiP.data, annotation, intensity, - filter_with_Qvalue, qvalue_cutoff, - useUniquePeptide, removeFewMeasurements, - removeProtein_with1Feature, - summaryforMultipleRows, use_log_file, - append, verbose, log_file_path = path, - base) + df.lip <- SpectronauttoMSstatsFormat( + LiP.data, + annotation = annotation, + intensity = intensity, + filter_with_Qvalue = filter_with_Qvalue, + qvalue_cutoff = qvalue_cutoff, + useUniquePeptide = useUniquePeptide, + removeFewMeasurements = removeFewMeasurements, + removeProtein_with1Feature = removeProtein_with1Feature, + summaryforMultipleRows = summaryforMultipleRows, + use_log_file = use_log_file, + append = append, + verbose = verbose, + log_file_path = path + ) df.lip <- as.data.table(as.matrix(df.lip)) if (!is.null(Trp.data)){ getOption("MSstatsLog")("INFO", "Formatting TrP data..") - df.trp <- SpectronauttoMSstatsFormat(as.data.frame(Trp.data), annotation, - intensity, - filter_with_Qvalue, qvalue_cutoff, - useUniquePeptide, - removeFewMeasurements, - removeProtein_with1Feature, - summaryforMultipleRows, use_log_file, - append, verbose, log_file_path = path, - base) + df.trp <- SpectronauttoMSstatsFormat( + as.data.frame(Trp.data), annotation = annotation, + intensity = intensity, + filter_with_Qvalue = filter_with_Qvalue, + qvalue_cutoff = qvalue_cutoff, + useUniquePeptide = useUniquePeptide, + removeFewMeasurements = removeFewMeasurements, + removeProtein_with1Feature = removeProtein_with1Feature, + summaryforMultipleRows = summaryforMultipleRows, + use_log_file = use_log_file, + append = append, + verbose = verbose, + log_file_path = path + ) df.trp <- as.data.table(as.matrix(df.trp)) } diff --git a/man/MSstatsLiP.Rd b/man/MSstatsLiP.Rd index 0cff40e..b501f94 100644 --- a/man/MSstatsLiP.Rd +++ b/man/MSstatsLiP.Rd @@ -55,11 +55,13 @@ Useful links: } \author{ -\strong{Maintainer}: Devon Kohler \email{kohler.d@northeastern.edu} +\strong{Maintainer}: Anthony Wu \email{wu.anthon@northeastern.edu} Authors: \itemize{ + \item Devon Kohler \email{kohler.d@northeastern.edu} \item Tsung-Heng Tsai \email{tsai.tsungheng@gmail.com} + \item Deril Raju \email{raju.d@northeastern.edu} \item Ting Huang \email{thuang0703@gmail.com} \item Mateusz Staniak \email{mtst@mstaniak.pl} \item Meena Choi \email{mnchoi67@gmail.com} @@ -69,3 +71,4 @@ Authors: } } +\keyword{internal} diff --git a/man/SpectronauttoMSstatsLiPFormat.Rd b/man/SpectronauttoMSstatsLiPFormat.Rd index 86a60a0..10172c2 100644 --- a/man/SpectronauttoMSstatsLiPFormat.Rd +++ b/man/SpectronauttoMSstatsLiPFormat.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/SpectronauttoMSstatsLiPFormat.R \name{SpectronauttoMSstatsLiPFormat} \alias{SpectronauttoMSstatsLiPFormat} -\title{Converts raw LiP MS data from Spectronautt into the format needed for +\title{Converts raw LiP MS data from Spectronaut into the format needed for MSstatsLiP.} \usage{ SpectronauttoMSstatsLiPFormat( @@ -95,7 +95,7 @@ If \code{append = TRUE}, has to be a valid path to a file.} a \code{list} of two \code{data.frames} in MSstatsLiP format } \description{ -Takes as as input both raw LiP and Trp outputs from Spectronautt. +Takes as as input both raw LiP and Trp outputs from Spectronaut. } \examples{ # Output datasets of Spectronaut From d9fde42ade0b00f6f4108b50624af8d70b92a0c2 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 16 Sep 2025 17:43:53 -0400 Subject: [PATCH 2/4] fix spacing --- R/SpectronauttoMSstatsLiPFormat.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/SpectronauttoMSstatsLiPFormat.R b/R/SpectronauttoMSstatsLiPFormat.R index d46c1b3..9bfd006 100644 --- a/R/SpectronauttoMSstatsLiPFormat.R +++ b/R/SpectronauttoMSstatsLiPFormat.R @@ -163,7 +163,8 @@ SpectronauttoMSstatsLiPFormat <- function(LiP.data, getOption("MSstatsLog")("INFO", "Formatting TrP data..") df.trp <- SpectronauttoMSstatsFormat( - as.data.frame(Trp.data), annotation = annotation, + as.data.frame(Trp.data), + annotation = annotation, intensity = intensity, filter_with_Qvalue = filter_with_Qvalue, qvalue_cutoff = qvalue_cutoff, @@ -175,7 +176,7 @@ SpectronauttoMSstatsLiPFormat <- function(LiP.data, append = append, verbose = verbose, log_file_path = path - ) + ) df.trp <- as.data.table(as.matrix(df.trp)) } From ea2f7d236d175edf8b5e842c4b28c9716a2a24ff Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 16 Sep 2025 18:20:24 -0400 Subject: [PATCH 3/4] adjust width and height of plots --- R/dataProcessPlotsLiP.R | 4 ++-- man/dataProcessPlotsLiP.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/dataProcessPlotsLiP.R b/R/dataProcessPlotsLiP.R index 2b333e5..fef33f7 100644 --- a/R/dataProcessPlotsLiP.R +++ b/R/dataProcessPlotsLiP.R @@ -83,8 +83,8 @@ dataProcessPlotsLiP <- function(data, legend.size = 7, dot.size.profile = 2, ncol.guide = 5, - width = 10, - height = 12, + width = 800, + height = 600, lip.title = "All Peptides", protein.title = "All Proteins", which.Peptide = "all", diff --git a/man/dataProcessPlotsLiP.Rd b/man/dataProcessPlotsLiP.Rd index 6106451..57982cf 100644 --- a/man/dataProcessPlotsLiP.Rd +++ b/man/dataProcessPlotsLiP.Rd @@ -16,8 +16,8 @@ dataProcessPlotsLiP( legend.size = 7, dot.size.profile = 2, ncol.guide = 5, - width = 10, - height = 12, + width = 800, + height = 600, lip.title = "All Peptides", protein.title = "All Proteins", which.Peptide = "all", From 553cd9db5ab34aae53bc3f34137321404ed91623 Mon Sep 17 00:00:00 2001 From: tonywu1999 Date: Thu, 18 Sep 2025 17:03:47 -0400 Subject: [PATCH 4/4] Revert "adjust width and height of plots" This reverts commit ea2f7d236d175edf8b5e842c4b28c9716a2a24ff. --- R/dataProcessPlotsLiP.R | 4 ++-- man/dataProcessPlotsLiP.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/dataProcessPlotsLiP.R b/R/dataProcessPlotsLiP.R index fef33f7..2b333e5 100644 --- a/R/dataProcessPlotsLiP.R +++ b/R/dataProcessPlotsLiP.R @@ -83,8 +83,8 @@ dataProcessPlotsLiP <- function(data, legend.size = 7, dot.size.profile = 2, ncol.guide = 5, - width = 800, - height = 600, + width = 10, + height = 12, lip.title = "All Peptides", protein.title = "All Proteins", which.Peptide = "all", diff --git a/man/dataProcessPlotsLiP.Rd b/man/dataProcessPlotsLiP.Rd index 57982cf..6106451 100644 --- a/man/dataProcessPlotsLiP.Rd +++ b/man/dataProcessPlotsLiP.Rd @@ -16,8 +16,8 @@ dataProcessPlotsLiP( legend.size = 7, dot.size.profile = 2, ncol.guide = 5, - width = 800, - height = 600, + width = 10, + height = 12, lip.title = "All Peptides", protein.title = "All Proteins", which.Peptide = "all",