Want to share your content on python-bloggers? click here.
Inclusion of our shiny.gosling package on Bioconductor is a three-fold milestone for us. First, it gives our developers the recognition they deserve. Second, it strengthens our position as a leading voice in bioinformatics software development. And finally, it amplifies our visibility and credibility within the scientific community.
For you, as a user, developer, or researcher, it means you’ll now have a much easier time incorporating genomics visualizations into your bioinformatics research projects and Shiny dashboards.
Today’s article will show you how to get started with shiny.gosling and Bioconductor in general.
Looking for practical genomics visualization examples? These 7 should get you started in with shiny.gosling R and R Shiny.
Table of contents:
- What is shiny.gosling and Why Should You Care?
- Why the Inclusion of shiny.gosling in Bioconductor is a Significant Milestone
- shiny.gosling in Action – How to Get Started in R and R Shiny
- Summing up shiny.gosling
What is shiny.gosling and Why Should You Care?
Genomics is a fascinating field, but one of the most challenging to bridge with computer science. There are too many niches within the field for any single R package to bridge the gap. No matter what you do, you simply can’t cover everyone’s point of interest and research.
Our shiny.gosling package is an R Shiny wrapper for gosling.js powered by shiny.react. In other words, it’s a grammar-based toolkit for scalable and interactive data visualization.
Let’s go over the main functionalities and benefits of using shiny.gosling for genomics data visualization.
Main Functionalities
- Interactivity– shiny.gosling provides interactive charts out of the box, which isn’t always a given in your typical R environment. Operations such as zooming, panning, brushing, and linking are supported.
- Scalability – Semantic zooming allows you to scale from whole genomes to single nucleotides.
- Expressiveness – The package is expressive, meaning you can generate almost any visualization of genome-mapped data you want. Our latest guide shows you a couple of examples to get started.
You now know what shiny.gosling is, but how exactly is it tied with Bioconductor? And what is Bioconductor in the first place? Let’s answer that next.
Why the Inclusion of shiny.gosling in Bioconductor is a Significant Milestone
We already mentioned that having an R package included in Bioconductor is a huge accomplishment, both for our developers and for Appsilon as a company. This section will provide more details into why, and will also show how you can benefit from it.
What is Bioconductor?
Bioconductor is a project that aims to develop and share open-source software for precise and repeatable analysis of biological data. It’s updated twice a year, and the latest version includes exactly 2300 packages!
So, it’s clear that many companies and developers around the world are contributing to Bioconductor with the same goal in mind. We’re proud to be on that list.
Inclusion Benefits for Users and Developers
If you’re thinking about switching to Bioconductor for your bioinformatics research, here are a couple of reasons to go for it:
- Package quality: Do you know what’s the single thing all 2300 Bioconductor packages have in common? It’s quality. Each submitted package goes through a review process, meaning you can rest assured that the package has been thoroughly tested and validated. In the end, this means you shouldn’t have to worry about mysterious bugs and performance issues.
- Comprehensive documentation: Documentation for your typical R packages can be hit or miss. With Bioconductor, each package comes with extensive documentation and examples, making it easier to implement and use in your research.
- Code reproducibility: Due to the nature of the Bioconductor release process, using a specific version of the Bioconductor release makes sure that you get the exact same version of the R package from the Bioconductor repository which will work the same.
On the other hand, if you’re a developer in the field of bioinformatics, submitting an R package to Bioconductor also has its fair share of advantages:
- Visibility: Once your contributions to an open-source project get noticed, your visibility within the field and community will go up. Further, publishing on a trusted and reputable platform is a sure way to showcase potential employees that you mean business.
- Credibility: If you have a reputable platform standing behind your work, it carries a lot more weight than publishing the same packages to more generic repositories. It’s also a guaranteed way to establish yourself as an expert in the field.
To conclude, having a package accepted by Bioconductor means you’re on the right track to becoming a subject matter expert in bioinformatics – both as a company and as an individual. Our recent inclusion did just that for Appsilon as a company and our team of expert developers.
Starting Small – How to Run Basic shiny.gosling examples
Before diving deeper into Shiny examples, let’s take a peek at a couple of examples that are available to you in a single function call.
The shiny.gosling::run_example()
function can be used to run any of the 17 examples that come by default with the package installation. You can pass one of the following values into the function:
areaChart
,barChart
,circosVcfData
,circosVectorData
,circularLinearWithBrush
,circularVisualEncoding
,ideograms
,lineChart
,multiTrackApp
,pointPlot
,ruleMarks
,sarsCov2
,staticCircularBar
,structuralVariant
,textAnnotation
,textMarks
, andvcfSimpleBarChart
Let’s see one of these in action:
shiny.gosling::run_example("circularVisualEncoding")
This is the output you’ll see after running the example:
That was simple, wasn’t it?
Up next, we’re about to complicate things slightly.
R Shiny is transforming processes in the Pharmaceutical industry? Read (and watch) our latest talk in R/Basel to find out how.
shiny.gosling in Action – How to Get Started in R and R Shiny
The BiocManager
package in R allows you to install the mentioned 2300 approved packages straight from the R console. The alternative way is to get started through a Docker container. We’ll proceed with the first option.
Assuming you have R installed (R version 4.4.0 or above is required for Bioconductor 3.19), get the BiocManager
package by running the following command from the R console:
Once installed, proceed with shiny.gosling installation:
You can see how the package was installed through BiocManager
instead of your typical install.packages()
command.
When it comes to R Shiny, the shiny.gosling package provides a couple of functions you must know about:
use_gosling()
– A function you must call at the beginning ofui
. Without it, Gosling won’t be able to work in R Shiny plots.goslingOutput()
– Allows you to specifyoutputId
for a Gosling component that will be rendered in R Shiny.gosling()
– Builds a Gosling plot object, and is typically embedded in therenderGosling()
function.renderGosling()
– Renders a Gosling chart in R Shiny by constructing a Gosling plot object (callgosling()
inside the expression).
Now with this knowledge, we’ll build a multi-scale sequence track application that displays DNA base counts and annotations, allowing the user to explore genomic data related to the SARS-CoV-2 virus. The code snippet below will fetch the base counts data organized into rows and columns with attributes such as base, position, count, and categories (A, T, G, C).
For a more detailed description of the data processing pipeline, visit the official example documentation.
Anyhow, here’s the entire code snippet:
You can see that ~ 85% of the code has to do with data gathering and processing. The convenient shiny.gosling functions do most of the heavy lifting when it comes to visualization – you just have to call the functions.
This is the R Shiny dashboard you’ll end up with:
There are many more well-documented examples on the official Bioconductor shiny.gosling documentation page, so make sure to pay a visit.
Summing up shiny.gosling
Having a package included in a trusted and reputable platform such as Bioconductor is a huge accomplishment for Appsilon as a company and our team of expert developers. It validates months of hard work and makes future development that much more rewarding.
We’re excited to see how will developers and researchers use our package to help them tackle the biggest challenges in bioinformatics. If you fit into this group, we’d love to hear from you! Make sure to try shiny.gosling and provide feedback.
Did you find this blog post helpful? Sign up to Shiny Weekly to stay up to date on shiny.gosling and other open-source packages.
The post appeared first on appsilon.com/blog/.
Want to share your content on python-bloggers? click here.