Skip to contents

This class manages a collection of benchmark trios and mapping functions. It allows adding new trios, mapping functions, and running mappings on data.

Public fields

trios

A list to store benchmark trios.

mapping_functions

A list to store mapping functions with metadata.

Methods


Method new()

Usage

BenchHubStudy$new(name = NULL, trios = list())

Arguments

trios

A list of Trio objects to initialize the study.


Method add_trio()

Add a new trio to the study

Usage

BenchHubStudy$add_trio(name, trio_object)

Arguments

name

A character string to name the trio.

trio_object

A Trio object to be added.


Method add_mapping_function()

Add a mapping function with metadata

Usage

BenchHubStudy$add_mapping_function(
  name,
  func,
  input_description,
  output_description,
  example_usage = NULL
)

Arguments

name

A character string to name the mapping function.

func

A function that takes data as input and returns transformed data.

input_description

A character string describing the input data.

output_description

A character string describing the output data.

example_usage

An optional character string showing example usage of the function.


Method run_mapping()

Apply a mapping function to data

Usage

BenchHubStudy$run_mapping(mapping_name, data)

Arguments

mapping_name

A character string naming the mapping function to apply.

data

The data to which the mapping function will be applied.

Returns

The transformed data after applying the mapping function.


Method get_mapping_function_documentation()

Documentation getter for mapping function

Usage

BenchHubStudy$get_mapping_function_documentation(mapping_name)

Arguments

mapping_name

A character string naming the mapping function.

Returns

A list containing the input description, output description, and example usage.


Method list_mapping_functions()

available options

Usage

BenchHubStudy$list_mapping_functions()

Returns

A character vector of mapping function names.


Method generate_vignette_template()

Generate R Markdown vignette template

Usage

BenchHubStudy$generate_vignette_template(
  output_path = "benchmark_study_template.Rmd"
)

Arguments

output_path

A character string specifying the path to save the vignette template.


Method evaluate()

Evaluate a trio with input data

Usage

BenchHubStudy$evaluate(trioName, input)

Arguments

trioName

A character string naming the trio to evaluate.

input

The input data to evaluate the trio against.

Returns

The evaluation result from the trio.


Method writeBenchHubStudy()

Write the BenchHubStudy metadata to Curated Trio Datasets sheet.

Usage

BenchHubStudy$writeBenchHubStudy()


Method clone()

The objects of this class are cloneable with this method.

Usage

BenchHubStudy$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.