Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/MSstatsPTM.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
#' analysis and summarization
#' }
#'
#' @docType package
#' @name MSstatsPTM
NULL
#' @keywords internal
"_PACKAGE"
60 changes: 32 additions & 28 deletions R/converters.R
Original file line number Diff line number Diff line change
Expand Up @@ -1450,22 +1450,26 @@ SpectronauttoMSstatsPTMFormat = function(
bracket="[",
replace_text=TRUE)

ptm_input = SpectronauttoMSstatsFormat(input, annotation, intensity,
filter_with_Qvalue,
qvalue_cutoff, useUniquePeptide,
removeFewMeasurements,
removeProtein_with1Feature,
summaryforMultipleRows)
ptm_input = SpectronauttoMSstatsFormat(input, annotation,
intensity = intensity,
filter_with_Qvalue = filter_with_Qvalue,
qvalue_cutoff = qvalue_cutoff,
useUniquePeptide = useUniquePeptide,
removeFewMeasurements = removeFewMeasurements,
removeProtein_with1Feature = removeProtein_with1Feature,
summaryforMultipleRows = summaryforMultipleRows)

msstats_input = list(PTM = ptm_input)
if (!is.null(protein_input)) {
protein_input = SpectronauttoMSstatsFormat(protein_input,
annotation_protein, intensity,
filter_with_Qvalue,
qvalue_cutoff, useUniquePeptide,
removeFewMeasurements,
removeProtein_with1Feature,
summaryforMultipleRows)
annotation_protein,
intensity = intensity,
filter_with_Qvalue = filter_with_Qvalue,
qvalue_cutoff = qvalue_cutoff,
useUniquePeptide = useUniquePeptide,
removeFewMeasurements = removeFewMeasurements,
removeProtein_with1Feature = removeProtein_with1Feature,
summaryforMultipleRows = summaryforMultipleRows)

msstats_input = list(PTM = ptm_input, PROTEIN = protein_input)
}
Expand Down Expand Up @@ -1598,28 +1602,28 @@ MetamorpheusToMSstatsPTMFormat = function(input,

ptm_input = MetamorpheusToMSstatsFormat(input,
annotation,
useUniquePeptide,
removeFewMeasurements,
removeProtein_with1Feature,
summaryforMultipleRows,
use_log_file,
append,
verbose,
log_file_path)
useUniquePeptide = useUniquePeptide,
removeFewMeasurements = removeFewMeasurements,
removeProtein_with1Feature = removeProtein_with1Feature,
summaryforMultipleRows = summaryforMultipleRows,
use_log_file = use_log_file,
append = append,
verbose = verbose,
log_file_path = log_file_path)

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

if (!is.null(input_protein)) {
protein_input = MetamorpheusToMSstatsFormat(input_protein,
annotation_protein,
useUniquePeptide,
removeFewMeasurements,
removeProtein_with1Feature,
summaryforMultipleRows,
use_log_file,
append,
verbose,
log_file_path)
useUniquePeptide = useUniquePeptide,
removeFewMeasurements = removeFewMeasurements,
removeProtein_with1Feature = removeProtein_with1Feature,
summaryforMultipleRows = summaryforMultipleRows,
use_log_file = use_log_file,
append = append,
verbose = verbose,
log_file_path = log_file_path)

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

Expand Down
13 changes: 8 additions & 5 deletions R/utils_converters.R
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,14 @@ MSstatsPTMSiteLocator = function(data,

return(data)
}
#' Add site location and aa
#' @param data data.table
#' @param fasta_file string or data.table
#' @return data.table
#' @keywords internal

#' Fix terminus location adjustments
#' @param data data.table containing peptide data
#' @param terminus_id character string identifying the terminus
#' (e.g. N-terminus)
#' @param unmod_pep_col character string specifying the column name containing
#' unmodified peptide sequences
#' @return data.table with corrected Start positions
.fixTerminus = function(data, terminus_id, unmod_pep_col){

## Terminus makes start location off
Expand Down
Loading
Loading