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

Implement logic to load data for barChart file type

    Details

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

      Description

      Develop code to connect to this https://api.genome.ucsc.edu/getData/track?genome=hg38&track=bloodHaoCellType&chrom=chr1&start=1&end=2480000 API and load Data for the barChart file type.
      Investigate whether this file format can be parsed as a bed or graph and add logic to parse the barChart file format.

        Attachments

          Activity

          Hide
          nfreese Nowlan Freese added a comment - - edited

          The list of tracks for the hg38 genome has the sample names for bigBarChart listed as barChartBars: https://api.genome.ucsc.edu/list/tracks?genome=hg38;trackLeavesOnly=1

          "bloodHaoCellType": {
                "shortLabel": "Blood PBMC Cells",
                "type": "bigBarChart",
                "longLabel": "Blood (PBMCs) binned by cell type (level 1) from Hao et al 2020",
                "parent": "bloodHao",
                "visibility": "pack",
                "barChartColors": "#fe3247 #fe3248 #fe3248 #e92812 #e02900 #fb2e3e #f01111 #fe3247",
                "group": "singleCell",
                "html": "bloodHao",
                "barChartUnit": "UMI/cell",
                "transformFunc": "NONE",
                "barChartMetric": "mean",
                "barChartBars": "B_cell T_cell_CD4+ T_cell_CD8+ dendritic_cell_(DC) monocyte natural_killer_cell_(NK) other T_cell_other",
                "barChartStatsUrl": "/gbdb/hg38/bbi/bloodHao/cell_type.stats",
                "superTrack": "on",
                "bigDataUrl": "/gbdb/hg38/bbi/bloodHao/cell_type.bb",
                "barChartLimit": "2",
                "urlLabel": "View on the UCSC Cell Browser:",
                "defaultLabelFields": "name",
                "url": "https://cells.ucsc.edu/?ds=multimodal-pbmc+sct&gene=$$"
              }

          It also has the colors which is interesting, as barChartColors. If we wanted to really go in deep on this one, we could make a bed file that is color coded using their provided colors. This might be a lot of work, so might not be worth it, but it would be neat if we made each cell type its own line in the bed file. I attached an example file, bloodHaoCellType.bed, to show what this could look like in IGB. Compare to the UCSC.

          Show
          nfreese Nowlan Freese added a comment - - edited The list of tracks for the hg38 genome has the sample names for bigBarChart listed as barChartBars: https://api.genome.ucsc.edu/list/tracks?genome=hg38;trackLeavesOnly=1 "bloodHaoCellType" : { "shortLabel" : "Blood PBMC Cells" , "type" : "bigBarChart" , "longLabel" : "Blood (PBMCs) binned by cell type (level 1) from Hao et al 2020" , "parent" : "bloodHao" , "visibility" : "pack" , "barChartColors" : "#fe3247 #fe3248 #fe3248 #e92812 #e02900 #fb2e3e #f01111 #fe3247" , "group" : "singleCell" , "html" : "bloodHao" , "barChartUnit" : "UMI/cell" , "transformFunc" : "NONE" , "barChartMetric" : "mean" , "barChartBars" : "B_cell T_cell_CD4+ T_cell_CD8+ dendritic_cell_(DC) monocyte natural_killer_cell_(NK) other T_cell_other" , "barChartStatsUrl" : "/gbdb/hg38/bbi/bloodHao/cell_type.stats" , "superTrack" : "on" , "bigDataUrl" : "/gbdb/hg38/bbi/bloodHao/cell_type.bb" , "barChartLimit" : "2" , "urlLabel" : "View on the UCSC Cell Browser:" , "defaultLabelFields" : "name" , "url" : "https: //cells.ucsc.edu/?ds=multimodal-pbmc+sct&gene=$$" } It also has the colors which is interesting, as barChartColors. If we wanted to really go in deep on this one, we could make a bed file that is color coded using their provided colors. This might be a lot of work, so might not be worth it, but it would be neat if we made each cell type its own line in the bed file. I attached an example file, bloodHaoCellType.bed , to show what this could look like in IGB. Compare to the UCSC .
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited

          As discussed with Nowlan Freese, made changes to the code to load the data as different lines in IGB along with the barChartCategory names as the name for each line and mapped the name and name2 values from the API to title and props. Below is the branch where all the code changes are present: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3659. Nowlan Freese Please review and let me know if there's any issue. Tested the code and is working as expected, here is the screenshot:

          Also, we observed that it is very tough to search for a track in the available tracks panel as there are a lot of tracks in the hg38 genome so as discussed with Nowlan Freese will be investigating a way to make folders for each file type inside the UCSC Rest folder, created a ticket for this: https://jira.bioviz.org/browse/IGBF-3689

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - - edited As discussed with Nowlan Freese , made changes to the code to load the data as different lines in IGB along with the barChartCategory names as the name for each line and mapped the name and name2 values from the API to title and props. Below is the branch where all the code changes are present: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3659 . Nowlan Freese Please review and let me know if there's any issue. Tested the code and is working as expected, here is the screenshot: Also, we observed that it is very tough to search for a track in the available tracks panel as there are a lot of tracks in the hg38 genome so as discussed with Nowlan Freese will be investigating a way to make folders for each file type inside the UCSC Rest folder, created a ticket for this: https://jira.bioviz.org/browse/IGBF-3689
          Hide
          nfreese Nowlan Freese added a comment -

          Everything appears to be loading correctly.

          The only question I have is can we include the barChartColors as itemrgb? The barChartColors are being passed as hex colors so they would need to be parsed to rgb.

          Show
          nfreese Nowlan Freese added a comment - Everything appears to be loading correctly. The only question I have is can we include the barChartColors as itemrgb? The barChartColors are being passed as hex colors so they would need to be parsed to rgb.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          Updated the code to add the color as the ITEM_RGB property, now the strands can be colored by using the RGB option in the dropdown. The updated code is available at: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3659. Tested the code, working as expected, below is the screenshot:

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - Updated the code to add the color as the ITEM_RGB property, now the strands can be colored by using the RGB option in the dropdown. The updated code is available at: https://bitbucket.org/jaya-sravani/integrated-genome-browser/branch/IGBF-3659 . Tested the code, working as expected, below is the screenshot:
          Hide
          nfreese Nowlan Freese added a comment -

          ITEM_RGB is showing correctly.

          My last concern before creating a pull request is the inclusion of commit 5ade3ce in the PR. I think it would be better to PR that commit separately as part of IGBF-3660 to avoid confusion later. If you could do that and create a PR for 3659 and 3660 that would be great.

          Show
          nfreese Nowlan Freese added a comment - ITEM_RGB is showing correctly. My last concern before creating a pull request is the inclusion of commit 5ade3ce in the PR. I think it would be better to PR that commit separately as part of IGBF-3660 to avoid confusion later. If you could do that and create a PR for 3659 and 3660 that would be great.
          Hide
          jsirigin Jaya Sravani Sirigineedi added a comment -

          Raised separate PRs for both Nowlan Freese. Updated PR for this story is: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/998. Please review and let me know if there are any issues.

          Show
          jsirigin Jaya Sravani Sirigineedi added a comment - Raised separate PRs for both Nowlan Freese . Updated PR for this story is: https://bitbucket.org/lorainelab/integrated-genome-browser/pull-requests/998 . Please review and let me know if there are any issues.
          Hide
          ann.loraine Ann Loraine added a comment -

          PR is merged.

          Show
          ann.loraine Ann Loraine added a comment - PR is merged.
          Hide
          ann.loraine Ann Loraine added a comment -

          Installers are built and deployed to early release section of web site.

          Show
          ann.loraine Ann Loraine added a comment - Installers are built and deployed to early release section of web site.
          Hide
          nfreese Nowlan Freese added a comment -

          Tested main branch Mac.

          barChart is loading correctly, no errors in log.

          Closing ticket.

          Show
          nfreese Nowlan Freese added a comment - Tested main branch Mac. barChart is loading correctly, no errors in log. Closing ticket.

            People

            • Assignee:
              jsirigin Jaya Sravani Sirigineedi
              Reporter:
              jsirigin Jaya Sravani Sirigineedi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: