Skip to contents

Information on final microhaplotype results from a targeted amplicon analysis with associated meta data.

Usage

write_pmo(pmo, path, pretty = FALSE, auto_unbox = TRUE, validate = TRUE, ...)

Arguments

pmo

A PortableMicrohaplotypeObject instance.

path

Output path.

pretty

Logical; pretty-print the JSON.

auto_unbox

Logical; passed to jsonlite::toJSON().

validate

Logical; if TRUE, validate before writing.

...

Additional arguments passed through to to_json().

Value

Invisibly returns path.

Details

Writes a PMO object to JSON, with optional compression inferred from the file extension.

Examples

pmo <- read_pmo(
  system.file('extdata', 'example_pmo.json.gz', package = 'pmotoolsr'))
write_pmo(pmo, tempfile(fileext = '.json'))