-
Notifications
You must be signed in to change notification settings - Fork 2
fix(spectronaut): Fix spectronaut converter to account for anomaly detection updates #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,6 @@ | |
| #' coverage. | ||
| #' } | ||
| #' | ||
| #' @docType package | ||
| #' @name MSstatsLiP | ||
| NULL | ||
| #' @keywords internal | ||
| "_PACKAGE" | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -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,40 @@ 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 | ||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
|
Comment on lines
+167
to
+180
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Repeat the same fix for TrP path. Avoid character coercion for TrP as well. - df.trp <- as.data.table(as.matrix(df.trp))
+ df.trp <- as.data.table(df.trp)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
| df.trp <- as.data.table(as.matrix(df.trp)) | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: as.matrix coerces all columns to character; breaks downstream numeric ops.
as.data.table(as.matrix(df.lip))converts numerics (e.g., Intensity) to character, making<= 1comparisons and merges unreliable.Apply:
📝 Committable suggestion
🤖 Prompt for AI Agents