Skip to content

Commit 9e90408

Browse files
authored
tests(converters): fix spectronaut and metamorpheus tests (#117)
1 parent 243a336 commit 9e90408

File tree

8 files changed

+649
-638
lines changed

8 files changed

+649
-638
lines changed

R/MSstatsPTM.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
#' analysis and summarization
4646
#' }
4747
#'
48-
#' @docType package
4948
#' @name MSstatsPTM
50-
NULL
49+
#' @keywords internal
50+
"_PACKAGE"

R/converters.R

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,22 +1450,26 @@ SpectronauttoMSstatsPTMFormat = function(
14501450
bracket="[",
14511451
replace_text=TRUE)
14521452

1453-
ptm_input = SpectronauttoMSstatsFormat(input, annotation, intensity,
1454-
filter_with_Qvalue,
1455-
qvalue_cutoff, useUniquePeptide,
1456-
removeFewMeasurements,
1457-
removeProtein_with1Feature,
1458-
summaryforMultipleRows)
1453+
ptm_input = SpectronauttoMSstatsFormat(input, annotation,
1454+
intensity = intensity,
1455+
filter_with_Qvalue = filter_with_Qvalue,
1456+
qvalue_cutoff = qvalue_cutoff,
1457+
useUniquePeptide = useUniquePeptide,
1458+
removeFewMeasurements = removeFewMeasurements,
1459+
removeProtein_with1Feature = removeProtein_with1Feature,
1460+
summaryforMultipleRows = summaryforMultipleRows)
14591461

14601462
msstats_input = list(PTM = ptm_input)
14611463
if (!is.null(protein_input)) {
14621464
protein_input = SpectronauttoMSstatsFormat(protein_input,
1463-
annotation_protein, intensity,
1464-
filter_with_Qvalue,
1465-
qvalue_cutoff, useUniquePeptide,
1466-
removeFewMeasurements,
1467-
removeProtein_with1Feature,
1468-
summaryforMultipleRows)
1465+
annotation_protein,
1466+
intensity = intensity,
1467+
filter_with_Qvalue = filter_with_Qvalue,
1468+
qvalue_cutoff = qvalue_cutoff,
1469+
useUniquePeptide = useUniquePeptide,
1470+
removeFewMeasurements = removeFewMeasurements,
1471+
removeProtein_with1Feature = removeProtein_with1Feature,
1472+
summaryforMultipleRows = summaryforMultipleRows)
14691473

14701474
msstats_input = list(PTM = ptm_input, PROTEIN = protein_input)
14711475
}
@@ -1598,28 +1602,28 @@ MetamorpheusToMSstatsPTMFormat = function(input,
15981602

15991603
ptm_input = MetamorpheusToMSstatsFormat(input,
16001604
annotation,
1601-
useUniquePeptide,
1602-
removeFewMeasurements,
1603-
removeProtein_with1Feature,
1604-
summaryforMultipleRows,
1605-
use_log_file,
1606-
append,
1607-
verbose,
1608-
log_file_path)
1605+
useUniquePeptide = useUniquePeptide,
1606+
removeFewMeasurements = removeFewMeasurements,
1607+
removeProtein_with1Feature = removeProtein_with1Feature,
1608+
summaryforMultipleRows = summaryforMultipleRows,
1609+
use_log_file = use_log_file,
1610+
append = append,
1611+
verbose = verbose,
1612+
log_file_path = log_file_path)
16091613

16101614
msstats_format = list(PTM = ptm_input, PROTEIN = NULL)
16111615

16121616
if (!is.null(input_protein)) {
16131617
protein_input = MetamorpheusToMSstatsFormat(input_protein,
16141618
annotation_protein,
1615-
useUniquePeptide,
1616-
removeFewMeasurements,
1617-
removeProtein_with1Feature,
1618-
summaryforMultipleRows,
1619-
use_log_file,
1620-
append,
1621-
verbose,
1622-
log_file_path)
1619+
useUniquePeptide = useUniquePeptide,
1620+
removeFewMeasurements = removeFewMeasurements,
1621+
removeProtein_with1Feature = removeProtein_with1Feature,
1622+
summaryforMultipleRows = summaryforMultipleRows,
1623+
use_log_file = use_log_file,
1624+
append = append,
1625+
verbose = verbose,
1626+
log_file_path = log_file_path)
16231627

16241628
ptm_input = ptm_input[grepl(mod_id, ptm_input$PeptideSequence),]
16251629

R/utils_converters.R

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,14 @@ MSstatsPTMSiteLocator = function(data,
609609

610610
return(data)
611611
}
612-
#' Add site location and aa
613-
#' @param data data.table
614-
#' @param fasta_file string or data.table
615-
#' @return data.table
616-
#' @keywords internal
612+
613+
#' Fix terminus location adjustments
614+
#' @param data data.table containing peptide data
615+
#' @param terminus_id character string identifying the terminus
616+
#' (e.g. N-terminus)
617+
#' @param unmod_pep_col character string specifying the column name containing
618+
#' unmodified peptide sequences
619+
#' @return data.table with corrected Start positions
617620
.fixTerminus = function(data, terminus_id, unmod_pep_col){
618621

619622
## Terminus makes start location off

0 commit comments

Comments
 (0)