Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3942

Add the ability to add multiple values for Color by

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently, the Color feature for Samtags tools is binary; if the value matches the the read will be colored green or else red. Just like the Filter by feature for Samtools tags, the ability to add multiple values to color will be useful for scRNA-seq analysis.

      Task: Add the ability to add multiple values and choose colors for each value in the color feature.

        Attachments

          Issue Links

            Activity

            Hide
            karthik Karthik Raveendran added a comment - - edited

            An editable table has been added to the color by function so that users can add values for samtools tags that they choose and the corresponding colors. The logic needed to implement multiple color option is yet to be done

            Show
            karthik Karthik Raveendran added a comment - - edited An editable table has been added to the color by function so that users can add values for samtools tags that they choose and the corresponding colors. The logic needed to implement multiple color option is yet to be done
            Hide
            karthik Karthik Raveendran added a comment - - edited

            The Samtools tags table for Color by function will have the following features:
            1) should have be similar in design to Data Management Table
            2) An export / import button should be added for the user to copy or enter values from a file
            3) Reads that don't match to list of values will automatically be set as gray color.

            Show
            karthik Karthik Raveendran added a comment - - edited The Samtools tags table for Color by function will have the following features: 1) should have be similar in design to Data Management Table 2) An export / import button should be added for the user to copy or enter values from a file 3) Reads that don't match to list of values will automatically be set as gray color.
            Hide
            karthik Karthik Raveendran added a comment - - edited

            The Samtools Tags Edit Table has three columns. The first column is for the users' input value for the tag, the second is a color chooser, and the third is a delete button to remove the row (This table can be accessed with the user selects Color by option from the track name right-click menu, selects the Samtools Tags option from the dropdown and clicks on Edit Tag Values and Colors button)

            Currently, the issue is that the color chooser and the delete button is rendered in the table cell only when the cell is clicked on and it disappears after the click is released. Table cell renderer function is likely where the problem lies in.

            Other uses of table cell renderers in the IGB code base may help, however, there is significant difference (at least in programmatic flow) between the designs. In Data Management Table, the table starts of as empty and the cells of a row are not filled by the user directly; user chooses the track which gets added to a dataset, the row is filled from the dataset and the corresponding Swing components in the cells are rendered after that. Same design for Data Sources, App Repositories, Track Defaults..etc. With Samtools Tags, the components needs to be rendered in an empty table in all rows when the table when it opens so that the user understands what to do without prompt. I may be wrong but from what I observed this significantly changes the flow the UI being painted possibly causing the color choose and delete button to disappear.

            Show
            karthik Karthik Raveendran added a comment - - edited The Samtools Tags Edit Table has three columns. The first column is for the users' input value for the tag, the second is a color chooser , and the third is a delete button to remove the row (This table can be accessed with the user selects Color by option from the track name right-click menu, selects the Samtools Tags option from the dropdown and clicks on Edit Tag Values and Colors button) Currently, the issue is that the color chooser and the delete button is rendered in the table cell only when the cell is clicked on and it disappears after the click is released. Table cell renderer function is likely where the problem lies in. Other uses of table cell renderers in the IGB code base may help, however, there is significant difference (at least in programmatic flow) between the designs. In Data Management Table, the table starts of as empty and the cells of a row are not filled by the user directly; user chooses the track which gets added to a dataset, the row is filled from the dataset and the corresponding Swing components in the cells are rendered after that. Same design for Data Sources, App Repositories, Track Defaults..etc. With Samtools Tags, the components needs to be rendered in an empty table in all rows when the table when it opens so that the user understands what to do without prompt. I may be wrong but from what I observed this significantly changes the flow the UI being painted possibly causing the color choose and delete button to disappear.
            Hide
            karthik Karthik Raveendran added a comment -

            TableCellRenderer is used to customize the UI of a table cell which is essentially a JLabel. For the delete button column, I added an delete icon in the JLabel which solved the issue of the rendition. Components of a TableCellEditor only appears when the user interacts with that cell. So the button will appear when the user clicks on the cell and which looks exactly like the JLabel, hence, the transition is looks clean.

            Show
            karthik Karthik Raveendran added a comment - TableCellRenderer is used to customize the UI of a table cell which is essentially a JLabel. For the delete button column, I added an delete icon in the JLabel which solved the issue of the rendition. Components of a TableCellEditor only appears when the user interacts with that cell. So the button will appear when the user clicks on the cell and which looks exactly like the JLabel, hence, the transition is looks clean.
            Hide
            karthik Karthik Raveendran added a comment -

            Other than user input that needs to be retained in the Color by Samtools table, everything else has been implemented in this commit : https://bitbucket.org/KarthikRavee91/karthikfork-igb/commits/6650b17424b34e6f1216ded353912da5393bd00e

            Show
            karthik Karthik Raveendran added a comment - Other than user input that needs to be retained in the Color by Samtools table, everything else has been implemented in this commit : https://bitbucket.org/KarthikRavee91/karthikfork-igb/commits/6650b17424b34e6f1216ded353912da5393bd00e
            Hide
            nfreese Nowlan Freese added a comment -

            Changes included in this PR.

            Tested on Main branch installer on Mac.

            I am able to add multiple color values to the Color by... Edit Tags and Color window.

            Closing ticket

            Show
            nfreese Nowlan Freese added a comment - Changes included in this PR . Tested on Main branch installer on Mac. I am able to add multiple color values to the Color by... Edit Tags and Color window. Closing ticket

              People

              • Assignee:
                karthik Karthik Raveendran
                Reporter:
                karthik Karthik Raveendran
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: