Skip to content

Commit 5fb3892

Browse files
committed
tests(converters): fix spectronaut and metamorpheus tests (#117)
1 parent 8ddfed9 commit 5fb3892

File tree

7 files changed

+638
-627
lines changed

7 files changed

+638
-627
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
@@ -1436,22 +1436,26 @@ SpectronauttoMSstatsPTMFormat = function(
14361436
bracket="[",
14371437
replace_text=TRUE)
14381438

1439-
ptm_input = SpectronauttoMSstatsFormat(input, annotation, intensity,
1440-
filter_with_Qvalue,
1441-
qvalue_cutoff, useUniquePeptide,
1442-
removeFewMeasurements,
1443-
removeProtein_with1Feature,
1444-
summaryforMultipleRows)
1439+
ptm_input = SpectronauttoMSstatsFormat(input, annotation,
1440+
intensity = intensity,
1441+
filter_with_Qvalue = filter_with_Qvalue,
1442+
qvalue_cutoff = qvalue_cutoff,
1443+
useUniquePeptide = useUniquePeptide,
1444+
removeFewMeasurements = removeFewMeasurements,
1445+
removeProtein_with1Feature = removeProtein_with1Feature,
1446+
summaryforMultipleRows = summaryforMultipleRows)
14451447

14461448
msstats_input = list(PTM = ptm_input)
14471449
if (!is.null(protein_input)) {
14481450
protein_input = SpectronauttoMSstatsFormat(protein_input,
1449-
annotation_protein, intensity,
1450-
filter_with_Qvalue,
1451-
qvalue_cutoff, useUniquePeptide,
1452-
removeFewMeasurements,
1453-
removeProtein_with1Feature,
1454-
summaryforMultipleRows)
1451+
annotation_protein,
1452+
intensity = intensity,
1453+
filter_with_Qvalue = filter_with_Qvalue,
1454+
qvalue_cutoff = qvalue_cutoff,
1455+
useUniquePeptide = useUniquePeptide,
1456+
removeFewMeasurements = removeFewMeasurements,
1457+
removeProtein_with1Feature = removeProtein_with1Feature,
1458+
summaryforMultipleRows = summaryforMultipleRows)
14551459

14561460
msstats_input = list(PTM = ptm_input, PROTEIN = protein_input)
14571461
}
@@ -1584,28 +1588,28 @@ MetamorpheusToMSstatsPTMFormat = function(input,
15841588

15851589
ptm_input = MetamorpheusToMSstatsFormat(input,
15861590
annotation,
1587-
useUniquePeptide,
1588-
removeFewMeasurements,
1589-
removeProtein_with1Feature,
1590-
summaryforMultipleRows,
1591-
use_log_file,
1592-
append,
1593-
verbose,
1594-
log_file_path)
1591+
useUniquePeptide = useUniquePeptide,
1592+
removeFewMeasurements = removeFewMeasurements,
1593+
removeProtein_with1Feature = removeProtein_with1Feature,
1594+
summaryforMultipleRows = summaryforMultipleRows,
1595+
use_log_file = use_log_file,
1596+
append = append,
1597+
verbose = verbose,
1598+
log_file_path = log_file_path)
15951599

15961600
msstats_format = list(PTM = ptm_input, PROTEIN = NULL)
15971601

15981602
if (!is.null(input_protein)) {
15991603
protein_input = MetamorpheusToMSstatsFormat(input_protein,
16001604
annotation_protein,
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
ptm_input = ptm_input[grepl(mod_id, ptm_input$PeptideSequence),]
16111615

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)