ISS_cluster: Cluster ISS data based on different methods.

Description Usage Arguments Examples

View source: R/6.1_ISS_cluster.R

Description

Cluster ISS data by different methods used in SEURAT, MONOCLE, BackSPIN.

Usage

1
2
3
ISS_cluster(data, method = "seurat", DEGmethod = "seurat", pc = 1,
  cluster_id = NULL, resolution = 0.3, algorithm = 1,
  do.norm = TRUE, do.scale = TRUE, k.param = 30)

Arguments

data

Input data in class MolDiaISS. Output of readISS.

method

Method of clustering. SEURAT, backspin, monocle.

DEGmethod

Methods to find DE genes.NULL means use all genes.

pc

Desired percent of variance (0 to 1) to be explained by PCA. Default is 1 (All PC will use).

cluster_id

Re-cluster clustreded data. Numeric input. Default is NULL.

resolution

Value of the resolution parameter, use a value above (below) 1.0 if you want to obtain a larger (smaller) number of communities. Default is 0.3.

algorithm

Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm). Default is 1.

do.norm

Do normalization

do.scale

Do scalling

k.param

Defines k for the k-nearest neighbor algorithm

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
31
## Reading data
left_hypo <- readISS(file = system.file("extdata", "Hypocampus_left.csv", package="MolDia"),
                  cellid = "CellId", centX = "centroid_x", centY = "centroid_y")

## Arrange marker gene
data(marker_gene)
mark_gene <- list(genr = marker_gene$genr, neuron = c(marker_gene$genr_neuro,
                                                      marker_gene$genr_neuro_pyra1,
                                                      marker_gene$genr_neuro_pyra2,
                                                      marker_gene$genr_neuro_inter1,
                                                      marker_gene$genr_neuro_inter2,
                                                      marker_gene$genr_neuro_inter3,
                                                      marker_gene$genr_neuro_inter4,
                                                      marker_gene$genr_neuro_inter5,
                                                      marker_gene$genr_neuro_inter6),
                                            nonneuron = marker_gene$genr_nonneuro)

## Barplot of Neuronal marker gene and extract those cells only
neuron_group <- ISS_barplot(data = left_hypo, gene = mark_gene, gene.target = 2,
                            at.least.gene = 2, gene.show = 2)
## Data preprocessing
neuron_group <- ISS_preprocess(data = neuron_group, normalization.method = "LogNormalize",
                               do.scale = TRUE, do.center = TRUE)

## Cluster data based on SEURAT pipeline
neuron_group_clust  <- ISS_cluster (data = neuron_group, method = "seurat",
                                    pc = 0.9, resolution = 0.3)

## Re-cluster specific cluster
re_clust  <- ISS_cluster (data = neuron_group_clust, method = "seurat",
                                 pc = 0.9, cluster_id = 3, resolution = 1)

mashranga/MolDia documentation built on May 26, 2019, 9:36 a.m.