Using Exponents In Ggpubr Stat Compare

As part of a page proof request, a boxplot with the ggpubr package was flagged as needing exponential notation for the small pvalues (e.g., 1x10^-4 vs 1e-04). That seemed easy. And it was, after a long battle with expressions, bquote, and other R concepts…

Read More

Long Dash For Negative In Complexheatmap

As part of page proofs for a paper, we were asked to used the unicode character \u2212 for the negative sign in figures. These were figures generated by R, so I assumed that the negative character was likely appropriate, but tackled the question with some confidence given the excellent documentation of ComplexHeatmap.

Read More

Dropping Commas In Flextable

This is a small thing, but during page proofs for a paper we were requested to format numbers as having no commas unless they were 5 digits. That is, 4000 vs. 4,000. But to include a comma if the value is 10,000 but not 9999.

Read More

Using Arrow In Shiny

Many of my shiny apps follow a very specific recipe: load data, show various representations (tables, figures) of the data, allow user to download the data. A recurring issue with this setup is that if the data is at all big, there can be a delay getting things started.

Read More

Page Ordering In Quarto Website

A small thing, but something that’s been incorporated into my development. Sometimes a directory of reports that turn into a website are not in the order I’d like them to be (logical progression of ideas).

Read More

Integrating Quarto And Shiny

I have been working with quarto for a while, generating static web pages and pushing these to a shiny server. This has been fairly successful, however there is always this nagging feeling that I’ll need to have a shiny app for some of these analysis projects. That day finally came in the form of a tabular display (coupled with downloads) that seemed best suited for a simple shiny app.

Read More

Forcing Files Into Quarto Wesbite

This is a small issue, but as part of a quarto website I was building for a project I wanted to include a shiny app (app.R) and a data file (cmap.arrow). I wanted to make this work with the quarto render approach. I used rsync instead of quarto publish to push the site to a shiny server.

Read More

Simple Cromwell Example

Simple Cromwell/WDL

For the sake of a self-tutorial, I created a simple workflow in cromwell that allows me to explore the options available and also the execution process. This makes it easier to wrap my head around all of the components needed by cromwell to make the magic happen.

Read More

Configuring Cromwell Backends

Overview

Cromwell works by being a workflow engine, namely it takes the definitions of how to do the work and executes them using existing resources. This is the overall strength of any workflow software - separate the specification of what needs doing from the glue that executes it. I know from my experiences, the intermingling of “glue” and content makes code more complicated and difficult to follow. Not to mention porting the code to another system. Cromwell handles this via backends. There are several options and a configuration file that allows you to customize execution to your environment. I was not at all clear on this topic, so below are the notes and details as I understand them. Note that at the moment, I only use local and HPC (cluster) resources not GCP or other platforms.

Read More

Cromwell Wdl Start To Finish

As part of a project I’m working on, I need to run the MultiQC (https://multiqc.info/) tool on some RNA Sequencing results. Yes, I could create a conda environment, submit a job on our slurm cluster using a simple batch script, and be done.

Read More

Creating HuRSTA Packages

Overview

I have been wanting to incorporate a custom array into R for quite some time. Thanks to recent events, I’ve had a chance to tackle this while working on a specific project. I thought I would document some of the details of the chip and the annotations, in case I need to remember them again at some point.

Read More

Creating a new ggplot type

Overview

I’m working on a paper with a collaborator and I’m running into a problem. ggplot is great, particularly the violin plots, but it doesn’t quite do what I need. Specifically, I need the violins to be colored by density from green (low density) to yellow (high density). I found ggridges, which is close to what I need, except that the plots are one-sided (not a violin) and they overlap each other. So this prompted the idea of creating a new ggplot type that implements density-coloring for violin plots. I’ve never done it before, so I thought I’d document my process here.

Read More