View source: R/remove_duplicate_genes.R
remove_duplicate_genes | R Documentation |
Remove duplicate gene symbol on a gene expression data
remove_duplicate_genes(eset, column_of_symbol, method = "mean")
eset |
Gene expression data with gene symbol in 'column_of_symbol' |
column_of_symbol |
name of column contained gene symbols |
method |
method used to filter duplicate genes; default is mean value |
Dongqiang Zeng
# loading eset
data("eset_stad", package = "IOBR")
# annotation
eset_stad <- anno_eset(eset = eset_stad, annotation = anno_rnaseq)
eset_stad <- rownames_to_column(eset_stad, var = "id")
# Creating duplicate gene names
eset_stad[2:3, "id"] <- "MT-CO1"
# Counting the number of identical names
summary(duplicated(eset_stad$id))
# De-duplication of rows with the same gene name using the average value
eset_stad<-remove_duplicate_genes(eset = eset_stad, column_of_symbol = "id", method = "mean")
summary(duplicated(eset_stad$id))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.