construct.names: translate construct names

Description Usage Arguments Details Value Examples

View source: R/fun-construct.names.R

Description

Convert construct numbers to their contents (inserts).

Usage

1
construct.names(data, dictionary)

Arguments

data

a data.frame; must contain a column called cells

dictionary

optional dictionary file or object, see Details

Details

When planning an experiment it is common to use names of constructs rather than the often lengthy descriptions of their inserts. This also helps when creating layout files, etc. However, the insert names have to be introduced eventually so that figures are readable and that may take a lot of typing.

The function utilizes a dictionary table to modify the "cells" column in data accordingly. By default this is taken from a file in the package's extdata directory, which can be replaced or modified at will as long as it is a tab delimited .txt file with two columns: "cells" and "insert". (You can find the package directory with path.package('acutils')).

Alternatively a custom file or a data frame object can be provided. The same restrictions apply.

Empty cell lines can be (and indeed are) placed in the dictionary. Their "insert" field is the same as their "cells" filed.

Value

a modified data frame

Examples

1
2
a <- data.frame(cells = c('HeLa', '448', NA, '500'))
construct.names(a)

olobiolo/acutils documentation built on Nov. 28, 2021, 9:35 p.m.