ConvertRownameToLoci: Convert Rowname To Loci

View source: R/timer.R

ConvertRownameToLociR Documentation

Convert Rowname To Loci

Description

This function processes a gene expression data matrix by modifying its row names. It extracts the gene identifier from the row names assuming they contain additional information separated by a '|'. The function is specifically designed to handle row names formatted as 'LOC389332|389332', and it will simplify these to 'LOC389332'.

Usage

ConvertRownameToLoci(cancerGeneExpression)

Arguments

cancerGeneExpression

A matrix or data frame of cancer gene expression data with row names in the format 'GENE|ID'. The function will modify these row names to keep only the gene part before the '|'.

Value

A matrix containing the modified gene expression data with updated row names. Rows without a valid identifier (i.e., names not containing '|') are removed.

Examples

# Assume `data` is your original gene expression matrix with compound row names
example_data <- matrix(runif(20), ncol=5)
rownames(example_data) <- c("LOC101", "LOC102", "LOC103", "LOC104")
# Process the data to convert row names
processed_data <- ConvertRownameToLoci(example_data)
print(processed_data)

IOBR/IOBR documentation built on Nov. 13, 2024, 5:22 a.m.