check_genes: Check gene input

View source: R/check-family-adjusting.R

check_genesR Documentation

Check gene input

Description

A member of the adjusting-check_*()-family. Takes a character vector of gene names and checks which of the genes exist.

Returns an adjusted genes-vector or raises an error.

Usage

check_genes(object, genes, rna_assay = NULL, max_length = NULL)

Arguments

genes

The genes of interest specified as a character vector.

rna_assay

The rna-assay you want to look in. If set to NULL the whole rna_assay of the specified object will be used with exprMtr().

Details

Members of the adjusting-check_*()-family take their arguments input and compare it to a variety of requirement settings by running several logical tests. If the input turns out to be appropriate for the main-function they return it the way it is supposed to be returned. If not, depending on the degree of deviation from the optimum, they either adjust the input in order not to interrupt the function or - if not adjustable - raise an error. In both cases informative messages will be printed in order to let the user know what has been adjusted or what part of the input was insufficient.

Value

The original input, an adjusted version of it or an error. In the latter two cases they print an informative message about what was going on.


kueckelj/SPATA documentation built on March 22, 2022, 9:59 p.m.