[University of Birmingham]
[Georgetown University]
Not logged in
  • Log in
    Membership (43153+) Group hosting [?] Wiki
    Franklin Award

    About bioinformatics
    Bioinformatics jobs

    All information groups
    Online databases Online analysis tools Online education tools More tools

    All software groups
    FTP repository
    SVN & CVS repositories [?]
    Mailing lists

    News & Commentary
  • Submit
  • Archives
  • Subscribe

  • Jobs Forum
    (Career Center)
  • Submit
  • Archives
  • Subscribe
  • BIRCH: Comprehensive bioinfo. system - Support tickets

    Submit | Open tickets | Closed tickets

    [ Ticket #1218 ] overwrite doesn't work
    06/08/18 08:56
    Submitted by:
    Assigned to:
    Ticket group:
    overwrite doesn't work
    Original submission:
    It looks like the overwrite function attribute doesn't work, at least in the table canvas. Given the following code from dat/blreads/PCD/File/ShortNames.blmenu is an example:

    var "out1"
    type tempfile
    direction out
    format tsv
    overwrite true

    data written to out1 does get read into the table canvas, but the original data is not overwritten. Even if a block of rows is selected, the original content is not deleted.

    The correct behavior should be to replace the content with the output from the file. Even better would be
    Please log in to add comments and receive followups via email.
    Comment Date By
    overwrite and content=canvas now work when direction=out.
    However, there is a difficult to track down error generated when replacing an entire canvas with new content.

    The problem is illustrated in blreads/File/Refresh, whose purpose is to act like the refresh button on a file manager. given

    var "out1"
    type tempfile
    direction out
    format tsv
    save false
    overwrite true
    content canvas

    BioLegato successfully runs with output going to %out1%, as shown below:

    BioPCD: executing - bio3895482915133062369.tmp
    BioPCD: Command executed successfully, return status: 0
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2 >= 0
    at java.util.Vector.elementAt(
    at javax.swing.table.DefaultTableModel.getValueAt(
    at javax.swing.JTable.getValueAt(
    at javax.swing.JTable.prepareRenderer(
    at javax.swing.plaf.basic.BasicTableUI.paintCell(
    at javax.swing.plaf.basic.BasicTableUI.paintCells(
    at javax.swing.plaf.basic.BasicTableUI.paint(
    at javax.swing.plaf.ComponentUI.update(
    at javax.swing.JComponent.paintComponent(
    at javax.swing.JComponent.paint(
    at javax.swing.JComponent.paintToOffscreen(
    at javax.swing.BufferStrategyPaintManager.paint(
    at javax.swing.RepaintManager.paint(
    at javax.swing.JComponent._paintImmediately(
    at javax.swing.JComponent.paintImmediately(
    at javax.swing.RepaintManager$
    at javax.swing.RepaintManager$
    at Method)
    at javax.swing.RepaintManager.paintDirtyRegions(
    at javax.swing.RepaintManager.paintDirtyRegions(
    at javax.swing.RepaintManager.prePaintDirtyRegions(
    at javax.swing.RepaintManager.access$1200(
    at javax.swing.RepaintManager$
    at java.awt.event.InvocationEvent.dispatch(
    at java.awt.EventQueue.dispatchEventImpl(
    at java.awt.EventQueue.access$500(
    at java.awt.EventQueue$
    at java.awt.EventQueue$
    at Method)
    at java.awt.EventQueue.dispatchEvent(
    at java.awt.EventDispatchThread.pumpOneEventForFilters(
    at java.awt.EventDispatchThread.pumpEventsForFilter(
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(
    at java.awt.EventDispatchThread.pumpEvents(
    at java.awt.EventDispatchThread.pumpEvents(

    I did a lot of detective work trying to debug what was causing the error, and was not able to track it down. There are a lot of debugging statements commented out in TSVFile.jj and in, particularly with respect to the addRows method. I initially thought that the error was in TableCanvas/addRows, but can't seem to find anything that looks wrong.

    Testing so far shows that BioLegato still correctly reads in the %out1% file when replacing the contents of the canvas. The error seems to be inconsequential. Still, I hate to have an error message. For now, we'll consider the overwrite/content feature to be implemented, but this should be fixed.
    07/12/18 17:41 B_Fristensky
    In order to make overwrite and canvas=true work, it was necessary to modify TSVFile.jj/readFile to add the forceall parameter to the parameter list. The new declaration looks like this:

    public static void readFile(TableCanvas table, Reader currentFile, boolean overwrite, boolean forceall) throws IOException

    Consequently, all calls to readFile had to be modified to include this parameter:

    07/12/18 17:30 B_Fristensky
    To facilitate creation of a Refresh function (File --> Refresh), added the following code to TSVFile.jj and CSVFile.jj:

    if (overwrite) {
    // If no data are selected, delete all data in the canvas
    boolean forceall = (table.tablePane.getSelectedColumnCount() == 0
    && table.tablePane.getSelectedRowCount() == 0);
    if (forceall) {
    // An error would be generated if we had an empty canvas, so add a dummy
    // first row and clear the selection.
    if (forceall) {
    String[] dummy = new String[1];
    07/09/18 18:09 B_Fristensky
    Two steps were required to get this to work:

    1) Add a method to called deleteSelectedRows(). This contains code that was moved from the actionPerformed for the Delete Row(s) button, that already deleted selected rows. The Delete Row(s) button now calls deleteSelectedRows().
    2) In TSVfile.jj and CSVfile.jj, the TODO comment saying that overwrite needed to be implemented was replaced with:
    if (overwrite) {
    06/26/18 19:13 B_Fristensky
    Confirmed: In both and there are TODO comments saying that overwrite needs to be implemented. 06/25/18 17:46 B_Fristensky
    Overwrite has been tested for the Sequence canvas, and does work. It replaces the SELECTION, not the entire contents of the window, as advertised.

    It seems likely that it just wasn't implemented for the table canvas.
    06/25/18 15:19 B_Fristensky
    No results for "Dependent on ticket"
    No results for "Dependent on Task"
    No other tickets are dependent on this ticket
    Ticket change history
    Field Old value Date By
    close_date 07/12/18 17:30 07/12/18 17:41 B_Fristensky
    close_date 07/09/18 18:09 07/12/18 17:30 B_Fristensky
    close_date 06/26/18 19:14 07/09/18 18:09 B_Fristensky
    status_id Open 06/26/18 19:14 B_Fristensky
    assigned_to unset 06/26/18 19:14 B_Fristensky
    resolution_id Not Resolved 06/26/18 19:14 B_Fristensky
    close_date 12/31/69 19:00 06/26/18 19:14 B_Fristensky
    status_id Pending 06/25/18 15:19 B_Fristensky
    resolution_id Unset 06/25/18 15:19 B_Fristensky


    Copyright © 2022 Scilico, LLC · Privacy Policy