searchGene: Search a "gene" contained in a character vector

Description Usage Arguments Value Author(s) Examples

View source: R/searchGene.R

Description

This function offers the possibility to search genes (character pattern) contained in a character vector separted by a given separator (semi-colon by default).

Usage

1
searchGene(x, gene, sep = ";", type = "logical")

Arguments

x

A character vector.

gene

A character vector, the gene (character pattern) of interest.

sep

A character vector, the separator between genes (by default, sep=";").

type

A character indicating the type of values returned by the function. By default the function return a logical vector (type="logical"). The type "numeric" and "value" return position and value respectively.

Value

The functiuon returns a vector of logical (type="logical"), numeric (type="numeric") or character (type="value") depending of the selected type.

Author(s)

Pierre Bady

Examples

1
2
3
4
5
6
{
genelist <-c("MGMT","MGMT;MGMT","MGMT;EGFR","HOXA1;EGFR;HOXA2","EGFR;MGMT",NA)
searchGene(genelist,"EGFR",sep=";",type="logical")
searchGene(genelist,"EGFR",sep=";",type="numeric")
searchGene(genelist,"EGFR",sep=";",type="value")
}

ProbeAnnotator documentation built on May 31, 2017, 4:01 a.m.