lollipops | style mutation diagrams for annotating genetic variations | Genomics library

 by   joiningdata Go Version: v1.5.3 License: GPL-3.0

kandi X-RAY | lollipops Summary

lollipops is a Go library typically used in Artificial Intelligence, Genomics applications. lollipops has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.
A simple 'lollipop' mutation diagram generator that tries to make things simple and easy by automating as much as possible. It uses the UniProt REST API and/or Pfam API to automate translation of Gene Symbols and lookup domain/motif features for display. If variant changes are provided, it will also annotate them to the diagram using the "lollipops" markers that give the tool it's name.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        lollipops has a low active ecosystem.
                        summary
                        It has 153 star(s) with 56 fork(s). There are 16 watchers for this library.
                        summary
                        It had no major release in the last 12 months.
                        summary
                        There are 2 open issues and 45 have been closed. On average issues are closed in 18 days. There are 2 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of lollipops is v1.5.3
                        lollipops Support
                          Best in #Genomics
                            Average in #Genomics
                            lollipops Support
                              Best in #Genomics
                                Average in #Genomics

                                  kandi-Quality Quality

                                    summary
                                    lollipops has 0 bugs and 0 code smells.
                                    lollipops Quality
                                      Best in #Genomics
                                        Average in #Genomics
                                        lollipops Quality
                                          Best in #Genomics
                                            Average in #Genomics

                                              kandi-Security Security

                                                summary
                                                lollipops has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                lollipops code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                lollipops Security
                                                  Best in #Genomics
                                                    Average in #Genomics
                                                    lollipops Security
                                                      Best in #Genomics
                                                        Average in #Genomics

                                                          kandi-License License

                                                            summary
                                                            lollipops is licensed under the GPL-3.0 License. This license is Strong Copyleft.
                                                            summary
                                                            Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
                                                            lollipops License
                                                              Best in #Genomics
                                                                Average in #Genomics
                                                                lollipops License
                                                                  Best in #Genomics
                                                                    Average in #Genomics

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        lollipops releases are available to install and integrate.
                                                                        summary
                                                                        Installation instructions, examples and code snippets are available.
                                                                        lollipops Reuse
                                                                          Best in #Genomics
                                                                            Average in #Genomics
                                                                            lollipops Reuse
                                                                              Best in #Genomics
                                                                                Average in #Genomics
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  lollipops Key Features

                                                                                  Jay JJ, Brouwer C (2016) Lollipops in the Clinic: Information Dense Mutation Plots for Precision Medicine. PLoS ONE 11(8): e0160519. doi: 10.1371/journal.pone.0160519.

                                                                                  lollipops Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for lollipops.
                                                                                  Community Discussions

                                                                                  Trending Discussions on lollipops

                                                                                  How to link traces between subplots in R Plotly with shared Y axis so that hoverinfo appears on both?
                                                                                  chevron right
                                                                                  I am having problems with the css highlighting text
                                                                                  chevron right
                                                                                  lollipop plot with sorting within group
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  How to link traces between subplots in R Plotly with shared Y axis so that hoverinfo appears on both?
                                                                                  Asked 2021-Nov-23 at 07:38

                                                                                  I've managed to create a figure made of two subplots which are horizontal bar charts (lollipops), side-by-side, with a shared Y-axis:

                                                                                  However, I'd like each pair of horizontal lollipops to be linked between them so that when you hover over one the hovertemplate info is shown for both instead of just one. Is there a way to do this using Plotly R, perhaps a custom JS function or something like that? I assume it's not easily possible using the legend group option.

                                                                                  So far I've tried these two approaches and none of them do what I want: R plotly link subplots so that multiple tooltips shown on hover How to facet a plot_ly() chart?

                                                                                  Here's a link to my data: https://www.dropbox.com/s/g6kqq4z2y6nsk2g/plotly_data.RData?dl=0

                                                                                  And my code so far:

                                                                                  custom_hover_t <- "%{x:.2f}%"
                                                                                  custom_hover_c <- "%{x:.2f}%"
                                                                                  
                                                                                  t <- plot_ly(data = datos) %>%
                                                                                    
                                                                                              #Barras tamaño
                                                                                              add_trace(x = ~T2019, y = ~EjeX, 
                                                                                                        type = 'bar',
                                                                                                        width = 0.02,
                                                                                                        marker = list(color = ~color),
                                                                                                        orientation = "h",
                                                                                                        hoverlabel = list(bordercolor="white"),
                                                                                                        hovertemplate = custom_hover_t
                                                                                              ) %>%
                                                                                              
                                                                                              add_trace(x = ~T2019, y = ~EjeX, 
                                                                                                        type = 'scatter',mode = "markers",
                                                                                                        marker = list(color = ~color, size = 7),
                                                                                                        hoverlabel = list(bordercolor="white"),
                                                                                                        hovertemplate = custom_hover_t
                                                                                              ) %>%
                                                                                    
                                                                                              plotly::layout(
                                                                                                xaxis = list(title     = NULL,
                                                                                                             autorange = T,
                                                                                                             zeroline  = T,
                                                                                                             showline  = F,
                                                                                                             autotick  = FALSE,
                                                                                                             tickmode  = "array",
                                                                                                             showgrid  = T,
                                                                                                             showticklabels = F,
                                                                                                             titlefont = list(color="transparent")
                                                                                                ),
                                                                                                yaxis = list(title     = NULL,
                                                                                                             visible   = FALSE,
                                                                                                             autorange = TRUE,
                                                                                                             visible   = FALSE,
                                                                                                             zeroline  = FALSE,
                                                                                                             showline  = F,
                                                                                                             showgrid  = FALSE,
                                                                                                             ticklen = 0,
                                                                                                             titlefont = list(color="transparent")
                                                                                                ), #para mostrar solo 2 decimales al hacer hover en un punto
                                                                                                showlegend = F#,
                                                                                                #margin = list(l = 1)
                                                                                              )
                                                                                  
                                                                                  c <- plot_ly(data = datos) %>%            
                                                                                             #Barras tamaño
                                                                                             add_trace(x = ~CambioRel, y = ~EjeX, 
                                                                                                       type = 'bar',
                                                                                                       width = 0.02,
                                                                                                       marker = list(color = ~color),
                                                                                                       orientation = "h",
                                                                                                       hoverlabel = list(bordercolor="white"),
                                                                                                       hovertemplate = custom_hover_c
                                                                                             ) %>%
                                                                                             
                                                                                             add_trace(x = ~CambioRel, y = ~EjeX, 
                                                                                                       type = 'scatter',mode = "markers",
                                                                                                       marker = list(color = ~color, size = 7),
                                                                                                       hoverlabel = list(bordercolor="white"),
                                                                                                       hovertemplate = custom_hover_c
                                                                                             ) %>%
                                                                                                    
                                                                                             plotly::layout(
                                                                                             xaxis = list(title     = NULL,
                                                                                                          autorange = T,
                                                                                                          zeroline  = T,
                                                                                                          showline  = F,
                                                                                                          autotick  = FALSE,
                                                                                                          tickmode  = "array",
                                                                                                          #tickvals  = ~Etiqueta,
                                                                                                          showgrid  = T,
                                                                                                          showticklabels = F,
                                                                                                          titlefont = list(color="transparent")
                                                                                             ),
                                                                                             yaxis = list(title     = NULL,
                                                                                                          visible   = FALSE,
                                                                                                          autorange = TRUE,
                                                                                                          visible   = FALSE,
                                                                                                          zeroline  = FALSE,
                                                                                                          showline  = F,
                                                                                                          showgrid  = FALSE,
                                                                                                          #ticks     = "outside",
                                                                                                          #ticksuffix = ticks_pct(),
                                                                                                          #showticklabels = TRUE,
                                                                                                          ticklen = 0,
                                                                                                          titlefont = list(color="transparent")
                                                                                             ), #para mostrar solo 2 decimales al hacer hover en un punto
                                                                                             showlegend = F#,
                                                                                             #margin = list(l = 1)
                                                                                           ) 
                                                                                  
                                                                                  
                                                                                  fig <- subplot(t, c, shareY = TRUE)
                                                                                  
                                                                                  fig
                                                                                  
                                                                                  
                                                                                  
                                                                                  

                                                                                  I'd really really appreciate any help you can give me

                                                                                  ANSWER

                                                                                  Answered 2021-Nov-23 at 07:38

                                                                                  Shared hoverinfo across subplots is not yet available in plotly.js.

                                                                                  However, you could use hovermode = 'y unified' in a single plot across different traces:

                                                                                  library(plotly)
                                                                                  
                                                                                  fig <- plot_ly()
                                                                                  fig <- fig %>% add_trace(x = ~2:4, y = ~4:6, text = ~LETTERS[4:6], name = "yaxis data", mode = "lines+markers", type = "scatter", hovertemplate = "%{text}")
                                                                                  fig <- fig %>% add_trace(x = ~4:6, y = ~4:6, name = "yaxis 2 data", mode = "lines+markers", type = "scatter")
                                                                                  fig <- fig %>% add_trace(x = ~6:8, y = ~4:6, name = "omit_hoverinfo", mode = "lines+markers", type = "scatter", hoverinfo='skip')
                                                                                  
                                                                                  fig <- fig %>% layout(
                                                                                    hovermode = 'y unified' # alternativ: hovermode = 'y'
                                                                                  )
                                                                                  
                                                                                  fig
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/69903147

                                                                                  QUESTION

                                                                                  I am having problems with the css highlighting text
                                                                                  Asked 2021-Feb-24 at 13:04

                                                                                  I am having problems with the css side of the hypertext link, the strings that transport you to the other pages of the website, they are not highlighting when I hover over the message, when it comes to the stuff, I cannot see the problems with the code, could i have some help with this please?:

                                                                                  ul {
                                                                                    list-style-type: none;
                                                                                    margin: 0;
                                                                                    padding: 0;
                                                                                    overflow: hidden;
                                                                                    background-color: #333;
                                                                                  }
                                                                                  
                                                                                  li {
                                                                                    float: left;
                                                                                  }
                                                                                  
                                                                                  li a {
                                                                                    color: white;
                                                                                    text-align: center;
                                                                                    padding: 14px 16px;
                                                                                    text-decoration: none;
                                                                                    hover: red;
                                                                                  }
                                                                                  
                                                                                  a {
                                                                                    color: white;
                                                                                  }
                                                                                  
                                                                                  
                                                                                  }
                                                                                  a:hover {
                                                                                    color: red;
                                                                                  }

                                                                                  ANSWER

                                                                                  Answered 2021-Feb-24 at 13:04
                                                                                  1. You have a typo, u1 instead of ul
                                                                                  2. You have too many definitions of A so the hover is ignored, I removed a { color: white; }
                                                                                  3. Unnecessary inline list types on the LIs
                                                                                  4. Don't use float and br when not using float and br does the same. I removed li { float: left; } and

                                                                                  ul {
                                                                                    list-style-type: none;
                                                                                    margin: 0;
                                                                                    padding: 0;
                                                                                    overflow: hidden;
                                                                                    background-color: #333;
                                                                                  }
                                                                                  
                                                                                  
                                                                                  li a {
                                                                                    color: white;
                                                                                    text-align: center;
                                                                                    padding: 14px 16px;
                                                                                    text-decoration: none;
                                                                                    
                                                                                  }
                                                                                  li a:hover {
                                                                                    color: red;
                                                                                  }

                                                                                  Source https://stackoverflow.com/questions/66351385

                                                                                  QUESTION

                                                                                  lollipop plot with sorting within group
                                                                                  Asked 2020-May-05 at 18:30

                                                                                  I am trying to create a lollipop plot with a dataset that looks something like this:

                                                                                  set.seed(123)
                                                                                  example_df <- data.frame(strategy = as.factor(rep(LETTERS[1:5], each = 2)), 
                                                                                                           mt_equip = as.factor(rep(c('r', 'v'), times = 5)), 
                                                                                                           cc = as.factor(c('cc', 'cc', 'no_cc', 'no_cc', 'part_cc', 'part_cc', 'cc', 'cc', 'no_cc', 'no_cc')), 
                                                                                                           vt = as.factor(c(rep('d10', 4), rep('d1+d10', 2), rep('d1', 4))), 
                                                                                                           model_ouput = rnorm(10)
                                                                                                           )
                                                                                  example_df
                                                                                     strategy mt_equip      cc     vt model_ouput
                                                                                  1         A        r      cc    d10 -0.56047565
                                                                                  2         A        v      cc    d10 -0.23017749
                                                                                  3         B        r   no_cc    d10  1.55870831
                                                                                  4         B        v   no_cc    d10  0.07050839
                                                                                  5         C        r part_cc d1+d10  0.12928774
                                                                                  6         C        v part_cc d1+d10  1.71506499
                                                                                  7         D        r      cc     d1  0.46091621
                                                                                  8         D        v      cc     d1 -1.26506123
                                                                                  9         E        r   no_cc     d1 -0.68685285
                                                                                  10        E        v   no_cc     d1 -0.44566197
                                                                                  

                                                                                  My goal is to make a lollipop plot so that:

                                                                                  1. they are grouped and colored by cc, with mt_equip as the shape specification.
                                                                                  2. within each cc category, the lollipops are sorted from lowest to highest.
                                                                                  3. the lollipops should be separated and not entangled like in the figure shown.

                                                                                  I tried the geom_lollipop() option from the ggalt package as follows:

                                                                                  library(ggalt)
                                                                                  
                                                                                  option2 <- ggplot(data = example_df, 
                                                                                         aes(x = reorder(cc, model_ouput))) + 
                                                                                      geom_lollipop(aes(y = model_ouput,
                                                                                                     shape = mt_equip,
                                                                                                     color = cc),
                                                                                                    size = 5) +
                                                                                      scale_shape_manual(values = c(21, 24)) 
                                                                                  plot(option2)
                                                                                  

                                                                                  This is what I get:

                                                                                  How can I:

                                                                                  1. disentangle the lollipops so that each one stands alone within the cc group?
                                                                                  2. sort the disentangled lollipops in (1) from lowest to highest? I tried reorder but it did not produce the designed effect as shown in the image.
                                                                                  3. make the bars hollow for post-processing with color and stroke?

                                                                                  Thank you for your help.

                                                                                  ANSWER

                                                                                  Answered 2020-May-05 at 18:30

                                                                                  Upon taking a few hints from @GregorThomas, I finally solved the problem with the following code:

                                                                                  library(ggalt)
                                                                                  library(dplyr)
                                                                                  library(tidyr)
                                                                                  
                                                                                  set.seed(123)
                                                                                  example_df <- data.frame(strategy = as.factor(rep(LETTERS[1:5], each = 2)), 
                                                                                                           mt_equip = as.factor(rep(c('r', 'v'), times = 5)), 
                                                                                                           cc = as.factor(c('cc', 'cc', 'no_cc', 'no_cc', 'part_cc', 'part_cc', 'cc', 'cc', 'no_cc', 'no_cc')), 
                                                                                                           vt = as.factor(c(rep('d10', 4), rep('d1+d10', 2), rep('d1', 4))), 
                                                                                                           model_ouput = rnorm(10)
                                                                                  )
                                                                                  
                                                                                  
                                                                                  
                                                                                  #the strategy variable is not unique so we make it so but combining two cols
                                                                                  example_df_mod <- example_df %>%
                                                                                      unite(col = 'strategy', c(strategy, mt_equip), remove = F)
                                                                                  
                                                                                  #make lollipop plot grouped by cc and sorted within each group 
                                                                                  option2 <- example_df_mod %>% 
                                                                                      group_by(cc) %>% 
                                                                                      arrange(model_ouput, .by_group = T) %>% 
                                                                                      ggplot(aes(group = cc)) + 
                                                                                      geom_lollipop(aes(x = order(cc, model_ouput), 
                                                                                                        y = model_ouput,
                                                                                                        shape = mt_equip,
                                                                                                        color = cc),
                                                                                                    size = 5) 
                                                                                  plot(option2)
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/61602311

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install lollipops

                                                                                  Head over to the Releases to download the latest version for your system in a simple command-line executable. If you already have Go installed and want the bleeding edge, just go get -u github.com/joiningdata/lollipops to download the latest version.

                                                                                  Support

                                                                                  Please submit your bugs and features requests via the Issues tab. Be sure to search closed issues before submitting a new one in case the issue has been previously discussed. Pull Requests are welcome, but please create an issue beforehand to discuss significant changes. Code contributions are expected to be properly formatted with go fmt, and generally adhere to the standard Golang review guidelines.
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit

                                                                                  Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Reuse Pre-built Kits with lollipops

                                                                                  Consider Popular Genomics Libraries

                                                                                  Try Top Libraries by joiningdata

                                                                                  databio

                                                                                  by joiningdataGo

                                                                                  bam

                                                                                  by joiningdataGo

                                                                                  Compare Genomics Libraries with Highest Support

                                                                                  picard

                                                                                  by broadinstitute

                                                                                  galaxy

                                                                                  by galaxyproject

                                                                                  gatk

                                                                                  by broadinstitute

                                                                                  cbioportal

                                                                                  by cBioPortal

                                                                                  intermine

                                                                                  by intermine

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit