Skip to content

Commit 9999a56

Browse files
committed
updates column classes for TMT output
1 parent 8cf79ab commit 9999a56

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

R/utils_dt_operations.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
#' @return data.table
9292
#' @keywords internal
9393
.selectMSstatsColumns = function(input) {
94+
Condition = NULL
95+
9496
standard_columns = c("ProteinName", "PeptideSequence",
9597
"PeptideModifiedSequence", "PrecursorCharge",
9698
"FragmentIon", "ProductCharge", "IsotopeLabelType",
@@ -103,6 +105,14 @@
103105

104106
if (is.element("Channel", colnames(input))) {
105107
cols = standard_columns_tmt
108+
character_cols = c("ProteinName", "PeptideSequence", "PrecursorCharge",
109+
"PSM", "Mixture", "TechRepMixture", "Run",
110+
"Channel", "BioReplicate")
111+
input[, c("ProteinName", "PeptideSequence", "PrecursorCharge",
112+
"PSM", "Mixture", "TechRepMixture", "Run",
113+
"Channel", "BioReplicate") := lapply(.SD, as.character),
114+
.SDcols = character_cols]
115+
input[, Condition := factor(as.character(Condition))]
106116
} else {
107117
cols = standard_columns
108118
}

0 commit comments

Comments
 (0)