pbreporter: Sugar object to make it easier to generate reports.

Description Usage Arguments Details

Description

When writing a report, there is a lot of "state" to account for. Plots and tables must be written to the same output directory, and whenever a file is output, we have to update the pbreport to ensure it shows up in the GUI.

Usage

1
2
pbreporter(conditionFile, outputFile, reportid, reportTitle,
  version = "0.0.1")

Arguments

reportid

A lowercase/no-special character ID.

reportTitle

The name of the report.

version

The version number (1.0.0)

reSeqConditions

The file with the resequencing conditions.

reportOutputPath

The path of the report JSON file to write.

Details

Passing all this information around gets annoying fast. R is a functional language and does not like keeping track of state very much. To work around this, we are going to use the closure approach outlined in Section 5.4 of "Software for Data Analysis" by John Chambers. The basic idea is that we'll define functions for saving plots/data in a closure that contains an environment with the objects we want to update.

This could also be accomplished using the newer reference classes introduced in R version 2.12. However I haven't seen those used at PacBio yet and it's less elegant, so will avoid introducing new syntax.


mpkocher/pbcommandR documentation built on May 23, 2019, 6:32 a.m.