Description Usage Arguments Value

Wrapper for running SWNE analysis

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 32 | ```
## S3 method for class 'seurat'
RunSWNE(object, proj.method = "umap",
reduction.use = "pca", cells.use = NULL, dims.use = NULL,
genes.use = NULL, dist.metric = "cosine", distance.matrix = NULL,
n.cores = 8, k, k.range, var.genes, loss = "mse", genes.embed,
hide.factors = T, n_pull = 3, alpha.exp = 1.25, snn.exp = 1,
reduction.name = "swne", reduction.key = "SWNE_",
return.format = c("embedding", "seurat"), ...)
## S3 method for class 'Pagoda2'
RunSWNE(object, proj.method = "umap",
dist.metric = "cosine", n.cores = 8, k, k.range, var.genes,
loss = "mse", genes.embed, hide.factors = T, n_pull = 3,
n.var.genes = 3000, alpha.exp = 1.25, snn.exp = 1)
## S3 method for class 'dgCMatrix'
RunSWNE(data.matrix, proj.method = "umap",
dist.metric = "cosine", n.cores = 3, k, k.range,
var.genes = rownames(data.matrix), loss = "mse", genes.embed,
hide.factors = T, n_pull = 3, alpha.exp = 1.25, snn.exp = 1)
## S3 method for class 'matrix'
RunSWNE(data.matrix, proj.method = "umap",
dist.metric = "cosine", n.cores = 3, k, k.range,
var.genes = rownames(data.matrix), loss = "mse", genes.embed,
hide.factors = T, n_pull = 3, alpha.exp = 1.25, snn.exp = 1)
## S3 method for class 'dgTMatrix'
RunSWNE(data.matrix, proj.method = "umap",
dist.metric = "cosine", n.cores = 3, k, k.range,
var.genes = rownames(data.matrix), loss = "mse", genes.embed,
hide.factors = T, n_pull = 3, alpha.exp = 1.25, snn.exp = 1)
``` |

`object` |
A Seurat or Pagoda2 object with normalized data |

`proj.method` |
Method to use to project factors in 2D. Either "sammon" or "umap" |

`reduction.use` |
Which dimensional reduction (e.g. PCA, ICA) to use for the tSNE. Default is PCA. |

`cells.use` |
Which cells to analyze (default, all cells) |

`dims.use` |
Which dimensions to use as input features |

`genes.use` |
If set, run the SWNE on this subset of genes (instead of running on a set of reduced dimensions). Not set (NULL) by default |

`distance.matrix` |
If set, runs tSNE on the given distance matrix instead of data matrix (experimental) |

`n.cores` |
Number of cores to use (passed to FindNumFactors) |

`k` |
Number of NMF factors (passed to RunNMF). If none given, will be derived from FindNumFactors. |

`k.range` |
Range of factors for FindNumFactors to iterate over if k is not given |

`var.genes` |
vector to specify variable genes. Will infer from Seurat or use full dataset if not given. |

`loss` |
loss function to use (passed to RunNMF) |

`genes.embed` |
Genes to add to the SWNE embedding |

`hide.factors` |
Hide factors when plotting SWNE embedding |

`n_pull` |
Maximum number of factors "pulling" on each sample |

`alpha.exp` |
Increasing alpha.exp increases how much the NMF factors "pull" the samples (passed to EmbedSWNE) |

`snn.exp` |
Decreasing snn.exp increases the effect of the similarity matrix on the embedding (passed to EmbedSWNE) |

`reduction.name` |
dimensional reduction name, specifies the position in the object$dr list. swne by default |

`reduction.key` |
dimensional reduction key, specifies the string before the number for the dimension names. SWNE_ by default |

`return.format` |
format to return ("seurat" object or raw "embedding") |

`n.var.genes` |
Number of variable genes to use |

`data.matrix` |
a data matrix (genes x cells) which has been pre-normalized |

`batch` |
Vector of batch effects to correct for |

`dist.use` |
Similarity function to use for calculating factor positions (passed to EmbedSWNE). Options include pearson (correlation), IC (mutual information), cosine, euclidean. |

A list of factor (H.coords) and sample coordinates (sample.coords) in 2D

yanwu2014/swne documentation built on Dec. 7, 2018, 8:55 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.