translateMatrix: Translate matrix rownames

Description Usage Arguments Value

View source: R/translate_matrix.R

Description

Translates the rownames of the input matrix into the desired ids using a translator data frame. When input ids maps to several target ids, uses the summarise function to resolve conflicts.

Usage

1
translateMatrix(mat, df, sourceKey, targetKey, summariseFun)

Arguments

mat

Input matrix. Should have rownames.

df

A 2-columns translator data frame with source to target ids.

sourceKey

Character indicating the column of the df where the source ids are stored.

targetKey

Character indicating the column of the df where the source ids are stored.

summariseFun

Function used to resolve multi-mapping situations.

Value

A matrix with translated and summarised ids.


martingarrido/biokit documentation built on June 27, 2021, 2:21 a.m.