guessMapping-LongTableDataMapper-method: Guess which columns in raw experiment data map to which...

guessMapping,LongTableDataMapper-methodR Documentation

Guess which columns in raw experiment data map to which dimensions.

Description

Checks for columns which are uniquely identified by a group of identifiers. This should be used to help identify the columns required to uniquely identify the rows, columns, assays and metadata of a DataMapper class object.

Usage

## S4 method for signature 'LongTableDataMapper'
guessMapping(object, groups, subset, data = FALSE)

Arguments

object

A LongTableDataMapper object.

groups

A list containing one or more vector of column names to group-by. The function uses these to determine 1:1 mappings between the combination of columns in each vector and unique values in the raw data columns.

subset

A logical vector indicating whether to to subset out mapped columns after each grouping. Must be a single TRUE or FALSE or have the same length as groups, indicating whether to subset out mapped columns after each grouping. This will prevent mapping a column to two different groups.

data

A logical vector indicating whether you would like the data for mapped columns to be returned instead of their column names. Defaults to FALSE for easy use assigning mapped columns to a DataMapper object.

Details

Any unmapped columns will be added to the end of the returned list in an item called unmapped.

The function automatically guesses metadata by checking if any columns have only a single value. This is returned as an additional item in the list.

Value

A list, where each item is named for the associated groups item the guess is for. The character vector in each item are columns which are uniquely identified by the identifiers from that group.

Examples

guessMapping(exampleDataMapper, groups=list(rows='treatmentid', cols='sampleid'),
subset=FALSE)


bhklab/CoreGx documentation built on March 14, 2024, 3:04 a.m.