GeneFilter: Filtering gene

Description Usage Arguments Value See Also Examples

Description

Filtering genes which are widely expressed in most of the cell population.

Usage

1

Arguments

obj

The list object from function ModalFilter

Value

\res

dataThe raw expresion data after filter widly expressed genes \resgeneSummA data frame including gene names as, corresponding number of expressed cells and the peak number of probability density distribution function \rescellSummA data frame including cell ID and corresponding number of expressed genes \resbinadataThe binary expression matrix corresponding to raw data

See Also

ModalFilter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
data(melanoma)
melanoma1=as.matrix(melanoma[,2:dim(melanoma)[2]])
row.names(melanoma1)=melanoma[,1]
res=ModalFilter(data=melanoma1,geneK=10,cellK=10,width=2,cutoff=2)
res=GeneFilter(obj=res)


## The function is currently defined as
function (obj) 
{
    maxexp = dim(obj$newdata)[2]
    data(excludeGene)
    excludeGene = as.character(excludeGene[, 1])
    geneSumm = obj$geneSumm
    index = match(geneSumm$gene, excludeGene)
    geneSumm = geneSumm[is.na(index), ]
    data = obj$newdata
    index = match(geneSumm$gene, row.names(data))
    data = data[index, ]
    binadata = obj$binadata
    binadata = binadata[index, ]
    geneindex = rowSums(binadata)
    binadata = binadata[geneindex < maxexp, ]
    data = data[geneindex < maxexp, ]
    geneSumm = geneSumm[geneindex < maxexp, ]
    obj$newdata = data
    obj$geneSumm = geneSumm
    obj$binadata = as.matrix(binadata)
    return(obj)
  }

Fang0828/SCMarker documentation built on May 13, 2019, 12:51 p.m.