validate.alg.args {metaseqR} | R Documentation

## Validate normalization and statistical algorithm arguments

### Description

This function checks and validates the arguments passed by the user to the normalization and statistics algorithms supported by metaseqR. As these are given into lists and passed to the algorithms, the list members must be checked for `NULL`, valid names etc. This function performs these checks and ignores any invalid arguments.

### Usage

        validate.alg.args(normalization, statistics,
            norm.args, stat.args)

### Arguments

`normalization` | a keyword determining the normalization strategy to be performed by metaseqR. See `metaseqr` main help page for details.
`statistics` | the statistical tests to be performed by metaseqR. See `metaseqr` main help page for details.
`norm.args` | the user input list of normalization arguments. See `metaseqr` main help page for details.
`stat.args` | the user input list of statistical test arguments. See `metaseqr` main help page for details.

### Value

A list with two members (`norm.args`, `stat.args`) with valid arguments to be used as user input for the algorithms supported by metaseqR.

### Author(s)

Panagiotis Moulos

### Examples

    normalization <- "edaseq"
    statistics <- "edger"
    norm.args <- get.defaults("normalization","edaseq")
    stat.args <- get.defaults("statistics","deseq")
    # Will return as is
    val <- validate.alg.args(normalization,statistics,norm.args,stat.args)
    val$norm.args
    val$stat.args
    # but...
    stat.args <- c(stat.args,my.irrelevant.arg=999)
    val <- validate.alg.args(normalization,statistics,norm.args,stat.args)
    # irrelevant argument will be removed
    val$norm.args
    val$stat.args

[Package metaseqR version 1.28.0 Index]