microbiomeFHIR - turn a patient's microbiome OTU data into FHIR

library(microbiomefhir)

library(tidyverse)
library(curatedMetagenomicData)
library(phyloseq)
library(here)

The microbiomfhir package allows the conversion of a patient's OTU table into a structured FHIR DiagnosticReport. At this point the package only supports the import of phyloseq objects.

Planned features

Installation Instructions

The package is currenlty available via GitHub

devtools::install_github("https://github.com/NiklasTR/microbiomefhir")

The package has, among others, the following requirements:

Example

Let's use the package's built-in function to collect an example from Levi Waldron's excellent curated Metagenomic Data ressource.

pseq <- load_example()

Here is a glimpse at one of the OTU table profiles. We can see the patient identifier as the column name. Each row represents a taxonomic unit (from kingdom - Bacteria down to many species).

otu_table(pseq)[,1] %>% head(30)

We can simply export the patient's OTU table into a FHIR DiagnosticReport:

parse_json(pseq, file = here("output/my_first_microbiome_fhir_report.json"))

We can take a closer look at out output JSON file.

Without more data, the function currenlty makes multiple assumptions

readLines(here("output/my_first_microbiome_fhir_report.json"), 150)


NiklasTR/microbiomefhir documentation built on June 23, 2019, 2:06 a.m.