Package no.uib.jsparklines.data

Examples of no.uib.jsparklines.data.XYDataPoint


                                        sortPValues(pValues, indexes);

                                        ((ValueAndBooleanDataPoint) ((DefaultTableModel) goMappingsTable.getModel()).getValueAt(
                                                indexes.get(0), goMappingsTable.getColumn("Log2 Diff").getModelIndex())).setSignificant(
                                                        pValues.get(0) < significanceLevel);
                                        ((DefaultTableModel) goMappingsTable.getModel()).setValueAt(new XYDataPoint(pValues.get(0), pValues.get(0)), indexes.get(0),
                                                goMappingsTable.getColumn("p-value").getModelIndex());

                                        if (pValues.get(0) < significanceLevel) {
                                            significantCounter++;
                                        }

                                        for (int i = 1; i < pValues.size(); i++) {

                                            if (progressDialog.isRunCanceled()) {
                                                break;
                                            }

                                            double tempPvalue = pValues.get(i) * pValues.size() / (pValues.size() - i);

                                            // have to check if the correction results in a p-value bigger than 1
                                            if (tempPvalue > 1) {
                                                tempPvalue = 1;
                                            }

                                            ((ValueAndBooleanDataPoint) ((DefaultTableModel) goMappingsTable.getModel()).getValueAt(
                                                    indexes.get(i), goMappingsTable.getColumn("Log2 Diff").getModelIndex())).setSignificant(tempPvalue < significanceLevel);
                                            ((DefaultTableModel) goMappingsTable.getModel()).setValueAt(new XYDataPoint(tempPvalue, tempPvalue), indexes.get(i),
                                                    goMappingsTable.getColumn("p-value").getModelIndex());

                                            if (tempPvalue < significanceLevel) {
                                                significantCounter++;
                                            }
View Full Code Here


                // @TODO: the code below does not pick up domain information, but rather shows multiple hits for chain. could perhaps be improved?
                // add the chain information to the table
                for (int j = 0; j < chains.length; j++) {

                    XYDataPoint temp = new XYDataPoint(chains[j].getStartProtein(), chains[j].getEndProtein());

                    if (chains[j].getStartProtein() != chains[j].getEndProtein()) {
                        ((DefaultTableModel) pdbChainsJTable.getModel()).addRow(new Object[]{
                            (j + 1),
                            chains[j].getBlock(),
                            temp,
                            (((double) chains[j].getEndProtein() - chains[j].getStartProtein()) / proteinSequenceLength) * 100
                        });
                    }
                }

                ((JSparklinesIntervalChartTableCellRenderer) pdbChainsJTable.getColumn("PDB-Protein").getCellRenderer()).setMaxValue(proteinSequenceLength);

                if (pdbChainsJTable.getRowCount() > 0) {
                    ((TitledBorder) pdbChainsPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "PDB Chains (" + pdbChainsJTable.getRowCount() + ")"
                            + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                } else {
                    ((TitledBorder) pdbChainsPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "PDB Chains"
                            + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                }

                pdbChainsPanel.repaint();

                if (pdbChainsJTable.getRowCount() > 0) {
                    pdbChainsJTable.setRowSelectionInterval(0, 0);
                    pdbChainsJTable.scrollRectToVisible(pdbChainsJTable.getCellRect(0, 0, false));
                    pdbChainsJTableMouseReleased(null);
                }
            } else {
                ((TitledBorder) pdbChainsPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "PDB Chains"
                        + PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
                pdbChainsPanel.repaint();
            }

            // give the power back to the user ;)
            this.setEnabled(true);
        } else {

            // open protein link in web browser
            if (pdbMatchesJTable.getSelectedColumn() == pdbMatchesJTable.getColumn("PDB").getModelIndex() && evt.getButton() == MouseEvent.BUTTON1
                    && ((String) pdbMatchesJTable.getValueAt(pdbMatchesJTable.getSelectedRow(), pdbMatchesJTable.getSelectedColumn())).lastIndexOf("<html>") != -1) {

                String temp = currentlyDisplayedPdbFile.substring(currentlyDisplayedPdbFile.indexOf("\"") + 1);
                currentlyDisplayedPdbFile = temp.substring(0, temp.indexOf("\""));

                this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
                BareBonesBrowserLaunch.openURL(currentlyDisplayedPdbFile);
                this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            }
View Full Code Here

                            writer.write("\tChain\tPDB-Start\tPDB-End\tCoverage" + System.getProperty("line.separator"));

                            for (int i = 0; i < pdbChainsJTable.getRowCount(); i++) {
                                writer.write(pdbChainsJTable.getValueAt(i, 0) + "\t");
                                writer.write(pdbChainsJTable.getValueAt(i, 1) + "\t");
                                XYDataPoint pdbCoverage = (XYDataPoint) pdbChainsJTable.getValueAt(i, 2);
                                writer.write(pdbCoverage.getX() + "\t" + pdbCoverage.getY() + "\t");
                                writer.write(pdbChainsJTable.getValueAt(i, 3) + System.getProperty("line.separator"));
                            }

                            JOptionPane.showMessageDialog(peptideShakerGUI, "Data copied to file:\n" + selectedFile.getPath(), "Data Exported.", JOptionPane.INFORMATION_MESSAGE);
                        } else if (tableIndex == TableIndex.PDB_MATCHES) {
View Full Code Here

            String filePath = spectrumFileNameMap.get((String) fractionTable.getValueAt(i, fractionTable.getColumn("Fraction").getModelIndex()));
            spectrumFiles.add(filePath);

            Double lower = (Double) fractionTable.getValueAt(i, fractionTable.getColumn("Lower Range (kDa)").getModelIndex());
            Double upper = (Double) fractionTable.getValueAt(i, fractionTable.getColumn("Upper Range (kDa)").getModelIndex());
            fractionRanges.put(filePath, new XYDataPoint(lower, upper));
        }

        peptideShakerGUI.setUpdated(PeptideShakerGUI.PROTEIN_FRACTIONS_TAB_INDEX, false);

        if (peptideShakerGUI.getSelectedTab() == PeptideShakerGUI.PROTEIN_FRACTIONS_TAB_INDEX) {
View Full Code Here

                BufferedReader br = new BufferedReader(r);
                String line = br.readLine();

                while (line != null) {
                    String[] values = line.split("\\t");
                    lowerAndUpper.add(new XYDataPoint(new Double(values[0]), new Double(values[1])));
                    line = br.readLine();
                }

                br.close();
                r.close();
View Full Code Here

TOP

Related Classes of no.uib.jsparklines.data.XYDataPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.