run_metamorphic_test_workflow: Completes the Metamorphic Testing workflow

View source: R/workflow.R

run_metamorphic_test_workflowR Documentation

Completes the Metamorphic Testing workflow

Description

This function completes the entire metamorphic testing clustering workflow, on different data transformation types, and with different clustering methods. This tests different types of metamorphic tests, including permutations, adding genes, etc. The original data is clustered using the clustering workflow, and then the each of the metamorphic tests is applied and the clustering is recomputed. The log data transformation pipeline includes filter_data, annotating, applying the log transformation, selecting the Highly Variable Genes, and finally scaling the data before dimensionality reduction, and clustering. The TFIDF data transformation completes the TFIDF data transformation, annotates the data, and selects the Highly Variable Genes before applying dimensionality reduction and finally clustering. The clustering parameters are set to default, except for the number of clusters in kmeans clustering, which is set to 10. If a score of 0 is returned it means that the dataset did not pass any of the metamorphic tests, if a 1 is returned then it means that the datasets passed the metamorphic test. Any number in between 0 and 1 representsd the percent of reductions that passed the metamorphic test

Usage

run_metamorphic_test_workflow(
  dataList,
  method = "kmeans",
  transformationType = "log",
  seed = 1,
  numberClusters = 10,
  metamorphicTests = c(1:6)
)

Arguments

dataList

A list of the data sets

method

The method of clustering to use, defaults to Kmeans

transformationType

The data transformation to be used, defaults to the log transformation

seed

The seed to be set for reproducibility, defaults to 1

numberClusters

The number of clusters to use for Kmeans clustering, defaults to 10

metamorphicTests

a vector of the metamorphic tests to apply, the options are Permute Cells, Modify Gene Counts, Add Duplicate Cell, Permute Genes, Add Zero Variance Gene, Flip Gene Counts

Value

A report of which metamorphic tests were passed.


NWhitener/benchmarking documentation built on Oct. 23, 2023, 12:20 a.m.