@@ -120,7 +120,7 @@ output_pxd_dt = data.table::as.data.table(output_pxd)
120120
121121# Basic structure
122122expect_equal(ncol(output_pxd ), 11 )
123- expect_equal(nrow(output_pxd ), 20400 )
123+ expect_equal(nrow(output_pxd ), 23568 )
124124expect_true(" Run" %in% colnames(output_pxd ))
125125expect_true(" ProteinName" %in% colnames(output_pxd ))
126126expect_true(" PeptideSequence" %in% colnames(output_pxd ))
@@ -136,17 +136,17 @@ expect_true("Fraction" %in% colnames(output_pxd))
136136# Channel path used: H/L/NA counts, no "Light" default
137137expect_false(" Light" %in% output_pxd $ IsotopeLabelType )
138138pxd_label_counts = table(output_pxd $ IsotopeLabelType , useNA = " ifany" )
139- expect_equal(unname(pxd_label_counts [" H" ]), 8712L )
140- expect_equal(unname(pxd_label_counts [" L" ]), 8712L )
141- expect_equal(sum(is.na(output_pxd $ IsotopeLabelType )), 2976L )
139+ expect_equal(unname(pxd_label_counts [" H" ]), 9720L )
140+ expect_equal(unname(pxd_label_counts [" L" ]), 9720L )
141+ expect_equal(sum(is.na(output_pxd $ IsotopeLabelType )), 4128L )
142142
143143# Channel path does NOT strip (SILAC) from PeptideSequence — that notation is
144144# part of the peptide identity in this format, not a label indicator
145145expect_true(any(grepl(" (SILAC)" , output_pxd $ PeptideSequence , fixed = TRUE )))
146146
147147# Unlabeled peptides (no K, no SILAC) get NA IsotopeLabelType
148- pxd_unlabeled = output_pxd_dt [PeptideSequence %in% c(" AVLEEAEFQR " , " DDEGLYTLR " ,
149- " DTELAEELLQWFLQEEK " )]
148+ pxd_unlabeled = output_pxd_dt [PeptideSequence %in% c(" AAATFNPELITHILDGSPENTR " , " AAASLDTAALSATDMALALNR " ,
149+ " AIMHHEGHMDDGLNLSR " )]
150150expect_true(all(is.na(pxd_unlabeled $ IsotopeLabelType )))
151151
152152# Annotation maps correctly to all three timepoint conditions
@@ -156,27 +156,19 @@ expect_true("32 days" %in% output_pxd$Condition)
156156run_0d = " 20210805_BoxCarmax1st_wideMS1_JM_pSIL_pro_heart_0d_1"
157157expect_equal(as.character(unique(output_pxd_dt [Run == run_0d , Condition ])), " 0 day" )
158158
159- # Heavy fragment intensities match Fr.N.Quantity from the Channel = "H" input row.
160- # Input: AFMTADLPNELIELLEK(SILAC)(SILAC)(SILAC), Run 32d_1, Channel H has
161- # Fr.0.Quantity = 662450.1 (largest fragment — should be the max output intensity)
162- h_pxd_pep = " AFMTADLPNELIELLEK(SILAC)(SILAC)(SILAC)"
159+ h_pxd_pep = " TAFDDAIAELDTLNEDSYK(SILAC)(SILAC)(SILAC)"
163160h_pxd_run = " 20210805_BoxCarmax2nd_wideMS1_JM_pSIL_pro_heart_32d_1"
164161h_pxd_ints = output_pxd_dt [PeptideSequence == h_pxd_pep &
165162 IsotopeLabelType == " H" &
166163 Run == h_pxd_run , Intensity ]
167- expect_equal(max(h_pxd_ints , na.rm = TRUE ), 662450.1 , tolerance = 1 )
164+ expect_equal(max(h_pxd_ints , na.rm = TRUE ), 2453057.5 , tolerance = 1 )
168165
169- # Light fragment intensities match Fr.N.Quantity from the Channel = "L" input row.
170- # Input: APVYSGSSPVSGYFVDFK(SILAC)(SILAC)(SILAC)EEDSGEWK(SILAC)(SILAC)(SILAC),
171- # Run 32d_2, Channel L has Fr.1.Quantity = 116961.9 (largest fragment)
172- l_pxd_pep = " APVYSGSSPVSGYFVDFK(SILAC)(SILAC)(SILAC)EEDSGEWK(SILAC)(SILAC)(SILAC)"
173- l_pxd_run = " 20210805_BoxCarmax1st_wideMS1_JM_pSIL_pro_heart_32d_2"
166+ l_pxd_pep = " TAFDDAIAELDTLNEDSYK(SILAC)(SILAC)(SILAC)"
167+ l_pxd_run = " 20210805_BoxCarmax2nd_wideMS1_JM_pSIL_pro_heart_0d_1"
174168l_pxd_ints = output_pxd_dt [PeptideSequence == l_pxd_pep &
175169 IsotopeLabelType == " L" &
176170 Run == l_pxd_run , Intensity ]
177- expect_equal(max(l_pxd_ints , na.rm = TRUE ), 116961.9 , tolerance = 1 )
178- # Fr.0.Quantity = 4973.411 also appears in the output
179- expect_true(any(abs(l_pxd_ints - 4973.411 ) < 1 , na.rm = TRUE ))
171+ expect_equal(max(l_pxd_ints , na.rm = TRUE ), 4686039.5 , tolerance = 1 )
180172
181173# Test DIANNtoMSstatsFormat ---------------------------
182174input_file_path = system.file(" tinytest/raw_data/DIANN/diann_input.tsv" , package = " MSstatsConvert" )
0 commit comments