getMarker: Marker selection

Description Usage Arguments Value Examples

Description

Selecting markers if gene pairs are mutual nearest coexpressed or exclusivity in a number of cells.

Usage

1
getMarker(obj, k=300, n=30)

Arguments

obj

The list oject from function GeneFilter

k

The maximum number that how many nearest neighbors would be considered, default = 300.

n

The minimum number which is the coexpressed/mutually exclusivie cells for each gene pairs, default = 30

Value

dataThe raw expresion data after filter widly expressed genes geneSummA data frame including gene names as, corresponding number of expressed cells and the peak number of probability density distribution function cellSummA data frame including cell ID and corresponding number of expressed genes binadataThe binary expression matrix corresponding to raw data markerThe filnal marker selected

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
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)
res=getMarker(obj=res)
res=getMarker(obj=res,k=200,n=20)


## The function is currently defined as
function (obj, k=300, n=30)
{
    data = obj$newdata
    binadata = obj$binadata
    genename = row.names(binadata)
    geneindex = rowSums(binadata)
    HamD = tcrossprod(binadata)
    diag(HamD) = 0
    HamDD = tcrossprod((1 - binadata), binadata)
    MNNmarker = getMNN(HamD = HamD, genename = genename, k = k,
        n = n)
    MENmarker = getMEN(HamD = HamDD, genename = genename, k = k,
        n = n)
    obj$marker = union(MNNmarker, MENmarker)
    return(obj)
  }

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