fix_bad_hgnc_symbols: fix_bad_hgnc_symbols - Given an expression matrix, wherein...

Description Usage Arguments Value Examples

View source: R/fix_bad_hgnc_symbols.r

Description

fix_bad_hgnc_symbols - Given an expression matrix, wherein the rows are supposed to be HGNC symbols, find those symbols which are not official HGNC symbols, then correct them if possible. Return the expression matrix with corrected symbols.

Usage

1
fix_bad_hgnc_symbols(exp, dropNonHGNC = FALSE)

Arguments

exp

An expression matrix where the rows are HGNC symbols or an SingleCellExperiment (SCE) or other Ranged Summarized Experiment (SE) type object.

dropNonHGNC

Boolean. Should symbols not recognised as HGNC symbols be dropped?

Value

Returns the expression matrix with the rownames corrected and rows representing the same gene merged. If a SingleCellExperiment (SCE) or other Ranged Summarized Experiment (SE) type object was inputted this will be returned with the corrected expression matrix under counts.

Examples

1
2
3
4
5
6
7
8
#create example expression matrix, could be part of a exp, annot list obj
exp <- matrix(data = runif(70),ncol =10)
#Add HGNC gene names but add with an error:
#MARCH8 is a HGNC symbol which if opened in excel will convert to Mar-08
rownames(exp) <- 
    c("MT-TF","MT-RNR1","MT-TV","MT-RNR2","MT-TL1","MT-ND1","Mar-08")
exp <- fix_bad_hgnc_symbols(exp)
#fix_bad_hgnc_symbols warns the user of this possible issue 

NathanSkene/EWCE documentation built on June 19, 2021, 5:40 a.m.