cytof_dimReduction: Dimension reduction for high dimension data

Description Usage Arguments Value Note Examples

View source: R/cytof_dimensionReduction.R

Description

Apply dimension reduction on the cytof expression data, with method pca, tsne, diffusionmap or isomap.

Usage

1
2
3
4
cytof_dimReduction(data, markers = NULL, method = c("tsne", "pca", "isomap",
  "diffusionmap", "NULL"), distMethod = "euclidean", out_dim = 2,
  tsneSeed = 42, isomap_k = 5, isomap_ndim = NULL,
  isomapFragmentOK = TRUE, ...)

Arguments

data

Input expression data matrix.

markers

Selected markers for dimension reduction, either marker names/descriptions or marker IDs.

method

Method chosen for dimensition reduction, must be one of isomap, pca , diffusionmap or tsne.

distMethod

Method for distance calcualtion, default is "euclidean", other choices like "manhattan", "cosine", "rankcor"....

out_dim

The dimensionality of the output.

tsneSeed

Set a seed if you want reproducible t-SNE results.

isomap_k

Number of shortest dissimilarities retained for a point, parameter for isomap method.

isomap_ndim

Number of axes in metric scaling, parameter for isomap method.

isomapFragmentOK

What to do if dissimilarity matrix is fragmented, parameter for isomap method.

...

Other parameters passed to the method, check Rtsne, DiffusionMap, isomap.

Value

A matrix of the dimension reduced data, with colnames method_ID, and rownames same as the input data.

Note

Currently, diffusionmap will not work with R 3.4.0, due to an issue with the latest CRAN release of its dependency igraph If this is the case, consider manually updating igraph using; install.packages("https://github.com/igraph/rigraph/releases/download/v1.1.0/igraph_1.1.0.zip", repos=NULL, method="libcurl")

Examples

1
2
3
4
data(iris)
in_data <- iris[, 1:4]
markers <- colnames(in_data[, 1:4])
out_data <- cytof_dimReduction(in_data, markers = markers, method = "tsne")

Example output

Loading required package: ggplot2
Loading required package: plyr
Warning message:
no DISPLAY variable so Tk is not available 
  Running t-SNE...with seed 42  DONE
Warning message:
In if (!(right_marker)) { :
  the condition has length > 1 and only the first element will be used

cytofkit documentation built on Nov. 1, 2018, 3:50 a.m.