gene_indexer: Identifies genes annotated to the cell-cycle

Description Usage Arguments Value Examples

Description

Determines which of the genes contained in the dataset are annotated ti the cell-cycle. This is a preprocessing function for ccRemover. Genes can be either mouse or human and either official gene symbols, Ensembl, Entrez or Unigene IDs.

Usage

1
gene_indexer(gene_names, species = NULL, name_type = NULL)

Arguments

gene_names

A vector containing the gene names for the dataset.

species

The species which the gene names are from. Either "human" or "mouse".

name_type

The type of gene name considered either, Ensembl gene IDS ("ensembl"), offical gene symbols (symbol), Entrez gene IDS ("entrez"), or Unigene IDS (unigene).

Value

A vector containg the indices of genes which are annotated to the cell-cycle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
set.seed(10)
# Load in example data
data(t.cell_data)
head(t.cell_data[,1:5])
# Center example data
t_cell_data_cen <- t(scale(t(t.cell_data), center=TRUE, scale=FALSE))
# Extract gene names
gene_names <- rownames(t_cell_data_cen)
# Determine which genes are annotated to the cell-cycle
cell_cycle_gene_indices <- gene_indexer(gene_names = gene_names,
species = "mouse", name_type = "symbol")
# Create "if_cc" vector
if_cc <- rep(FALSE,nrow(t_cell_data_cen))
if_cc[cell_cycle_gene_indices] <- TRUE

# Can allow the function to automatically detect the name type
cell_cycle_gene_indices <- gene_indexer(gene_names = gene_names,
species = NULL, name_type = NULL)

ccRemover documentation built on May 2, 2019, 12:14 p.m.