Skip to content

Commit

Permalink
Added protein/peptide level FDR checkbox. Bumped to v2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
chhh committed Jun 1, 2017
1 parent 72587bb commit b9f4513
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 20 deletions.
2 changes: 1 addition & 1 deletion MSFragger-GUI/src/umich/msfragger/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Version {
public static final String PROP_VER = "msfragger.gui.version";
public static final String VERSION = "2.5";
public static final String VERSION = "2.6";

public static String getVersion() {
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("umich/msfragger/gui/Bundle"); // NOI18N
Expand Down
2 changes: 1 addition & 1 deletion MSFragger-GUI/src/umich/msfragger/gui/Bundle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
msfragger.gui.version=2.5
msfragger.gui.version=2.6
default.msfragger.jar=MSFragger.jar
default.msconvert.win=msconvert.exe
default.msconvert.nix=msconvert
Expand Down
41 changes: 32 additions & 9 deletions MSFragger-GUI/src/umich/msfragger/gui/MsfraggerGuiFrame.form
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="436" max="32767" attributes="0"/>
<EmptySpace pref="415" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand All @@ -1061,16 +1061,24 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="checkReportFilter" max="32767" attributes="0"/>
<Component id="checkReportDbAnnotate" max="32767" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="textReportDbAnnotate" pref="461" max="32767" attributes="0"/>
<Component id="textReportFilter" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="checkReportFilter" max="32767" attributes="0"/>
<Component id="checkReportDbAnnotate" max="32767" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="textReportDbAnnotate" pref="461" max="32767" attributes="0"/>
<Component id="textReportFilter" max="32767" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="checkReportProteinLevelFdr" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
Expand All @@ -1089,6 +1097,8 @@
<Component id="checkReportFilter" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textReportFilter" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="checkReportProteinLevelFdr" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
Expand Down Expand Up @@ -1126,6 +1136,19 @@
<AuxValue name="JavaCodeGenerator_allCodePost" type="java.lang.String" value="loadLastReportFilter();"/>
</AuxValues>
</Component>
<Component class="javax.swing.JCheckBox" name="checkReportProteinLevelFdr">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Report Protein level FDR"/>
<Property name="toolTipText" type="java.lang.String" value="&lt;html&gt;Which FDR (False Discovery Rate) level to use:&#xa;&lt;ul&gt;&#xa; &lt;li&gt;Checked - Protein level FDR&lt;/li&gt;&#xa; &lt;li&gt;Unchecked - Peptide level FDR&lt;/li&gt;&#xa;&lt;/ul&gt;"/>
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="checkReportProteinLevelFdrStateChanged"/>
</Events>
<AuxValues>
<AuxValue name="JavaCodeGenerator_allCodePost" type="java.lang.String" value="loadLastReportProteinLevelFdr();"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JCheckBox" name="checkCreateReport">
Expand Down
54 changes: 45 additions & 9 deletions MSFragger-GUI/src/umich/msfragger/gui/MsfraggerGuiFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ private void initComponents() {
ghostTextPepProph = new GhostText(textReportDbAnnotate, TEXT_SAME_SEQ_DB, defTextColor);
checkReportFilter = new javax.swing.JCheckBox();
textReportFilter = new javax.swing.JTextField();
checkReportProteinLevelFdr = new javax.swing.JCheckBox();
checkCreateReport = new javax.swing.JCheckBox();
btnReportDefaultsClosed = new javax.swing.JButton();
btnReportDefaultsOpen = new javax.swing.JButton();
Expand Down Expand Up @@ -963,19 +964,33 @@ public void focusLost(java.awt.event.FocusEvent evt) {
}
});

checkReportProteinLevelFdr.setSelected(true);
checkReportProteinLevelFdr.setText("Report Protein level FDR");
checkReportProteinLevelFdr.setToolTipText("<html>Which FDR (False Discovery Rate) level to use:\n<ul>\n <li>Checked - Protein level FDR</li>\n <li>Unchecked - Peptide level FDR</li>\n</ul>");
checkReportProteinLevelFdr.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
checkReportProteinLevelFdrStateChanged(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(checkReportFilter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(checkReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(textReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)
.addComponent(textReportFilter))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(checkReportFilter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(checkReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(textReportDbAnnotate, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)
.addComponent(textReportFilter)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(checkReportProteinLevelFdr)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
Expand All @@ -989,10 +1004,13 @@ public void focusLost(java.awt.event.FocusEvent evt) {
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(checkReportFilter)
.addComponent(textReportFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(checkReportProteinLevelFdr)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

loadLastReportFilter();
loadLastReportProteinLevelFdr();

checkCreateReport.setSelected(true);
checkCreateReport.setText("Create report");
Expand Down Expand Up @@ -1039,7 +1057,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addComponent(btnReportDefaultsOpen)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(436, Short.MAX_VALUE))
.addContainerGap(415, Short.MAX_VALUE))
);

tabPane.addTab("Report", null, panelReport, "");
Expand Down Expand Up @@ -2037,6 +2055,11 @@ private void btnReportDefaultsOpenActionPerformed(java.awt.event.ActionEvent evt
loadDefaultsReportFilter(SearchTypeProp.open);
}//GEN-LAST:event_btnReportDefaultsOpenActionPerformed

private void checkReportProteinLevelFdrStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_checkReportProteinLevelFdrStateChanged
boolean selected = checkReportProteinLevelFdr.isSelected();
ThisAppProps.save(ThisAppProps.PROP_CHECKBOX_REPORT_PROTEIN_LEVEL_FDR, Boolean.toString(selected));
}//GEN-LAST:event_checkReportProteinLevelFdrStateChanged

public void loadLastPeptideProphet() {
String val = ThisAppProps.load(ThisAppProps.PROP_TEXT_CMD_PEPTIDE_PROPHET);
if (val != null) {
Expand Down Expand Up @@ -2112,6 +2135,16 @@ private String getFraggerLableJavaVer() {
return sb.toString();
}

private void loadLastReportProteinLevelFdr() {
String v = ThisAppProps.load(ThisAppProps.PROP_CHECKBOX_REPORT_PROTEIN_LEVEL_FDR);
if (v == null) {
checkReportProteinLevelFdr.setSelected(true);
} else {
Boolean wasSelected = Boolean.valueOf(v);
checkReportProteinLevelFdr.setSelected(wasSelected);
}
}

public enum SearchTypeProp {open, closed}

private boolean validateAndSavePhilosopherPath(String path) {
Expand Down Expand Up @@ -3155,8 +3188,10 @@ private List<ProcessBuilder> processBuildersReport(String programsDir, String wo
}
cmd.add("--pepxml");
cmd.add(workingDir);
cmd.add("--protxml");
cmd.add(combinedProtFilePath.toString());
if (checkReportProteinLevelFdr.isSelected()) {
cmd.add("--protxml");
cmd.add(combinedProtFilePath.toString());
}
builders.add(new ProcessBuilder(cmd));
}

Expand Down Expand Up @@ -3437,6 +3472,7 @@ private String getDefaultBinPhilosopher() {
private javax.swing.JCheckBox checkDryRun;
private javax.swing.JCheckBox checkReportDbAnnotate;
private javax.swing.JCheckBox checkReportFilter;
private javax.swing.JCheckBox checkReportProteinLevelFdr;
private javax.swing.JCheckBox chkProteinProphetInteractStar;
private javax.swing.JCheckBox chkRunPeptideProphet;
private javax.swing.JCheckBox chkRunProteinProphet;
Expand Down
1 change: 1 addition & 0 deletions MSFragger-GUI/src/umich/msfragger/params/ThisAppProps.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class ThisAppProps extends Properties {
public static final String PROP_BIN_PATH_PHILOSOPHER = "path.textfield.peptide-prophet";
public static final String PROP_TEXTFIELD_PATH_PROTEIN_PROPHET = "path.textfield.protein-prophet";
public static final String PROP_TEXTFIELD_REPORT_FILTER = "report.filter";
public static final String PROP_CHECKBOX_REPORT_PROTEIN_LEVEL_FDR = "report.proteinlevelfdr";

public static final String PROP_TEXT_CMD_PEPTIDE_PROPHET = "peptideprophet.cmd.line.opts";
public static final String PROP_TEXT_CMD_PROTEIN_PROPHET = "proteinprophet.cmd.line.opts";
Expand Down

0 comments on commit b9f4513

Please sign in to comment.