use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class CoverageQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Count reads on strand"), gbc);
gbc.gridx = 2;
strandLimit = new JComboBox(QuantitationStrandType.getTypeOptions());
optionPanel.add(strandLimit, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Min Read Depth"), gbc);
gbc.gridx = 2;
depthLimitField = new JTextField("" + depthLimit, 5);
depthLimitField.addKeyListener(new NumberKeyListener(false, false));
optionPanel.add(depthLimitField, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class EnrichmentNormalisationQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Lower Percentile"), gbc);
lowerPercentileField = new JTextField("" + lowerPercentile);
lowerPercentileField.addKeyListener(new NumberKeyListener(true, false));
gbc.gridx++;
optionPanel.add(lowerPercentileField, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Upper Percentile"), gbc);
gbc.gridx = 2;
upperPercentileField = new JTextField("" + upperPercentile);
upperPercentileField.addKeyListener(new NumberKeyListener(true, false));
optionPanel.add(upperPercentileField, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Ignore unquantitated probes"), gbc);
ignoreUnquantitatedBox = new JCheckBox("", true);
gbc.gridx++;
optionPanel.add(ignoreUnquantitatedBox, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Calculate from probe list"), gbc);
ProbeList[] currentLists = application.dataCollection().probeSet().getAllProbeLists();
calculateFromProbeList = new JComboBox(currentLists);
calculateFromProbeList.setPrototypeDisplayValue("No longer than this please");
for (int i = 0; i < currentLists.length; i++) {
if (currentLists[i] == application.dataCollection().probeSet().getActiveList()) {
calculateFromProbeList.setSelectedIndex(i);
}
}
gbc.gridx++;
optionPanel.add(calculateFromProbeList, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class SmoothingSubtractionQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Smoothing method"), gbc);
gbc.gridx = 2;
correctionActions = new JComboBox(new String[] { "Adjacent Probes", "Window Size" });
optionPanel.add(correctionActions, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Size"), gbc);
distanceField = new JTextField("" + distance);
distanceField.addKeyListener(new NumberKeyListener(false, false));
distanceField.addKeyListener(new KeyListener() {
public void keyTyped(KeyEvent arg0) {
}
public void keyReleased(KeyEvent arg0) {
optionsChanged();
}
public void keyPressed(KeyEvent arg0) {
}
});
gbc.gridx++;
optionPanel.add(distanceField, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class PercentileNormalisationQuantitation method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.Quantitation.Quantitation#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.1;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Method of correction"), gbc);
gbc.gridx = 2;
correctionActions = new JComboBox(new String[] { "Add", "Multiply" });
optionPanel.add(correctionActions, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Percentile"), gbc);
JPanel percentilePanel = new JPanel();
percentilePanel.setLayout(new BorderLayout());
autoPercentileBox = new JCheckBox("Auto", false);
percentilePanel.add(autoPercentileBox, BorderLayout.WEST);
percentileField = new JTextField("" + percentile);
percentileField.addKeyListener(new NumberKeyListener(true, false));
percentilePanel.add(percentileField, BorderLayout.CENTER);
autoPercentileBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
percentileField.setEnabled(!autoPercentileBox.isSelected());
}
});
gbc.gridx++;
optionPanel.add(percentilePanel, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Ignore unquantitated probes"), gbc);
ignoreUnquantitatedBox = new JCheckBox("", true);
gbc.gridx++;
optionPanel.add(ignoreUnquantitatedBox, gbc);
gbc.gridx = 1;
gbc.gridy++;
optionPanel.add(new JLabel("Calculate from probe list"), gbc);
ProbeList[] currentLists = application.dataCollection().probeSet().getAllProbeLists();
calculateFromProbeList = new JComboBox(currentLists);
calculateFromProbeList.setPrototypeDisplayValue("No longer than this please");
for (int i = 0; i < currentLists.length; i++) {
if (currentLists[i] == application.dataCollection().probeSet().getActiveList()) {
calculateFromProbeList.setSelectedIndex(i);
}
}
gbc.gridx++;
optionPanel.add(calculateFromProbeList, gbc);
return optionPanel;
}
use of uk.ac.babraham.SeqMonk.Utilities.NumberKeyListener in project SeqMonk by s-andrews.
the class DeduplicationProbeGenerator method getOptionsPanel.
/* (non-Javadoc)
* @see uk.ac.babraham.SeqMonk.ProbeGenerators.ProbeGenerator#getOptionsPanel(uk.ac.babraham.SeqMonk.SeqMonkApplication)
*/
public JPanel getOptionsPanel() {
if (optionPanel != null) {
// We've done this already
return optionPanel;
}
optionPanel = new JPanel();
optionPanel.setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 1;
gbc.weightx = 0.5;
gbc.weighty = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
optionPanel.add(new JLabel("Starting Probe List"), gbc);
gbc.gridx = 2;
if (collection.probeSet() == null) {
probeListBox = new JComboBox(new ProbeList[0]);
} else {
probeListBox = new JComboBox(collection.probeSet().getAllProbeLists());
}
probeListBox.setPrototypeDisplayValue("No longer than this please");
probeListBox.addItemListener(this);
optionPanel.add(probeListBox, gbc);
gbc.gridy++;
gbc.gridx = 1;
optionPanel.add(new JLabel("Merge probes separated by less than (bp)"), gbc);
gbc.gridx = 2;
maxDistanceField = new JTextField("0");
maxDistanceField.addKeyListener(new NumberKeyListener(false, false));
optionPanel.add(maxDistanceField, gbc);
gbc.gridy++;
gbc.gridx = 1;
optionPanel.add(new JLabel("Merge strands separately"), gbc);
gbc.gridx = 2;
separateStrandsBox = new JCheckBox("", true);
optionPanel.add(separateStrandsBox, gbc);
return optionPanel;
}
Aggregations