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

Show soft-clipped bases in BAM files

    Details

    • Story Points:
      10
    • Sprint:
      B - Summer 2018, Summer 2018 Part 2, Summer 2018 Part 3, Fall 2018 1, Fall 2018 Sprint 2, Fall 2018 Sprint 3, Fall 2018 Sprint 4

      Description

      IGB should show soft-clipped bases in BAM files.

        Attachments

          Issue Links

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            Enable IGB users to show or hide soft-clipped bases in BAM tracks.
            Add option to track label context menu - "Show soft-clipped bases"
            See image for wording and placement relative to other menu items.

            Show
            ann.loraine Ann Loraine added a comment - Enable IGB users to show or hide soft-clipped bases in BAM tracks. Add option to track label context menu - "Show soft-clipped bases" See image for wording and placement relative to other menu items.
            Hide
            kkorey Kiran Korey (Inactive) added a comment -

            Adding David's comments here for future reference:
            Initial thoughts:
            1. You need to store everything you need to dynamically visualize the read in the data model when the file is loading.
            2. My understanding is likely very poor at this stage, but this probably means creating a custom "Sym" type that cares for the details of rendering.

            Additional quick thought that may or may not be useful:

            It seems the start position of the sym/glph is impacted by the soft clipping toggle. I think instead of hard-coding the position of the BAMSym at parse time you could instead capture fields in BamSym like softClipStartPosition and defaultStartPosition and then dynamically return one or the other depending on the preferences based toggle.

            i.e. in the getter for this property you could have an if condition that references this global preferences boolean

            boundaries of the glyph are important in steps such as packing, so I think you will need to take special care to repack/refresh the view when this toggle is triggered and the data model is parsed again for rendering.

            Show
            kkorey Kiran Korey (Inactive) added a comment - Adding David's comments here for future reference: Initial thoughts: 1. You need to store everything you need to dynamically visualize the read in the data model when the file is loading. 2. My understanding is likely very poor at this stage, but this probably means creating a custom "Sym" type that cares for the details of rendering. Additional quick thought that may or may not be useful: It seems the start position of the sym/glph is impacted by the soft clipping toggle. I think instead of hard-coding the position of the BAMSym at parse time you could instead capture fields in BamSym like softClipStartPosition and defaultStartPosition and then dynamically return one or the other depending on the preferences based toggle. i.e. in the getter for this property you could have an if condition that references this global preferences boolean boundaries of the glyph are important in steps such as packing, so I think you will need to take special care to repack/refresh the view when this toggle is triggered and the data model is parsed again for rendering.
            Hide
            nfreese Nowlan Freese added a comment -

            I am going to try to implement soft-clipping visualization similar to how insertions are drawn.
            This will most likely involve editing the following files:

            1. BAMSym.java
            2. XAM.java
            3. BAM.java
            4. SAM.java
            5. AnnotationGlyphFactory.java

            When testing, it will be important to look at memory use, as we will be drawing new glyphs for each instance of soft-clipping.
            We will also need to check paired-end reads, as they add an additional layer of complexity.

            Show
            nfreese Nowlan Freese added a comment - I am going to try to implement soft-clipping visualization similar to how insertions are drawn. This will most likely involve editing the following files: BAMSym.java XAM.java BAM.java SAM.java AnnotationGlyphFactory.java When testing, it will be important to look at memory use, as we will be drawing new glyphs for each instance of soft-clipping. We will also need to check paired-end reads, as they add an additional layer of complexity.
            Hide
            nfreese Nowlan Freese added a comment -

            My current branch with implemented softclipping:
            https://bitbucket.org/nfreese/nowlanfork-igb/branch/IGBF-1291-Softclipping

            Show
            nfreese Nowlan Freese added a comment - My current branch with implemented softclipping: https://bitbucket.org/nfreese/nowlanfork-igb/branch/IGBF-1291-Softclipping
            Hide
            nfreese Nowlan Freese added a comment -

            New implementation showing soft clips as black rectangles with red triangles. The soft clip glyph shows up on the first/last nucleotide that is matched (M on cigar string) after/before the soft clip.

            Show
            nfreese Nowlan Freese added a comment - New implementation showing soft clips as black rectangles with red triangles. The soft clip glyph shows up on the first/last nucleotide that is matched (M on cigar string) after/before the soft clip.
            Hide
            nfreese Nowlan Freese added a comment -

            New implementation shows the entire length of the soft clip. Soft clip is selectable and has tooltips and edge matching.

            Show
            nfreese Nowlan Freese added a comment - New implementation shows the entire length of the soft clip. Soft clip is selectable and has tooltips and edge matching.
            Hide
            nfreese Nowlan Freese added a comment -

            New implementation has more options, better selection through menu. Appears to be working with the changes to HTSJDK.

            Show
            nfreese Nowlan Freese added a comment - New implementation has more options, better selection through menu. Appears to be working with the changes to HTSJDK.
            Hide
            stiwari8 Srishti Tiwari (Inactive) added a comment -

            Tested using master branch of Loraine Lab and also using local build on Windows.
            The functionality is working correctly and the menu options are also easy to understand now. The code is not breaking anywhere.

            Show
            stiwari8 Srishti Tiwari (Inactive) added a comment - Tested using master branch of Loraine Lab and also using local build on Windows. The functionality is working correctly and the menu options are also easy to understand now. The code is not breaking anywhere.

              People

              • Assignee:
                nfreese Nowlan Freese
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: