a shiny app to visualize radiologist agreement data

See the app here: Link

One of the research projects I am currently working on is to establish the level of variability in radiologist reads of neurovascular conflict of the trigeminal nerve from skull base MRI. The level of variability in these reads matters because surgeons utilize skull base MRI when deciding which patients with trigeminal neuralgia would be good candidates for a surgical procedure called microvascular decompression, where blood vessels and arachnoid structures are separated from the trigeminal nerve.

The first step of this project was to identify skull base MRI of sufficient quality and resolution that capture the course of the trigeminal nerve from the Pons through Meckel’s Cave. We did a search of our PACS database for MRI studies with the words “trigeminal” “skull base” “CISS” “SPACE” contained in the description. CISS and SPACE are T2 like sequences commonly used in skull base imaging for their impressive csf-brain matter contrast.

This search resulted in 2000+ candidate scans, which were manually screened for image quality. Our final dataset consists of over 1000 cases, which means 2000 trigeminal nerves. These scans were anonymized, assigned a study ID, and batched into groups of 20 scans apiece.

Next the four radiologists who didn’t know what they were signing up for independently read all 1000+ scans (2000+ nerves) for four items.

  1. Degree of neurovascular conflict from (0) no conflict, (1) abutment of nearby vessels on the trigeminal nerve, (2) compression of the nerve by nearby vessels. If there is some kind of neurovascular conflict, the radiologists record the following three fields:
  2. Surface of the trigeminal nerve impacted by the vascular structures.
  3. Whether the conflict is arterial, venous, mixed, or unclear.
  4. The distance measured anteriorly along the nerve from the Pons that the conflict occurs.

The radiologists are in the middle of doing these reads. I was calculating agreement statistics and various other visualizations on the groups of data, which I would knit into HTML reports using R’s R Markdown functionality to share with the group and my mentors. I had it set up pretty slick, where I needed to change a few parameters to get reports for different ranges of the data and with different groups of the readers, but it still required me to reknit the report each time I wanted to see a different range of data.

The solution? A shiny app!

This was fun to work on. I have built other full-stack applications, and where shiny development differs is in its focus. Largely, the actual HTML and CSS work is taken care of behind the scenes, allowing the app writer to focus on the calculations, the visualizations, and the user input. As most of the statistics scripts were already built for my HTML reports, most of the code I wrote for the shiny app was in the UI and Server files.

You can see the app at this Link.