Skip to content

Commit 42627ab

Browse files
authored
fix(diann): Add q-value filtering to DIANN big clean function (#11)
1 parent 2be67e0 commit 42627ab

6 files changed

Lines changed: 69 additions & 11 deletions

File tree

.github/.DS_Store

6 KB
Binary file not shown.

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Motivation and Context
2+
3+
Please include relevant motivation and context of the problem along with a short summary of the solution.
4+
5+
## Changes
6+
7+
Please provide a detailed bullet point list of your changes.
8+
9+
-
10+
11+
## Testing
12+
13+
Please describe any unit tests you added or modified to verify your changes.
14+
15+
## Checklist Before Requesting a Review
16+
- [ ] I have read the MSstats [contributing guidelines](https://github.com/Vitek-Lab/MSstatsConvert/blob/master/.github/CONTRIBUTING.md)
17+
- [ ] My changes generate no new warnings
18+
- [ ] Any dependent changes have been merged and published in downstream modules
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Dry runs for PRs
2+
on:
3+
pull_request:
4+
branches: [devel]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
- name: Setup R and Bioconductor
12+
uses: grimbough/bioc-actions/setup-bioc@v1
13+
with:
14+
bioc-version: devel
15+
- name: Install dependencies
16+
uses: r-lib/actions/setup-r-dependencies@v2
17+
- name: Build, Install, Check
18+
uses: grimbough/bioc-actions/build-install-check@v1
19+

R/clean_DIANN.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ cleanDIANNChunk = function(input, output_path, MBR, quantificationColumn, pos,
4949
qvalue_cutoff = 0.01,
5050
pg_qvalue_cutoff = 0.01) {
5151
input = MSstatsImport(list(input = input),
52-
"MSstats", "DIANN")
52+
"MSstats", "DIANN")
5353
input = MSstatsClean(
54-
input, MBR, quantificationColumn
55-
#Todo: Add , global_qvalue_cutoff, qvalue_cutoff, pg_qvalue_cutoff params
54+
input,
55+
MBR = MBR,
56+
quantificationColumn = quantificationColumn,
57+
global_qvalue_cutoff = global_qvalue_cutoff,
58+
qvalue_cutoff = qvalue_cutoff,
59+
pg_qvalue_cutoff = pg_qvalue_cutoff
5660
)
5761
.writeChunkToFile(input, output_path, pos)
5862
NULL

R/converters.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ bigSpectronauttoMSstatsFormat <- function(input_file, output_file_name,
158158
#' Convert out-of-memory DIANN files to MSstats format.
159159
#'
160160
#' @inheritParams MSstatsPreprocessBig
161-
#' @param MBR True if analysis was done with match between runs.
162-
#' @param quantificationColumn Use 'FragmentQuantCorrected'(default) column for quantified intensities for DIANN 1.8.x.
163-
#' Use 'FragmentQuantRaw' for quantified intensities for DIANN 1.9.x.
164-
#' Use 'auto' for quantified intensities for DIANN 2.0+
161+
#' @inheritParams MSstatsConvert::DIANNtoMSstatsFormat
165162
#'
166163
#' @export
167164
#'
@@ -173,6 +170,9 @@ bigDIANNtoMSstatsFormat <- function(input_file,
173170
backend,
174171
MBR = TRUE,
175172
quantificationColumn = "FragmentQuantCorrected",
173+
global_qvalue_cutoff = 0.01,
174+
qvalue_cutoff = 0.01,
175+
pg_qvalue_cutoff = 0.01,
176176
max_feature_count = 100,
177177
filter_unique_peptides = FALSE,
178178
aggregate_psms = FALSE,
@@ -186,7 +186,8 @@ bigDIANNtoMSstatsFormat <- function(input_file,
186186
reduceBigDIANN(input_file,
187187
paste0("reduce_output_", output_file_name),
188188
MBR,
189-
quantificationColumn)
189+
quantificationColumn,
190+
global_qvalue_cutoff, qvalue_cutoff, pg_qvalue_cutoff)
190191

191192
# Preprocess the cleaned data (feature selection, etc.)
192193
msstats_data <- MSstatsPreprocessBig(

man/bigDIANNtoMSstatsFormat.Rd

Lines changed: 19 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)