Skip to contents

Get or set parameters for AnalysisParameters or Analysis class objects.

Usage

parameters(d, ...)

# S4 method for AnalysisParameters
parameters(d, element)

# S4 method for Analysis
parameters(d)

parameters(d, element) <- value

# S4 method for AnalysisParameters
parameters(d, element) <- value

# S4 method for Analysis
parameters(d) <- value

Arguments

d

S4 object of class AnalysisParameters or Analysis

...

arguments to pass to the appropriate method

element

analysis element for parameters to extract or assign. Should be one of those returned by analysisElements()

value

list containing parameter values

Examples

p <- analysisParameters('pre-treatment')

## extract pre-treatment parameters
parameters(p,'pre-treatment')
#> $QC
#> $QC$occupancyFilter
#> $QC$occupancyFilter$cls
#> [1] "class"
#> 
#> $QC$occupancyFilter$QCidx
#> [1] "QC"
#> 
#> $QC$occupancyFilter$occupancy
#> 2/3
#> 
#> 
#> $QC$impute
#> $QC$impute$cls
#> [1] "class"
#> 
#> $QC$impute$QCidx
#> [1] "QC"
#> 
#> $QC$impute$occupancy
#> 2/3
#> 
#> $QC$impute$parallel
#> [1] "variables"
#> 
#> $QC$impute$seed
#> [1] 1234
#> 
#> 
#> $QC$RSDfilter
#> $QC$RSDfilter$cls
#> [1] "class"
#> 
#> $QC$RSDfilter$QCidx
#> [1] "QC"
#> 
#> $QC$RSDfilter$RSDthresh
#> [1] 50
#> 
#> 
#> $QC$removeQC
#> $QC$removeQC$cls
#> [1] "class"
#> 
#> $QC$removeQC$QCidx
#> [1] "QC"
#> 
#> 
#> 
#> $occupancyFilter
#> $occupancyFilter$maximum
#> $occupancyFilter$maximum$cls
#> [1] "class"
#> 
#> $occupancyFilter$maximum$occupancy
#> 2/3
#> 
#> 
#> 
#> $impute
#> $impute$class
#> $impute$class$cls
#> [1] "class"
#> 
#> $impute$class$occupancy
#> 2/3
#> 
#> $impute$class$seed
#> [1] 1234
#> 
#> 
#> 
#> $transform
#> $transform$TICnorm
#> $transform$TICnorm$refactor
#> [1] TRUE
#> 
#> 
#> 

## set pre-treatment parameters
parameters(p,'pre-treatment') <- preTreatmentParameters(
  list(
    remove = 'classes',
    QC = c('RSDfilter','removeQC'),
    transform = 'TICnorm'
  )
)

print(p)
#> Parameters:
#> pre-treatment
#> 	remove
#> 		classes
#> 			cls = class
#> 			classes = c()
#> 	QC
#> 		RSDfilter
#> 			cls = class
#> 			QCidx = QC
#> 			RSDthresh = 50
#> 		removeQC
#> 			cls = class
#> 			QCidx = QC
#> 	transform
#> 		TICnorm
#> 			refactor = TRUE
#>