Skip to content

Commit a2f5646

Browse files
committed
Parse condition and replicate from the sample for TMT data.
1 parent 52eeafb commit a2f5646

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

MSFragger-GUI/src/com/dmtavt/fragpipe/cmd/CmdLabelquant.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,18 @@ public boolean configure(Component comp, boolean isDryRun, UsageTrigger phi, Str
171171
if (parts[1].trim().equalsIgnoreCase("na")) {
172172
continue;
173173
}
174-
bufferedWriter.write(e.getKey().name + "\t" + parts[0].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t\t1\n");
174+
String[] parts2 = parts[1].trim().split("_");
175+
if (parts2.length == 2) {
176+
int replicate = 1;
177+
try {
178+
replicate = Integer.parseInt(parts2[1]);
179+
bufferedWriter.write(e.getKey().name + "\t" + parts[0].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t" + parts2[0].trim() + "\t" + replicate + "\n");
180+
} catch (NumberFormatException ex) {
181+
bufferedWriter.write(e.getKey().name + "\t" + parts[0].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t1\n");
182+
}
183+
} else {
184+
bufferedWriter.write(e.getKey().name + "\t" + parts[0].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t" + parts[1].trim() + "\t1\n");
185+
}
175186
}
176187
}
177188
bufferedReader.close();

0 commit comments

Comments
 (0)