Skip to content

Commit ef3cd0c

Browse files
committed
Separate defaults for Report Filter for Open/Closed
1 parent e4b6167 commit ef3cd0c

File tree

5 files changed

+109
-30
lines changed

5 files changed

+109
-30
lines changed

MSFragger-GUI/src/umich/msfragger/Version.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @author Dmitry Avtonomov
2121
*/
2222
public class Version {
23-
public static final String version = "v2.1";
23+
public static final String version = "v2.2";
2424

2525
public static String getVersion() {
2626
return version;

MSFragger-GUI/src/umich/msfragger/gui/Bundle.properties

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ default.philosopher.win=philosopher_windows_amd64.exe
99
default.philosopher.nix=philosopher_linux_amd64
1010
comet.cmd.line.opts=
1111
proteinprophet.cmd.line.opts.closed=
12-
proteinprophet.cmd.line.opts.open=--excludemods
12+
proteinprophet.cmd.line.opts.open=--maxppmdiff 20.0
1313
peptideprophet.cmd.line.opts.closed=--nonparam --expectscore --accmass --decoy rev --decoyprobs
14-
peptideprophet.cmd.line.opts.open=--nonparam --expectscore --decoy rev --decoyprobs
14+
peptideprophet.cmd.line.opts.open=--nonparam --expectscore --decoy rev --decoyprobs --masswidth 500.0
15+
report.filter.closed=
16+
report.filter.open=--mapmods
1517
default.prot.xml.filename=interact.prot.xml

MSFragger-GUI/src/umich/msfragger/gui/MsfraggerGuiFrame.form

+33-8
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,10 @@
10191019
<Group type="103" groupAlignment="0" attributes="0">
10201020
<Group type="102" attributes="0">
10211021
<Component id="checkCreateReport" min="-2" max="-2" attributes="0"/>
1022-
<EmptySpace min="0" pref="531" max="32767" attributes="0"/>
1022+
<EmptySpace max="32767" attributes="0"/>
1023+
<Component id="btnReportDefaultsOpen" min="-2" max="-2" attributes="0"/>
1024+
<EmptySpace max="-2" attributes="0"/>
1025+
<Component id="btnReportDefaultsClosed" min="-2" max="-2" attributes="0"/>
10231026
</Group>
10241027
<Component id="jPanel1" max="32767" attributes="0"/>
10251028
</Group>
@@ -1031,10 +1034,16 @@
10311034
<Group type="103" groupAlignment="0" attributes="0">
10321035
<Group type="102" alignment="0" attributes="0">
10331036
<EmptySpace max="-2" attributes="0"/>
1034-
<Component id="checkCreateReport" min="-2" max="-2" attributes="0"/>
1035-
<EmptySpace type="unrelated" max="-2" attributes="0"/>
1037+
<Group type="103" groupAlignment="0" attributes="0">
1038+
<Component id="checkCreateReport" min="-2" max="-2" attributes="0"/>
1039+
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
1040+
<Component id="btnReportDefaultsClosed" alignment="3" min="-2" max="-2" attributes="0"/>
1041+
<Component id="btnReportDefaultsOpen" alignment="3" min="-2" max="-2" attributes="0"/>
1042+
</Group>
1043+
</Group>
1044+
<EmptySpace max="-2" attributes="0"/>
10361045
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
1037-
<EmptySpace pref="439" max="32767" attributes="0"/>
1046+
<EmptySpace pref="436" max="32767" attributes="0"/>
10381047
</Group>
10391048
</Group>
10401049
</DimensionLayout>
@@ -1060,7 +1069,7 @@
10601069
</Group>
10611070
<EmptySpace type="unrelated" max="-2" attributes="0"/>
10621071
<Group type="103" groupAlignment="0" attributes="0">
1063-
<Component id="textReportDbAnnotate" max="32767" attributes="0"/>
1072+
<Component id="textReportDbAnnotate" pref="461" max="32767" attributes="0"/>
10641073
<Component id="textReportFilter" max="32767" attributes="0"/>
10651074
</Group>
10661075
<EmptySpace max="-2" attributes="0"/>
@@ -1108,14 +1117,14 @@
11081117
</Component>
11091118
<Component class="javax.swing.JTextField" name="textReportFilter">
11101119
<Properties>
1111-
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
1112-
<Connection code="getDefaultTextReportFilter()" type="code"/>
1113-
</Property>
11141120
<Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;Additional flags for Philosopher&lt;br/&gt;&#xa;--pepxml path-to-pepxml --protxml path-to-combined-protxml&lt;br/&gt;&#xa;will be added automatically based on previous tabs."/>
11151121
</Properties>
11161122
<Events>
11171123
<EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="textReportFilterFocusLost"/>
11181124
</Events>
1125+
<AuxValues>
1126+
<AuxValue name="JavaCodeGenerator_allCodePost" type="java.lang.String" value="loadLastReportFilter();"/>
1127+
</AuxValues>
11191128
</Component>
11201129
</SubComponents>
11211130
</Container>
@@ -1126,6 +1135,22 @@
11261135
<Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;Create tab separated report files with &#xa;some statistics about search results."/>
11271136
</Properties>
11281137
</Component>
1138+
<Component class="javax.swing.JButton" name="btnReportDefaultsClosed">
1139+
<Properties>
1140+
<Property name="text" type="java.lang.String" value="Defaults Closed Search"/>
1141+
</Properties>
1142+
<Events>
1143+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnReportDefaultsClosedActionPerformed"/>
1144+
</Events>
1145+
</Component>
1146+
<Component class="javax.swing.JButton" name="btnReportDefaultsOpen">
1147+
<Properties>
1148+
<Property name="text" type="java.lang.String" value="Defaults Open Search"/>
1149+
</Properties>
1150+
<Events>
1151+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnReportDefaultsOpenActionPerformed"/>
1152+
</Events>
1153+
</Component>
11291154
</SubComponents>
11301155
</Container>
11311156
<Container class="javax.swing.JPanel" name="panelRun">

MSFragger-GUI/src/umich/msfragger/gui/MsfraggerGuiFrame.java

+70-18
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ public class MsfraggerGuiFrame extends javax.swing.JFrame {
108108
SimpleETable tableRawFiles;
109109
SimpleUniqueTableModel<Path> tableModelRawFiles;
110110
FileDrop tableRawFilesFileDrop;
111+
112+
public static final SearchTypeProp DEFAULT_TYPE = SearchTypeProp.open;
111113

112114
/**
113115
* Creates new form UmpireUnargetedDbSearchPanel
@@ -311,6 +313,8 @@ private void initComponents() {
311313
checkReportFilter = new javax.swing.JCheckBox();
312314
textReportFilter = new javax.swing.JTextField();
313315
checkCreateReport = new javax.swing.JCheckBox();
316+
btnReportDefaultsClosed = new javax.swing.JButton();
317+
btnReportDefaultsOpen = new javax.swing.JButton();
314318
panelRun = new javax.swing.JPanel();
315319
btnStop = new javax.swing.JButton();
316320
btnClearConsole = new javax.swing.JButton();
@@ -955,7 +959,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
955959
checkReportFilter.setSelected(true);
956960
checkReportFilter.setText("Filter");
957961

958-
textReportFilter.setText(getDefaultTextReportFilter());
959962
textReportFilter.setToolTipText("<html>Additional flags for Philosopher<br/>\n--pepxml path-to-pepxml --protxml path-to-combined-protxml<br/>\nwill be added automatically based on previous tabs.");
960963
textReportFilter.addFocusListener(new java.awt.event.FocusAdapter() {
961964
public void focusLost(java.awt.event.FocusEvent evt) {
@@ -974,7 +977,7 @@ public void focusLost(java.awt.event.FocusEvent evt) {
974977
.addComponent(checkReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
975978
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
976979
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
977-
.addComponent(textReportDbAnnotate)
980+
.addComponent(textReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)
978981
.addComponent(textReportFilter))
979982
.addContainerGap())
980983
);
@@ -992,10 +995,26 @@ public void focusLost(java.awt.event.FocusEvent evt) {
992995
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
993996
);
994997

998+
loadLastReportFilter();
999+
9951000
checkCreateReport.setSelected(true);
9961001
checkCreateReport.setText("Create report");
9971002
checkCreateReport.setToolTipText("<html>Create tab separated report files with \nsome statistics about search results.");
9981003

1004+
btnReportDefaultsClosed.setText("Defaults Closed Search");
1005+
btnReportDefaultsClosed.addActionListener(new java.awt.event.ActionListener() {
1006+
public void actionPerformed(java.awt.event.ActionEvent evt) {
1007+
btnReportDefaultsClosedActionPerformed(evt);
1008+
}
1009+
});
1010+
1011+
btnReportDefaultsOpen.setText("Defaults Open Search");
1012+
btnReportDefaultsOpen.addActionListener(new java.awt.event.ActionListener() {
1013+
public void actionPerformed(java.awt.event.ActionEvent evt) {
1014+
btnReportDefaultsOpenActionPerformed(evt);
1015+
}
1016+
});
1017+
9991018
javax.swing.GroupLayout panelReportLayout = new javax.swing.GroupLayout(panelReport);
10001019
panelReport.setLayout(panelReportLayout);
10011020
panelReportLayout.setHorizontalGroup(
@@ -1005,18 +1024,25 @@ public void focusLost(java.awt.event.FocusEvent evt) {
10051024
.addGroup(panelReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10061025
.addGroup(panelReportLayout.createSequentialGroup()
10071026
.addComponent(checkCreateReport)
1008-
.addGap(0, 531, Short.MAX_VALUE))
1027+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1028+
.addComponent(btnReportDefaultsOpen)
1029+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1030+
.addComponent(btnReportDefaultsClosed))
10091031
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
10101032
.addContainerGap())
10111033
);
10121034
panelReportLayout.setVerticalGroup(
10131035
panelReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
10141036
.addGroup(panelReportLayout.createSequentialGroup()
10151037
.addContainerGap()
1016-
.addComponent(checkCreateReport)
1017-
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
1038+
.addGroup(panelReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1039+
.addComponent(checkCreateReport)
1040+
.addGroup(panelReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1041+
.addComponent(btnReportDefaultsClosed)
1042+
.addComponent(btnReportDefaultsOpen)))
1043+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
10181044
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1019-
.addContainerGap(439, Short.MAX_VALUE))
1045+
.addContainerGap(436, Short.MAX_VALUE))
10201046
);
10211047

10221048
tabPane.addTab("Report", null, panelReport, "");
@@ -1945,11 +1971,14 @@ private void btnLoadDefaultsOpenActionPerformed(java.awt.event.ActionEvent evt)
19451971
"Are you sure you want to load defaults for open search?\n"
19461972
+ "It's a search with large precursor mass tolerance\n"
19471973
+ "usually used to identify PTMs.\n"
1948-
+ "Will update parameters for MSFragger and both Prophets.", "Confirmation", JOptionPane.OK_CANCEL_OPTION);
1974+
+ "Will update parameters for MSFragger, both Prophets\n"
1975+
+ "and Report Filter.", "Confirmation", JOptionPane.OK_CANCEL_OPTION);
19491976
if (JOptionPane.OK_OPTION == confirmation) {
19501977
fraggerPanel.loadDefaultsOpen();
1951-
loadDefaultsPeptideProphet(MsfraggerGuiFrame.SearchTypeProp.open);
1952-
loadDefaultsProteinProphet(MsfraggerGuiFrame.SearchTypeProp.open);
1978+
MsfraggerGuiFrame.SearchTypeProp type = MsfraggerGuiFrame.SearchTypeProp.open;
1979+
loadDefaultsPeptideProphet(type);
1980+
loadDefaultsProteinProphet(type);
1981+
loadDefaultsReportFilter(type);
19531982
}
19541983
}//GEN-LAST:event_btnLoadDefaultsOpenActionPerformed
19551984

@@ -1958,11 +1987,14 @@ private void btnLoadDefaultsClosedActionPerformed(java.awt.event.ActionEvent evt
19581987
"Are you sure you want to load defaults for open search?\n"
19591988
+ "It's a search with large precursor mass tolerance\n"
19601989
+ "usually used to identify PTMs.\n"
1961-
+ "Will update parameters for MSFragger and both Prophets.", "Confirmation", JOptionPane.OK_CANCEL_OPTION);
1990+
+ "Will update parameters for MSFragger, both Prophets\n"
1991+
+ "and Report Filter.", "Confirmation", JOptionPane.OK_CANCEL_OPTION);
19621992
if (JOptionPane.OK_OPTION == confirmation) {
19631993
fraggerPanel.loadDefaultsClosed();
1964-
loadDefaultsPeptideProphet(MsfraggerGuiFrame.SearchTypeProp.closed);
1965-
loadDefaultsProteinProphet(MsfraggerGuiFrame.SearchTypeProp.closed);
1994+
MsfraggerGuiFrame.SearchTypeProp type = MsfraggerGuiFrame.SearchTypeProp.closed;
1995+
loadDefaultsPeptideProphet(type);
1996+
loadDefaultsProteinProphet(type);
1997+
loadDefaultsReportFilter(type);
19661998
}
19671999
}//GEN-LAST:event_btnLoadDefaultsClosedActionPerformed
19682000

@@ -2000,6 +2032,14 @@ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
20002032
btnAboutActionPerformed(null);
20012033
}//GEN-LAST:event_jButton1ActionPerformed
20022034

2035+
private void btnReportDefaultsClosedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportDefaultsClosedActionPerformed
2036+
loadDefaultsReportFilter(SearchTypeProp.closed);
2037+
}//GEN-LAST:event_btnReportDefaultsClosedActionPerformed
2038+
2039+
private void btnReportDefaultsOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReportDefaultsOpenActionPerformed
2040+
loadDefaultsReportFilter(SearchTypeProp.open);
2041+
}//GEN-LAST:event_btnReportDefaultsOpenActionPerformed
2042+
20032043
public void loadLastPeptideProphet() {
20042044
String val = ThisAppProps.load(ThisAppProps.PROP_TEXT_CMD_PEPTIDE_PROPHET);
20052045
if (val != null) {
@@ -2035,13 +2075,23 @@ public void loadDefaultsProteinProphet(SearchTypeProp type) {
20352075
txtProteinProphetCmdLineOpts.setText(val);
20362076
ThisAppProps.save(ThisAppProps.PROP_TEXT_CMD_PROTEIN_PROPHET, val);
20372077
}
2038-
2039-
private String getDefaultTextReportFilter() {
2078+
2079+
private void loadLastReportFilter() {
20402080
String val = ThisAppProps.load(ThisAppProps.PROP_TEXTFIELD_REPORT_FILTER);
2041-
if (StringUtils.isNullOrWhitespace(val)) {
2042-
val = "";
2081+
if (val != null) {
2082+
textReportFilter.setText(val);
2083+
} else {
2084+
loadDefaultsReportFilter(SearchTypeProp.open);
20432085
}
2044-
return val;
2086+
}
2087+
2088+
private void loadDefaultsReportFilter(SearchTypeProp type) {
2089+
final String prop = ThisAppProps.PROP_TEXTFIELD_REPORT_FILTER + "." + type.name();
2090+
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("umich/msfragger/gui/Bundle"); // NOI18N
2091+
String val = bundle.getString(prop);
2092+
2093+
textReportFilter.setText(val);
2094+
ThisAppProps.save(ThisAppProps.PROP_TEXTFIELD_REPORT_FILTER, val);
20452095
}
20462096

20472097
private String getFraggerLableJavaVer() {
@@ -2064,7 +2114,7 @@ private String getFraggerLableJavaVer() {
20642114

20652115
return sb.toString();
20662116
}
2067-
2117+
20682118
public enum SearchTypeProp {open, closed}
20692119

20702120
private boolean validateAndSavePhilosopherPath(String path) {
@@ -3395,6 +3445,8 @@ private String getDefaultBinPhilosopher() {
33953445
private javax.swing.JButton btnRawAddFolder;
33963446
private javax.swing.JButton btnRawClear;
33973447
private javax.swing.JButton btnRawRemove;
3448+
private javax.swing.JButton btnReportDefaultsClosed;
3449+
private javax.swing.JButton btnReportDefaultsOpen;
33983450
private javax.swing.JButton btnRun;
33993451
private javax.swing.JButton btnSelectPeptideProphetSeqDbPath;
34003452
private javax.swing.JButton btnSelectWrkingDir;

MSFragger-GUI/src/umich/msfragger/params/ThisAppProps.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class ThisAppProps extends Properties {
4343
public static final String PROP_BIN_PATH_MSFRAGGER = "path.textfield.msfragger";
4444
public static final String PROP_BIN_PATH_PHILOSOPHER = "path.textfield.peptide-prophet";
4545
public static final String PROP_TEXTFIELD_PATH_PROTEIN_PROPHET = "path.textfield.protein-prophet";
46-
public static final String PROP_TEXTFIELD_REPORT_FILTER = "textfield.report.filter";
46+
public static final String PROP_TEXTFIELD_REPORT_FILTER = "report.filter";
4747

4848
public static final String PROP_TEXT_CMD_PEPTIDE_PROPHET = "peptideprophet.cmd.line.opts";
4949
public static final String PROP_TEXT_CMD_PROTEIN_PROPHET = "proteinprophet.cmd.line.opts";

0 commit comments

Comments
 (0)