Title: | Analyzing High-Throughput Single Cell Sequencing Data |
---|---|
Description: | A toolkit that allows scientists to work with data from single cell sequencing technologies such as scRNA-seq, scVDJ-seq, scATAC-seq, CITE-Seq and Spatial Transcriptomics (ST). Single (i) Cell R package ('iCellR') provides unprecedented flexibility at every step of the analysis pipeline, including normalization, clustering, dimensionality reduction, imputation, visualization, and so on. Users can design both unsupervised and supervised models to best suit their research. In addition, the toolkit provides 2D and 3D interactive visualizations, differential expression analysis, filters based on cells, genes and clusters, data merging, normalizing for dropouts, data imputation methods, correcting for batch differences, pathway analysis, tools to find marker genes for clusters and conditions, predict cell types and pseudotime analysis. See Khodadadi-Jamayran, et al (2020) <doi:10.1101/2020.05.05.078550> and Khodadadi-Jamayran, et al (2020) <doi:10.1101/2020.03.31.019109> for more details. |
Authors: | Alireza Khodadadi-Jamayran [aut, cre] , Joseph Pucella [aut, ctb] , Hua Zhou [aut, ctb] , Nicole Doudican [aut, ctb] , John Carucci [aut, ctb] , Adriana Heguy [aut, ctb], Boris Reizis [aut, ctb] , Aristotelis Tsirigos [aut, ctb] |
Maintainer: | Alireza Khodadadi-Jamayran <[email protected]> |
License: | GPL-2 |
Version: | 1.6.6 |
Built: | 2024-11-07 05:44:25 UTC |
Source: | https://github.com/rezakj/icellr |
This function takes a list of image data adds it to the iCellR object.
add.10x.image(x = NULL, image.data.list = NULL, condition.names = NULL)
add.10x.image(x = NULL, image.data.list = NULL, condition.names = NULL)
x |
An object of class iCellR. |
image.data.list |
A character vector of list object names. Lists should be made using "image.capture.10x" function. . |
condition.names |
A character vector of condition names. |
An object of class iCellR
This function takes a data frame of ADT values per cell and adds it to the iCellR object.
add.adt(x = NULL, adt.data = "data.frame")
add.adt(x = NULL, adt.data = "data.frame")
x |
An object of class iCellR. |
adt.data |
A data frame containing ADT counts for cells. |
An object of class iCellR
This function takes a data frame of VDJ information per cell and adds it to the iCellR object.
add.vdj(x = NULL, vdj.data = "data.frame")
add.vdj(x = NULL, vdj.data = "data.frame")
x |
An object of class iCellR. |
vdj.data |
A data frame containing VDJ information for cells. |
An object of class iCellR
This function is to merge the RNA and ADT data to the main.data slot of the iCellR object.
adt.rna.merge(x = NULL, adt.data = "raw")
adt.rna.merge(x = NULL, adt.data = "raw")
x |
An object of class iCellR. |
adt.data |
Choose from raw or main (normalized) ADT data, default = "raw". |
An object of class iCellR
This function takes 10X image data files and converts them to proper file format for iCellR.
capture.image.10x(dir.10x = NULL)
capture.image.10x(dir.10x = NULL)
dir.10x |
A directory that includes the 10X image files (scalefactors_json.json, tissue_lowres_image.png and tissue_positions_list.csv). |
A list object
This function takes an object of class iCellR and assignes cell cycle stage for the cells.
cc(object = NULL, s.genes = s.phase, g2m.genes = g2m.phase)
cc(object = NULL, s.genes = s.phase, g2m.genes = g2m.phase)
object |
A data frame containing gene counts for cells. |
s.genes |
Genes that are used as a marker for S phase. |
g2m.genes |
Genes that are used as a marker for G2 and M phase. |
The data frame object
This function takes an object of class iCellR and assignes cell cycle stage for the cells.
cell.cycle( object = NULL, scoring.List = NULL, return.stats = FALSE, scoring.method = "tirosh" )
cell.cycle( object = NULL, scoring.List = NULL, return.stats = FALSE, scoring.method = "tirosh" )
object |
A data frame containing gene counts for cells. |
scoring.List |
Genes that are used as a marker for phases. |
return.stats |
Return the data or object. If FALSE the object would be returned. |
scoring.method |
Choose from "coverage" or "tirosh" for scoring method. |
The data frame object
This function takes an object of class iCellR and filters the raw data based on the number of UMIs, genes per cell, percentage of mitochondrial genes per cell, genes, gene expression and cell ids.
cell.filter( x = NULL, min.mito = 0, max.mito = 1, min.genes = 0, max.genes = Inf, min.umis = 0, max.umis = Inf, filter.by.cell.id = "character", keep.cell.id = "character", filter.by.gene = "character", filter.by.gene.exp.min = 1 )
cell.filter( x = NULL, min.mito = 0, max.mito = 1, min.genes = 0, max.genes = Inf, min.umis = 0, max.umis = Inf, filter.by.cell.id = "character", keep.cell.id = "character", filter.by.gene = "character", filter.by.gene.exp.min = 1 )
x |
An object of class iCellR. |
min.mito |
Min rate for mitochondrial gene expression per cell, default = 0. |
max.mito |
Max rate for mitochondrial gene expression per cell, default = 1. |
min.genes |
Min number genes per cell, default = 0. |
max.genes |
Max number genes per cell, default = Inf. |
min.umis |
Min number UMIs per cell, default = 0. |
max.umis |
Max number UMIs per cell, default = Inf. |
filter.by.cell.id |
A character vector of cell ids to be filtered out. |
keep.cell.id |
A character vector of cell ids to keep. |
filter.by.gene |
A character vector of gene names to be filtered by thier expression. If more then one gene is defined it would be OR not AND. |
filter.by.gene.exp.min |
Minimum gene expression to be filtered by the genes set in filter.by.gene, default = 1. |
An object of class iCellR.
This function takes an object of class iCellR and a 2D tSNE or UMAP plot and gates around cells to get their ids.
cell.gating(x = NULL, my.plot = NULL, plot.type = "tsne")
cell.gating(x = NULL, my.plot = NULL, plot.type = "tsne")
x |
An object of class iCellR. |
my.plot |
The plot to use for gating. Must be a 2D plot. |
plot.type |
Choose from knetl, umap and tsne, default = NULL. |
An object of class iCellR.
This function takes an object of class iCellR and genes and provides a heatmap.
cell.type.pred( immgen.data = "rna", gene = "NULL", top.cell.types = 50, plot.type = "heatmap", heat.colors = c("blue", "white", "red") )
cell.type.pred( immgen.data = "rna", gene = "NULL", top.cell.types = 50, plot.type = "heatmap", heat.colors = c("blue", "white", "red") )
immgen.data |
Choose from ,"GSE109125","GSE122108","GSE122597","GSE124829","GSE15907","GSE37448", rna", "uli.rna" or "mca", default = "rna" |
gene |
A set of gene names to used to predict cell type. |
top.cell.types |
Top cell types sorted by cumulative expression, default = 25. |
plot.type |
Choose from "heatmap" od "point.plot", default = "heatmap" |
heat.colors |
Colors for heatmap, default = c("blue" ,"white", "red"). |
An object of class iCellR
This function re-names the clusters in the best.clust slot of the iCellR object.
change.clust(x = NULL, change.clust = 0, to.clust = 0, clust.reset = FALSE)
change.clust(x = NULL, change.clust = 0, to.clust = 0, clust.reset = FALSE)
x |
An object of class iCellR. |
change.clust |
The name of the cluster to be changed. |
to.clust |
The new name for the cluster. |
clust.reset |
Reset to the original clustering. |
An object of class iCellR.
This function takes an object of class iCellR and provides plots for clonotypes.
clono.plot( x = NULL, plot.data.type = "tsne", clonotype.column = 1, barcode.column = 2, clono = NULL, conds.to.plot = NULL, clust.dim = 2, cell.size = 1, cell.colors = c("red", "gray"), box.cell.col = "black", back.col = "white", cell.transparency = 1, interactive = TRUE, out.name = "plot" )
clono.plot( x = NULL, plot.data.type = "tsne", clonotype.column = 1, barcode.column = 2, clono = NULL, conds.to.plot = NULL, clust.dim = 2, cell.size = 1, cell.colors = c("red", "gray"), box.cell.col = "black", back.col = "white", cell.transparency = 1, interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
plot.data.type |
Choose from "tsne" and "pca", default = "tsne". |
clonotype.column |
The column which has the clonotype IDs, default = 2. |
barcode.column |
The column which has the barcode IDs, default = 1. |
clono |
A clonotype name to be plotted, default = NULL. |
conds.to.plot |
Choose one condition you want to see in the plot, default = NULL (all conditions). |
clust.dim |
2 for 2D plots and 3 for 3D plots, default = 2. |
cell.size |
A number for the size of the points in the plot, default = 1. |
cell.colors |
Colors for heat mapping the points in "scatterplot", default = c("gray","red"). |
box.cell.col |
Choose a color for box default = "black". |
back.col |
A color for the plot background, default = "black". |
cell.transparency |
Color transparency for points, default = 0.5. |
interactive |
If set to TRUE an intractive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
An object of class iCellR.
This function takes an object of class iCellR and creates an average gene expression for every cluster.
clust.avg.exp( x = NULL, data.type = "main", conds.to.avg = NULL, rounding.digits = 4, low.cell.filt = 5, round.num = FALSE )
clust.avg.exp( x = NULL, data.type = "main", conds.to.avg = NULL, rounding.digits = 4, low.cell.filt = 5, round.num = FALSE )
x |
An object of class iCellR. |
data.type |
Choose from "main", "atac", "atac.imputed" and "imputed", default = "main" |
conds.to.avg |
Choose the conditions you want to average, default = NULL (all conditions). |
rounding.digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
low.cell.filt |
filter out clusters with low number of cells, default = 5. |
round.num |
Rounding of Numbers, default = FALSE. |
An object of class iCellR.
This function takes an object of class iCellR and calculates cluster and conditions frequencies.
clust.cond.info( x = NULL, plot.type = "pie", my.out.put = "data", normalize.ncell = TRUE, normalize.by = "percentage" )
clust.cond.info( x = NULL, plot.type = "pie", my.out.put = "data", normalize.ncell = TRUE, normalize.by = "percentage" )
x |
An object of class iCellR. |
plot.type |
Choose from pie/pie.cond or bar/bar.cond, defult = pie. |
my.out.put |
Chose from "data" or "plot", default = "data". |
normalize.ncell |
If TRUE the values will be normalized to the number of cells by downsampling. |
normalize.by |
Chose from "sf" (size factor) or "percentage", default = "percentage". |
An object of class iCellR.
This function takes an object of class iCellR and re-ordersthe clusters based on pseudotime (distance).
clust.ord( x = NULL, top.rank = 500, dist.method = "euclidean", clust.method = "complete", how.to.order = "distance" )
clust.ord( x = NULL, top.rank = 500, dist.method = "euclidean", clust.method = "complete", how.to.order = "distance" )
x |
An object of class iCellR. |
top.rank |
A number. Taking the top genes ranked by base mean, default = 500. |
dist.method |
Choose from "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski", default = "euclidean". |
clust.method |
Choose from "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median" or "centroid", default = "complete". |
how.to.order |
Choose from "distance" and "random". |
An object of class iCellR.
This function removes the cells from a designated cluster. Notice the cells will be removed from the main data (raw data would still have the original data).
clust.rm(x = NULL, clust.to.rm = "numeric")
clust.rm(x = NULL, clust.to.rm = "numeric")
x |
A data frame containing gene counts for cells. |
clust.to.rm |
The name of the cluster to be removed. |
An object of class iCellR
This function takes an object of class iCellR and creates QC plot.
clust.stats.plot( x = NULL, plot.type = "box.mito", conds.to.plot = NULL, cell.color = "slategray3", cell.size = 1, cell.transparency = 0.5, box.color = "red", box.line.col = "green", back.col = "white", notch = FALSE, interactive = TRUE, out.name = "plot" )
clust.stats.plot( x = NULL, plot.type = "box.mito", conds.to.plot = NULL, cell.color = "slategray3", cell.size = 1, cell.transparency = 0.5, box.color = "red", box.line.col = "green", back.col = "white", notch = FALSE, interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
plot.type |
Choose from "bar.cc", "pie.cc" , box.umi", "box.mito", "box.gene", default = "box.mito". |
conds.to.plot |
Choose the conditions you want to see in the plot, default = NULL (all conditions). |
cell.color |
Choose a color for points in the plot. |
cell.size |
A number for the size of the points in the plot, default = 1. |
cell.transparency |
Color transparency for points in "scatterplot" and "boxplot", default = 0.5. |
box.color |
A color for the boxes in the "boxplot", default = "red". |
box.line.col |
A color for the lines around the "boxplot", default = "green". |
back.col |
Background color, default = "white" |
notch |
Notch the box plots, default = FALSE. |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
An object of class iCellR.
This function takes an object of class iCellR and creates plots to see the clusters.
cluster.plot( x = NULL, cell.size = 0.5, plot.type = "tsne", cell.color = "black", back.col = "white", col.by = "clusters", cond.facet = FALSE, cond.shape = FALSE, anno.clust = FALSE, anno.size = 4, cell.transparency = 1, clust.dim = 2, angle = 20, clonotype.max = 10, density = FALSE, interactive = TRUE, static3D = FALSE, out.name = "plot" )
cluster.plot( x = NULL, cell.size = 0.5, plot.type = "tsne", cell.color = "black", back.col = "white", col.by = "clusters", cond.facet = FALSE, cond.shape = FALSE, anno.clust = FALSE, anno.size = 4, cell.transparency = 1, clust.dim = 2, angle = 20, clonotype.max = 10, density = FALSE, interactive = TRUE, static3D = FALSE, out.name = "plot" )
x |
An object of class iCellR. |
cell.size |
A numeric value for the size of the cells, default = 1. |
plot.type |
Choose between "tsne", "pca", "umap", "knetl", "diffusion", default = "tsne". |
cell.color |
Choose cell color if col.by = "monochrome", default = "black". |
back.col |
Choose background color, default = "black". |
col.by |
Choose between "clusters", "conditions", "cc" (cell cycle) or "monochrome", default = "clusters". |
cond.facet |
Show the conditions in separate plots. |
cond.shape |
If TRUE the conditions will be shown in shapes. |
anno.clust |
Annotate cluster names on the plot, default = TRUE. |
anno.size |
If anno.clust is TRUE set font size, default = 3. |
cell.transparency |
A numeric value between 0 to 1, default = 0.5. |
clust.dim |
A numeric value for plot dimensions. Choose either 2 or 3, default = 2. |
angle |
A number to rotate the non-interactive 3D plot. |
clonotype.max |
Number of clonotype to plot, default = 10. |
density |
If TRUE the density plots for PCA/tSNE second dimension will be created, default = FALSE. |
interactive |
If TRUE an html interactive file will be made, default = TRUE. |
static3D |
If TRUE a non-interactive 3D plot will be made. |
out.name |
Output name for html file if interactive = TRUE, default = "plot". |
An object of class iCellR.
This function takes data frame and merges them while also adding condition names to cell ids..
data.aggregation(samples = NULL, condition.names = NULL)
data.aggregation(samples = NULL, condition.names = NULL)
samples |
A character vector of data.frame object names. |
condition.names |
A character vector of data.frame condition names. |
An object of class iCellR
demo <- read.table( file = system.file('extdata', 'demo_data.txt', package = 'iCellR'), as.is = TRUE) # Lets divide your sample in to 3 samples as if you have 3 samples and want to merge them. sample1 <- demo[1:30] sample2 <- demo[31:60] sample3 <- demo[61:90] # merge all 3 data and add condition names demo <- data.aggregation(samples = c("sample1","sample2","sample3"), condition.names = c("WT","ctrl","KO")) head(demo)[1:4] # make iCellR object myDemo.obj <- make.obj(demo)
demo <- read.table( file = system.file('extdata', 'demo_data.txt', package = 'iCellR'), as.is = TRUE) # Lets divide your sample in to 3 samples as if you have 3 samples and want to merge them. sample1 <- demo[1:30] sample2 <- demo[31:60] sample3 <- demo[61:90] # merge all 3 data and add condition names demo <- data.aggregation(samples = c("sample1","sample2","sample3"), condition.names = c("WT","ctrl","KO")) head(demo)[1:4] # make iCellR object myDemo.obj <- make.obj(demo)
This function takes an object of class iCellR and scales the normalized data.
data.scale(x = NULL)
data.scale(x = NULL)
x |
An object of class iCellR. |
An object of class iCellR.
This function takes an object of class iCellR and down samples the condition to have equal number of cells in each condition.
down.sample(x = NULL)
down.sample(x = NULL)
x |
An object of class iCellR. |
An object of class iCellR.
Uses a kd-tree to find the p number of near neighbours for each point in an input/output dataset.
find_neighbors(data, k)
find_neighbors(data, k)
data |
matrix; input data matrix |
k |
integer; number of nearest neighbours |
Use the nn2 function from the RANN package, utilizes the Approximate Near Neighbor (ANN) C++ library, which can give the exact near neighbours or (as the name suggests) approximate near neighbours to within a specified error bound. For more information on the ANN library please visit http://www.cs.umd.edu/~mount/ANN/.
This function takes an object of class iCellR finds the model genes to run a second round of PCA.
find.dim.genes(x = NULL, dims = 1:10, top.pos = 15, top.neg = 5)
find.dim.genes(x = NULL, dims = 1:10, top.pos = 15, top.neg = 5)
x |
An object of class iCellR. |
dims |
PC dimentions to be used. |
top.pos |
Number of top positive marker genes to be taken from each PC, default = 15. |
top.neg |
Number of top negative marker genes to be taken from each PC, default = 5. |
An object of class iCellR.
This function takes an object of class iCellR and performs differential expression (DE) analysis to find marker genes for each cluster.
findMarkers( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", fold.change = 2, padjval = 0.1, Inf.FCs = FALSE, uniq = FALSE, positive = TRUE )
findMarkers( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", fold.change = 2, padjval = 0.1, Inf.FCs = FALSE, uniq = FALSE, positive = TRUE )
x |
An object of class iCellR. |
data.type |
Choose from "main", "atac", "atac.imputed" and "imputed", default = "main" |
pval.test |
Choose from "t.test", "wilcox.test", default = "t.test". |
p.adjust.method |
Correction method. Choose from "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none", default = "hochberg". |
fold.change |
A number that designates the minimum fold change for out put, default = 2. |
padjval |
Minimum adjusted p value for out put, default = 0.1. |
Inf.FCs |
If set to FALSE the infinite fold changes would be filtered from out put, default = FALSE. |
uniq |
If set to TRUE only genes that are a marker for only one cluster would be in the out put, default = FALSE. |
positive |
If set to FALSE both the up regulated (positive) and down regulated (negative) markers would be in the out put, default = TRUE. |
An object of class iCellR
A dataset containing the genes for G2 and M phase
g2m.phase
g2m.phase
A character with 54 genes
https://www.science.org/doi/abs/10.1126/science.aad0501
This function takes an object of class iCellR and assigns cluster number to a vector of cell ids.
gate.to.clust(x = NULL, my.gate = NULL, to.clust = 0)
gate.to.clust(x = NULL, my.gate = NULL, to.clust = 0)
x |
An object of class iCellR. |
my.gate |
A vector of cell ids. |
to.clust |
A cluster id to be assigned to the provided cell ids. |
An object of class iCellR.
This function takes an object of class iCellR and provides plots for genes.
gene.plot( x = NULL, gene = NULL, cond.shape = FALSE, conds.to.plot = NULL, data.type = "main", box.to.test = 0, box.pval = "sig.signs", plot.data.type = "tsne", scaleValue = TRUE, min.scale = 0, max.scale = 2.5, clust.dim = 2, col.by = "clusters", plot.type = "scatterplot", cell.size = 1, cell.colors = c("gray", "red"), box.cell.col = "black", box.color = "red", box.line.col = "green", back.col = "white", cell.transparency = 1, box.transparency = 0.5, interactive = TRUE, out.name = "plot", write.data = FALSE )
gene.plot( x = NULL, gene = NULL, cond.shape = FALSE, conds.to.plot = NULL, data.type = "main", box.to.test = 0, box.pval = "sig.signs", plot.data.type = "tsne", scaleValue = TRUE, min.scale = 0, max.scale = 2.5, clust.dim = 2, col.by = "clusters", plot.type = "scatterplot", cell.size = 1, cell.colors = c("gray", "red"), box.cell.col = "black", box.color = "red", box.line.col = "green", back.col = "white", cell.transparency = 1, box.transparency = 0.5, interactive = TRUE, out.name = "plot", write.data = FALSE )
x |
An object of class iCellR. |
gene |
Gene name/names to be plotted. |
cond.shape |
If TRUE the conditions will be shown in shapes. |
conds.to.plot |
Choose the conditions you want to see in the plot, default = NULL (all conditions). |
data.type |
Choose from "main", "atac, "atac.imputed" and "imputed", default = "main". |
box.to.test |
A cluster number so that all the boxes in the box plot would be compared to. If set to "0" the cluster with the highest avrage would be choosen, default = 0. |
box.pval |
Choose from "sig.values" and "sig.signs". If set to "sig.signs" p values would be replaced with signs ("na", "*", "**", "***"), default = "sig.signs". |
plot.data.type |
Choose between "tsne", "pca", "umap", "knetl", "diffusion", "pseudo.A" and "pseudo.B", default = "tsne". |
scaleValue |
Scale the colors, default = FALSE. |
min.scale |
If scaleValue = TRUE, set a number for min, default = -2.5. |
max.scale |
If scaleValue = TRUE, set a number for max, default = 2.5. |
clust.dim |
2 for 2D plots and 3 for 3D plots, default = 2. |
col.by |
Choose from "clusters" and "conditions", default = "clusters". |
plot.type |
Choose from "scatterplot", "boxplot" and "barplot", default = "scatterplot". |
cell.size |
A number for the size of the points in the plot, default = 1. |
cell.colors |
Colors for heat mapping the points in "scatterplot", default = c("gray","red"). |
box.cell.col |
A color for the points in the box plot, default = "black". |
box.color |
A color for the boxes in the "boxplot", default = "red". |
box.line.col |
A color for the lines around the "boxplot", default = "green". |
back.col |
A color for the plot background, default = "black". |
cell.transparency |
Color transparency for points in "scatterplot" and "boxplot", default = 1. |
box.transparency |
Color transparency for box in "boxplot", default = 0.5. |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
write.data |
Write export the data used for the plot plot, default = TFALSE. |
An object of class iCellR.
This function takes an object of class iCellR and provides some statistical information for the genes.
gene.stats(x = NULL, which.data = "raw.data", each.cond = FALSE)
gene.stats(x = NULL, which.data = "raw.data", each.cond = FALSE)
x |
An object of class iCellR. |
which.data |
Choose from "raw.data" or "main.data", default = "raw.data". |
each.cond |
If TRUE each condition will be calculated, default = FALSE. |
An object of class iCellR.
Gene-gene correlation. This function helps to visulaize and calculate gene-gene correlations.
gg.cor( x = NULL, data.type = "imputed", gene1 = NULL, gene2 = NULL, conds = NULL, clusts = NULL, cell.size = 1, cell.transparency = 0.5, interactive = TRUE, out.name = "plot" )
gg.cor( x = NULL, data.type = "imputed", gene1 = NULL, gene2 = NULL, conds = NULL, clusts = NULL, cell.size = 1, cell.transparency = 0.5, interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
data.type |
Choose from imputed and main, default = "imputed". |
gene1 |
First gene name. |
gene2 |
Second gene name. |
conds |
Filter only one condition (only one), default is all conditions. |
clusts |
Choose clusters to plot. |
cell.size |
A numeric value for the size of the cells, default = 1. |
cell.transparency |
A numeric value between 0 to 1, default = 0.5. |
interactive |
If TRUE an html interactive file will be made, default = TRUE. |
out.name |
Output name for html file if interactive = TRUE, default = "plot". |
An object of class iCellR
This function takes an object of class iCellR and genes and provides a heatmap.
heatmap.gg.plot( x = NULL, gene = "NULL", cell.sort = FALSE, data.type = "main", cluster.by = "clusters", conds.to.plot = NULL, min.scale = -2.5, max.scale = 2.5, interactive = TRUE, cex.col = 10, cex.row = 10, no.key = FALSE, out.name = "plot", heat.colors = c("blue", "white", "red") )
heatmap.gg.plot( x = NULL, gene = "NULL", cell.sort = FALSE, data.type = "main", cluster.by = "clusters", conds.to.plot = NULL, min.scale = -2.5, max.scale = 2.5, interactive = TRUE, cex.col = 10, cex.row = 10, no.key = FALSE, out.name = "plot", heat.colors = c("blue", "white", "red") )
x |
A data frame containing gene counts for cells. |
gene |
A set of gene names to be heatmapped. |
cell.sort |
If FALSE the cells will not be sorted based on their distance, default = TRUE. |
data.type |
Choose from "main", "atac", atac.imputed and "imputed", default = "main". |
cluster.by |
Choose from "clusters" or "none", default = "clusters". |
conds.to.plot |
Choose the conditions you want to see in the plot, default = NULL (all conditions). |
min.scale |
Set a minimum color scale, default = -2.5. |
max.scale |
Set a maximum color scale, default = 2.5. |
interactive |
If TRUE an html interactive file will be made, default = TRUE. |
cex.col |
Chhose a size, default = 10. |
cex.row |
Choose a size, default = 10. |
no.key |
If you want a color legend key, default = FALSE. |
out.name |
Output name for html file if interactive = TRUE, default = "plot". |
heat.colors |
Colors for heatmap, default = c("blue" ,"white", "red"). |
An object of class iCellR
Demultiplexing HTOs
hto.anno(hto.data = "data.frame", cov.thr = 10, assignment.thr = 80)
hto.anno(hto.data = "data.frame", cov.thr = 10, assignment.thr = 80)
hto.data |
HTO raw data |
cov.thr |
A number which average coverage is divided by to set a threshold for low coverage. For example 10 means it is 10 time less than the average. default = 10. |
assignment.thr |
A percent above which you decide to set as a good sample assignment/HTO, default = 80. |
An object of class iCellR
This function takes an object of class iCellR and assignes cell cycle stage for the cells.
i.score( object = NULL, data.type = "main.data", scoring.List = NULL, return.stats = TRUE, scoring.method = "tirosh" )
i.score( object = NULL, data.type = "main.data", scoring.List = NULL, return.stats = TRUE, scoring.method = "tirosh" )
object |
A data frame containing gene counts for cells. |
data.type |
Choose from "raw.data" or "main.data", "imputed.data", default = "main.data". |
scoring.List |
Genes that are used as a marker for phases. |
return.stats |
Return the data or object. If FALSE the object would be returned. |
scoring.method |
Choose from "tirosh (Tirosh, et. al. 2016), mean, sum, gsva, ssgsea, zscore and plage. , default = "tirosh". |
The data frame object
This function takes an object of class iCellR and runs CCCA or CPCA batch alignment.
iba( x = NULL, dims = 1:30, k = 10, ba.method = "CPCA", method = "base.mean.rank", top.rank = 500, plus.log.value = 0.1, scale.data = TRUE, gene.list = "character" )
iba( x = NULL, dims = 1:30, k = 10, ba.method = "CPCA", method = "base.mean.rank", top.rank = 500, plus.log.value = 0.1, scale.data = TRUE, gene.list = "character" )
x |
An object of class iCellR. |
dims |
PC dimentions to be used |
k |
number of neighboring cells for KNN, default = 10. |
ba.method |
Batch alignment method. Choose from "CCCA" and "CPCA", default = "CPCA". |
method |
Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. |
top.rank |
A number. Taking the top genes ranked by base mean, default = 500. |
plus.log.value |
A number to add to each value in the matrix before log transformasion to aviond Inf numbers, default = 0.1. |
scale.data |
If TRUE the data will be scaled (log2 + plus.log.value), default = TRUE. |
gene.list |
A charactor vector of genes to be used for PCA. If "clust.method" is set to "gene.model", default = "my_model_genes.txt". |
This function takes an object of class iCellR and finds optimal number of clusters and clusters the data.
iclust( x = NULL, dist.method = "euclidean", sensitivity = 100, data.type = "pca", dims = 1:10, return.graph = FALSE )
iclust( x = NULL, dist.method = "euclidean", sensitivity = 100, data.type = "pca", dims = 1:10, return.graph = FALSE )
x |
An object of class iCellR. |
dist.method |
the distance measure to be used to compute the dissimilarity matrix. This must be one of: "euclidean", "maximum", "mandatattan", "canberra", "binary", "minkowski" or "NULL". By default, distance="euclidean". If the distance is "NULL", the dissimilarity matrix (diss) should be given by the user. If distance is not "NULL", the dissimilarity matrix should be "NULL". |
sensitivity |
The higher the number the less sensitivity, default = 100. |
data.type |
Choose between "tsne", "pca", "umap", default = "pca". |
dims |
PCA dimentions to be use for clustering, default = 1:10. |
return.graph |
return igraph object, default = FALSE. |
An object of class iCellR.
This function reads hdf5 files.
load.h5(filename, feature.names = TRUE, uniq.rows = TRUE)
load.h5(filename, feature.names = TRUE, uniq.rows = TRUE)
filename |
path to the input (h5) file |
feature.names |
row names to be feature names or ID numbers. |
uniq.rows |
make row names unique. |
The data frame object
This function takes 10X data files barcodes.tsv, genes.tsv and matrix.mtx and converts them to proper matrix file for iCellR.
load10x(dir.10x = NULL, gene.name = 2)
load10x(dir.10x = NULL, gene.name = 2)
dir.10x |
A directory that includes the 10X barcodes.tsv, genes.tsv and matrix.mtx files. |
gene.name |
Gene names or ids column number, default = 2. |
The data frame object
my.data <- load10x(system.file("extdata", "filtered_gene_bc_matrices", package = "iCellR")) # See first few rows and columns head(my.data)[1:5]
my.data <- load10x(system.file("extdata", "filtered_gene_bc_matrices", package = "iCellR")) # See first few rows and columns head(my.data)[1:5]
This function takes peak marker files and makes the bed files per cluster.
make.bed(x = NULL)
make.bed(x = NULL)
x |
Peak marker file. |
Bed files
This function takes an object of class iCellR and provides a gene list for clustering based on the parameters set in the model.
make.gene.model( x = NULL, dispersion.limit = 1.5, base.mean.rank = 500, gene.num.max = 2000, non.sig.col = "darkgray", right.sig.col = "chartreuse3", left.sig.col = "cadetblue3", disp.line.col = "black", rank.line.col = "red", my.out.put = "data", cell.size = 1.75, cell.transparency = 0.5, no.mito.model = TRUE, no.cell.cycle = TRUE, mark.mito = TRUE, interactive = TRUE, out.name = "plot" )
make.gene.model( x = NULL, dispersion.limit = 1.5, base.mean.rank = 500, gene.num.max = 2000, non.sig.col = "darkgray", right.sig.col = "chartreuse3", left.sig.col = "cadetblue3", disp.line.col = "black", rank.line.col = "red", my.out.put = "data", cell.size = 1.75, cell.transparency = 0.5, no.mito.model = TRUE, no.cell.cycle = TRUE, mark.mito = TRUE, interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
dispersion.limit |
A number for taking the genes that have dispersion above this number, default = 1.5. |
base.mean.rank |
A number taking the top genes ranked by base mean, default = 500. |
gene.num.max |
Maximum number of genes , default = 2000. |
non.sig.col |
Color for the genes not used for the model, default = "darkgray". |
right.sig.col |
Color for the genes above the dispersion limit, default = "chartreuse3". |
left.sig.col |
Color for the genes above the rank limit, default = "cadetblue3". |
disp.line.col |
Color of the line for dispersion limit, default = "black". |
rank.line.col |
Color of the line for rank limit, default = "red". |
my.out.put |
Chose from "data" or "plot", default = "data". |
cell.size |
A number for the size of the points in the plot, default = 1.75. |
cell.transparency |
Color transparency for the points in the plot, default = 0.5. |
no.mito.model |
If set to TRUE, mitochondrial genes would be excluded from the gene list made for clustering, default = TRUE. |
no.cell.cycle |
If TRUE the cell cycle genes will be removed (s.phase and g2m.phase), default = TRUE. |
mark.mito |
Mark mitochondrial genes in the plot, default = TRUE. |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
An object of class iCellR.
This function takes data frame and makes an object of class iCellR.
make.obj(x = NULL)
make.obj(x = NULL)
x |
A data frame containing gene counts for cells. |
An object of class iCellR
demo <- read.table( file = system.file('extdata', 'demo_data.txt', package = 'iCellR'), as.is = TRUE) myDemo.obj <- make.obj(demo) myDemo.obj
demo <- read.table( file = system.file('extdata', 'demo_data.txt', package = 'iCellR'), as.is = TRUE) myDemo.obj <- make.obj(demo) myDemo.obj
This function imputes data.
myImp(x = NULL)
myImp(x = NULL)
x |
An object of class iCellR. |
An object of class iCellR
Normalize ADT data. This function takes data frame and Normalizes ADT data.
norm.adt(x = NULL)
norm.adt(x = NULL)
x |
An object of class iCellR. |
An object of class iCellR
This function takes an object of class iCellR and normalized the data based on "global.glsf", "ranked.glsf" or "spike.in" methods.
norm.data( x = NULL, norm.method = "ranked.glsf", top.rank = 500, spike.in.factors = NULL, rpm.factor = 1000, rounding.digits = 3, round.num = TRUE, ATAC.data = FALSE, ATAC.filter = TRUE )
norm.data( x = NULL, norm.method = "ranked.glsf", top.rank = 500, spike.in.factors = NULL, rpm.factor = 1000, rounding.digits = 3, round.num = TRUE, ATAC.data = FALSE, ATAC.filter = TRUE )
x |
An object of class iCellR. |
norm.method |
Choose a normalization method, there are three option currently. Choose from "global.glsf", "ranked.glsf","spike.in" or no.norm, default = "ranked.glsf". |
top.rank |
If the method is set to "ranked.glsf", you need to set top number of genes sorted based on global base mean, default = 500. |
spike.in.factors |
A numeric vector of spike-in values with the same cell id order as the main data. |
rpm.factor |
If the norm.method is set to "rpm" the library sizes would be divided by this number, default = 1000 (higher numbers recomanded for bulk RNA-Seq). |
rounding.digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
round.num |
Rounding of Numbers, default = FALSE. |
ATAC.data |
If TURE, it would normalize ATAC-Seq data and not RNA-Seq, default = FALSE. |
ATAC.filter |
If TURE, all the cells filtered in RNA-Seq will be filtered in ATAC-Seq. This needs to be done for both data to match, default = TRUE. |
An object of class iCellR.
This function takes an object of class iCellR and finds optimal number of PCs for clustering.
opt.pcs.plot(x = NULL, pcs.in.plot = 50)
opt.pcs.plot(x = NULL, pcs.in.plot = 50)
x |
An object of class iCellR. |
pcs.in.plot |
Number of PCs to show in plot, defult = 50. |
An object of class iCellR.
This function takes a data frame of VDJ data per cell and prepares it to adds it to the iCellR object.
prep.vdj(vdj.data = "data.frame", cond.name = "NULL")
prep.vdj(vdj.data = "data.frame", cond.name = "NULL")
vdj.data |
A data frame containing vdj information. |
cond.name |
Conditions. |
An object of class iCellR
This function takes an object of class iCellR and marker genes for clusters and performs pseudotime analysis.
pseudotime(x = NULL, marker.genes = "NULL", dims = 1:10)
pseudotime(x = NULL, marker.genes = "NULL", dims = 1:10)
x |
An object of class iCellR. |
marker.genes |
A list of marker genes for clusters. |
dims |
PC dimentions to be used, , default = 1:10. |
An object of class iCellR.
This function takes an object of class iCellR and and runs kNet for dimensionality reduction.
pseudotime.knetl( x = NULL, dist.method = "euclidean", k = 5, abstract = TRUE, data.type = "pca", dims = 1:20, conds.to.plot = NULL, my.layout = "layout_with_fr", node.size = 10, cluster.membership = FALSE, interactive = TRUE, node.colors = NULL, edge.color = "gray", out.name = "Pseudotime.Abstract.KNetL", my.seed = 1 )
pseudotime.knetl( x = NULL, dist.method = "euclidean", k = 5, abstract = TRUE, data.type = "pca", dims = 1:20, conds.to.plot = NULL, my.layout = "layout_with_fr", node.size = 10, cluster.membership = FALSE, interactive = TRUE, node.colors = NULL, edge.color = "gray", out.name = "Pseudotime.Abstract.KNetL", my.seed = 1 )
x |
An object of class iCellR. |
dist.method |
the distance measure to be used to compute the dissimilarity matrix. This must be one of: "euclidean", "maximum", "mandatattan", "canberra", "binary", "minkowski" or "NULL". By default, distance="euclidean". If the distance is "NULL", the dissimilarity matrix (diss) should be given by the user. If distance is not "NULL", the dissimilarity matrix should be "NULL". |
k |
KNN the higher the number the less sensitivity, default = 5. |
abstract |
Draw all the cells or clusters, , default = TRUE. |
data.type |
Choose between "tsne", "pca", "umap", default = "pca". We highly recommend PCA. |
dims |
PCA dimentions to be use for clustering, default = 1:20. |
conds.to.plot |
Choose the conditions you want to see in the plot, default = NULL (all conditions). |
my.layout |
Choose a layout, default = "layout_with_fr". |
node.size |
Size of the nodes, , default = 10. |
cluster.membership |
Calculate memberships based on distance. |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
node.colors |
Color of the nodes, default = random colors. |
edge.color |
Solor of the edges, default = "gray". |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "Abstract.KNetL". |
my.seed |
seed number, default = 1. |
A plot.
This function takes an object of class iCellR and marker genes for clusters and performs pseudotime for differentiation or time course analysis.
pseudotime.tree( x = NULL, marker.genes = "NULL", clust.names = "NULL", dist.method = "euclidean", clust.method = "complete", label.offset = 0.5, type = "classic", hang = 1, cex = 1 )
pseudotime.tree( x = NULL, marker.genes = "NULL", clust.names = "NULL", dist.method = "euclidean", clust.method = "complete", label.offset = 0.5, type = "classic", hang = 1, cex = 1 )
x |
An object of class iCellR. |
marker.genes |
A list of marker genes for clusters. |
clust.names |
A list of names for clusters. |
dist.method |
Choose from "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski", default = "euclidean". |
clust.method |
Choose from "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median" or "centroid", default = "complete". |
label.offset |
Space between names and tree, default = 0.5. |
type |
Choose from "classic", "jitter", "unrooted", "fan", "cladogram", "radial", default = "classic". |
hang |
Hang, default = 1. |
cex |
Text size, default = 1. |
An object of class iCellR.
This function takes data frame and calculates the number of UMIs, genes per cell and percentage of mitochondrial genes per cell and cell cycle genes.
qc.stats( x = NULL, which.data = "raw.data", mito.genes = NULL, s.phase.genes = s.phase, g2m.phase.genes = g2m.phase )
qc.stats( x = NULL, which.data = "raw.data", mito.genes = NULL, s.phase.genes = s.phase, g2m.phase.genes = g2m.phase )
x |
A data frame containing gene counts for cells. |
which.data |
Choose from "raw.data" or "main.data", "imputed.data", default = "raw.data". |
mito.genes |
A character vector of mitochondrial genes names , default is the genes starting with mt. |
s.phase.genes |
A character vector of gene names for S phase, default = s.phase. |
g2m.phase.genes |
A character vector of gene names for G2 and M phase, default = g2m.phase. |
The data frame object
R implementation of the PhenoGraph algorithm
Rphenograph(data, k = 30)
Rphenograph(data, k = 30)
data |
matrix; input data matrix |
k |
integer; number of nearest neighbours (default:30) |
A simple R implementation of the [PhenoGraph](http://www.cell.com/cell/abstract/S0092-8674(15)00637-6) algorithm, which is a clustering method designed for high-dimensional single-cell data analysis. It works by creating a graph ("network") representing phenotypic similarities between cells by calclating the Jaccard coefficient between nearest-neighbor sets, and then identifying communities using the well known [Louvain method](https://sites.google.com/site/findcommunities/) in this graph.
a list contains an igraph graph object for graph_from_data_frame
and a communities object, the operations of this class contains:
print |
returns the communities object itself, invisibly. |
length |
returns an integer scalar. |
sizes |
returns a numeric vector. |
membership |
returns a numeric vector, one number for each vertex in the graph that was the input of the community detection. |
modularity |
returns a numeric scalar. |
algorithm |
returns a character scalar. |
crossing |
returns a logical vector. |
is_hierarchical |
returns a logical scalar. |
merges |
returns a two-column numeric matrix. |
cut_at |
returns a numeric vector, the membership vector of the vertices. |
as.dendrogram |
returns a dendrogram object. |
show_trace |
returns a character vector. |
code_len |
returns a numeric scalar for communities found with the InfoMAP method and NULL for other methods. |
plot |
for communities objects returns NULL, invisibly. |
https://github.com/JinmiaoChenLab/Rphenograph
Jacob H. Levine and et.al. Data-Driven Phenotypic Dissection of AML Reveals Progenitor-like Cells that Correlate with Prognosis. Cell, 2015.
This function takes an object of class iCellR and runs anchor alignment. It's a wrapper for Seurat.
run.anchor( x = NULL, method = "base.mean.rank", top.rank = 500, gene.list = "character", data.type = "main", normalization.method = "LogNormalize", scale.factor = 10000, margin = 1, block.size = NULL, selection.method = "vst", nfeatures = 2000, anchor.features = 2000, scale = TRUE, sct.clip.range = NULL, reduction = c("cca", "rpca"), l2.norm = TRUE, dims = 1:30, k.anchor = 5, k.filter = 200, k.score = 30, max.features = 200, nn.method = "rann", eps = 0, k.weight = 100 )
run.anchor( x = NULL, method = "base.mean.rank", top.rank = 500, gene.list = "character", data.type = "main", normalization.method = "LogNormalize", scale.factor = 10000, margin = 1, block.size = NULL, selection.method = "vst", nfeatures = 2000, anchor.features = 2000, scale = TRUE, sct.clip.range = NULL, reduction = c("cca", "rpca"), l2.norm = TRUE, dims = 1:30, k.anchor = 5, k.filter = 200, k.score = 30, max.features = 200, nn.method = "rann", eps = 0, k.weight = 100 )
x |
An object of class iCellR. |
method |
Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. |
top.rank |
A number taking the top genes ranked by base mean, default = 500. |
gene.list |
A charactor vector of genes to be used for PCA. If "clust.method" is set to "gene.model", default = "my_model_genes.txt". |
data.type |
Choose from "main" and "imputed", default = "main" |
normalization.method |
Choose from "LogNormalize", "CLR" and "RC". LogNormalize: Feature counts for each cell are divided by the total counts for that cell and multiplied by the scale.factor. This is then natural-log transformed using log1p. CLR: Applies a centered log ratio transformation. RC: Relative counts. Feature counts for each cell are divided by the total counts for that cell and multiplied by the scale.factor. No log-transformation is applied. For counts per million (CPM) set ‘scale.factor = 1e6’ |
scale.factor |
Sets the scale factor for cell-level normalization. |
margin |
If performing CLR normalization, normalize across features (1) or cells (2) |
block.size |
How many cells should be run in each chunk, will try to split evenly across threads |
selection.method |
Choose from "vst","mean.var.plot (mvp)","dispersion (disp)". |
nfeatures |
Number of features to select as top variable features; only used when ‘selection.method’ is set to ‘'dispersion'’ or ‘'vst'’ |
anchor.features |
A numeric value. This will call ‘SelectIntegrationFeatures’ to select the provided number of features to be used in anchor finding |
scale |
Whether or not to scale the features provided. Only set to FALSE if you have previously scaled the features you want to use for each object in the object.list |
sct.clip.range |
Numeric of length two specifying the min and max values the Pearson residual will be clipped to |
reduction |
cca: Canonical correlation analysis. rpca: Reciprocal PCA |
l2.norm |
Perform L2 normalization on the CCA cell embeddings after dimensional reduction |
dims |
Which dimensions to use from the CCA to specify the neighbor search space |
k.anchor |
How many neighbors (k) to use when picking anchors |
k.filter |
How many neighbors (k) to use when filtering anchors |
k.score |
How many neighbors (k) to use when scoring anchors |
max.features |
The maximum number of features to use when specifying the neighborhood search space in the anchor filtering |
nn.method |
Method for nearest neighbor finding. Options include: rann, annoy |
eps |
Error bound on the neighbor finding algorithm (from RANN) |
k.weight |
Number of neighbors to consider when weighting |
An object of class iCellR.
This function takes an object of class iCellR and runs CCA using Seurat.
run.cca( x = NULL, top.vari.genes = 1000, cc.number = 30, dims.align = 1:20, normalize.data = TRUE, scale.data = TRUE, normalization.method = "LogNormalize", scale.factor = 10000, display.progress = TRUE )
run.cca( x = NULL, top.vari.genes = 1000, cc.number = 30, dims.align = 1:20, normalize.data = TRUE, scale.data = TRUE, normalization.method = "LogNormalize", scale.factor = 10000, display.progress = TRUE )
x |
An object of class iCellR. |
top.vari.genes |
Chose top genes to use for CCA, default = 1000. |
cc.number |
Choose a number, default = 30. |
dims.align |
Choose the CCA dimentions to align, default = 1:20. |
normalize.data |
TRUE or FALSE, default = TRUE. |
scale.data |
TRUE or FALSE, default = TRUE. |
normalization.method |
Choose a method, default = "LogNormalize". |
scale.factor |
Scaling factor, default = 10000. |
display.progress |
Show progress, default = TRUE. |
An object of class iCellR.
This function takes an object of class iCellR and finds optimal number of clusters and clusters the data.
run.clustering( x = NULL, clust.method = "kmeans", dist.method = "euclidean", index.method = "silhouette", max.clust = 25, min.clust = 2, dims = 1:10 )
run.clustering( x = NULL, clust.method = "kmeans", dist.method = "euclidean", index.method = "silhouette", max.clust = 25, min.clust = 2, dims = 1:10 )
x |
An object of class iCellR. |
clust.method |
the cluster analysis method to be used. This should be one of: "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median", "centroid", "kmeans". |
dist.method |
the distance measure to be used to compute the dissimilarity matrix. This must be one of: "euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski" or "NULL". By default, distance="euclidean". If the distance is "NULL", the dissimilarity matrix (diss) should be given by the user. If distance is not "NULL", the dissimilarity matrix should be "NULL". |
index.method |
the index to be calculated. This should be one of : "kl", "ch", "hartigan", "ccc", "scott", "marriot", "trcovw", "tracew", "friedman", "rubin", "cindex", "db", "silhouette", "duda", "pseudot2", "beale", "ratkowsky", "ball", "ptbiserial", "gap", "frey", "mcclain", "gamma", "gplus", "tau", "dunn", "hubert", "sdindex", "dindex", "sdbw", "all" (all indices except GAP, Gamma, Gplus and Tau), "alllong" (all indices with Gap, Gamma, Gplus and Tau included). |
max.clust |
maximal number of clusters, between 2 and (number of objects - 1), greater or equal to min.nc. |
min.clust |
minimum number of clusters, default = 2. |
dims |
PCA dimentions to be use for clustering, default = 1:10. |
An object of class iCellR.
This function takes an object of class iCellR and performs differential expression (DE) analysis for clusters and conditions.
run.diff.exp( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", de.by = "clusters", cond.1 = "array", cond.2 = "array", base.cond = 0 )
run.diff.exp( x = NULL, data.type = "main", pval.test = "t.test", p.adjust.method = "hochberg", de.by = "clusters", cond.1 = "array", cond.2 = "array", base.cond = 0 )
x |
An object of class iCellR. |
data.type |
Choose from "main" and "imputed", default = "main" |
pval.test |
Choose from "t.test", "wilcox.test", default = "t.test". |
p.adjust.method |
Correction method. Choose from "holm", "hochberg", "hommel", "bonferroni", "BH", "BY","fdr", "none", default = "hochberg". |
de.by |
Choose from "clusters", "conditions", "clustBase.condComp" or "condBase.clustComp". |
cond.1 |
First condition to do DE analysis on. |
cond.2 |
Second condition to do DE analysis on. |
base.cond |
A base condition or cluster if de.by is either cond.clust or clust.cond |
An object of class iCellR
This function takes an object of class iCellR and runs diffusion map on PCA data.
run.diffusion.map( x = NULL, dims = 1:10, method = "destiny", ndim = 3, k = 5, alpha = 40, n.landmark = 2000, gamma = 1, t = "auto", knn.dist.method = "euclidean", init = NULL, mds.method = "metric", mds.dist.method = "euclidean", t.max = 100, npca = 100, plot.optimal.t = FALSE, verbose = 1, n.jobs = 1, seed = NULL, potential.method = NULL, use.alpha = NULL, n.svd = NULL, pca.method = NULL, g.kernel = NULL, diff.op = NULL, landmark.transitions = NULL, diff.op.t = NULL, dist.method = NULL )
run.diffusion.map( x = NULL, dims = 1:10, method = "destiny", ndim = 3, k = 5, alpha = 40, n.landmark = 2000, gamma = 1, t = "auto", knn.dist.method = "euclidean", init = NULL, mds.method = "metric", mds.dist.method = "euclidean", t.max = 100, npca = 100, plot.optimal.t = FALSE, verbose = 1, n.jobs = 1, seed = NULL, potential.method = NULL, use.alpha = NULL, n.svd = NULL, pca.method = NULL, g.kernel = NULL, diff.op = NULL, landmark.transitions = NULL, diff.op.t = NULL, dist.method = NULL )
x |
An object of class iCellR. |
dims |
PC dimentions to be used for UMAP analysis. |
method |
diffusion map method, default = "phate". |
ndim |
int, optional, default: 2 number of dimensions in which the data will be embedded |
k |
int, optional, default: 5 number of nearest neighbors on which to build kernel |
alpha |
int, optional, default: 40 sets decay rate of kernel tails. If NULL, alpha decaying kernel is not used |
n.landmark |
int, optional, default: 2000 number of landmarks to use in fast PHATE |
gamma |
float, optional, default: 1 Informational distance constant between -1 and 1. gamma=1 gives the PHATE log potential, gamma=0 gives a square root potential. |
t |
int, optional, default: 'auto' power to which the diffusion operator is powered sets the level of diffusion |
knn.dist.method |
string, optional, default: 'euclidean'. recommended values: 'euclidean', 'cosine', 'precomputed' Any metric from scipy.spatial.distance can be used distance metric for building kNN graph. If 'precomputed', data should be an n_samples x n_samples distance or affinity matrix. Distance matrices are assumed to have zeros down the diagonal, while affinity matrices are assumed to have non-zero values down the diagonal. This is detected automatically using data[0,0]. You can override this detection with knn.dist.method='precomputed_distance' or knn.dist.method='precomputed_affinity'. |
init |
phate object, optional object to use for initialization. Avoids recomputing intermediate steps if parameters are the same. |
mds.method |
string, optional, default: 'metric' choose from 'classic', 'metric', and 'nonmetric' which MDS algorithm is used for dimensionality reduction |
mds.dist.method |
string, optional, default: 'euclidean' recommended values: 'euclidean' and 'cosine' |
t.max |
int, optional, default: 100. Maximum value of t to test for automatic t selection. |
npca |
int, optional, default: 100 Number of principal components to use for calculating neighborhoods. For extremely large datasets, using n_pca < 20 allows neighborhoods to be calculated in log(n_samples) time. |
plot.optimal.t |
boolean, optional, if TRUE, produce a plot showing the Von Neumann Entropy curve for automatic t selection. |
verbose |
int or boolean, optional (default : 1) If TRUE or > 0, message verbose updates. |
n.jobs |
int, optional (default: 1) The number of jobs to use for the computation. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. For n_jobs below -1, (n.cpus + 1 + n.jobs) are used. Thus for n_jobs = -2, all CPUs but one are used |
seed |
int or NULL, random state (default: NULL) |
potential.method |
Deprecated. For log potential, use gamma=1. For sqrt potential, use gamma=0. |
use.alpha |
Deprecated To disable alpha decay, use alpha=NULL |
n.svd |
Deprecated. |
pca.method |
Deprecated. |
g.kernel |
Deprecated. |
diff.op |
Deprecated. |
landmark.transitions |
Deprecated. |
diff.op.t |
Deprecated. |
dist.method |
Deprecated. |
An object of class iCellR.
This function takes an object of class iCellR and runs imputation on the main data.
run.impute( x = NULL, imp.method = "iCellR.imp", dims = 1:10, nn = 10, ATAC.data = FALSE, rounding.digits = 4, round.num = TRUE, data.type = "pca", genes = "all_genes", k = 10, alpha = 15, t = "auto", npca = 100, init = NULL, t.max = 20, knn.dist.method = "euclidean", verbose = 1, n.jobs = 1, seed = NULL )
run.impute( x = NULL, imp.method = "iCellR.imp", dims = 1:10, nn = 10, ATAC.data = FALSE, rounding.digits = 4, round.num = TRUE, data.type = "pca", genes = "all_genes", k = 10, alpha = 15, t = "auto", npca = 100, init = NULL, t.max = 20, knn.dist.method = "euclidean", verbose = 1, n.jobs = 1, seed = NULL )
x |
An object of class iCellR. |
imp.method |
Choose between "iCellR.imp" and "magic", defualt = "iCellR.imp". |
dims |
PC dimentions to be used for the analysis, default = 10. |
nn |
Number of neighboring cells to find, default = 10. |
ATAC.data |
If TURE, it would normalize ATAC-Seq data and not RNA-Seq, default = FALSE. |
rounding.digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
round.num |
Rounding of Numbers, default = FALSE. |
data.type |
Choose between "tsne", "pca", "umap", "diffusion", "knetl", default = "pca". |
genes |
character or integer vector, default: NULL vector of column names or column indices for which to return smoothed data If 'all_genes' or NULL, the entire smoothed matrix is returned |
k |
if imp.method is magic; int, optional, default: 10 number of nearest neighbors on which to build kernel |
alpha |
if imp.method is magic; int, optional, default: 15 sets decay rate of kernel tails. If NULL, alpha decaying kernel is not used |
t |
if imp.method is magic; int, optional, default: 'auto' power to which the diffusion operator is powered sets the level of diffusion. If 'auto', t is selected according to the Procrustes disparity of the diffused data.' |
npca |
number of PCA components that should be used; default: 100. |
init |
magic object, optional object to use for initialization. Avoids recomputing intermediate steps if parameters are the same. |
t.max |
if imp.method is magic; int, optional, default: 20 Maximum value of t to test for automatic t selection. |
knn.dist.method |
string, optional, default: 'euclidean'. recommended values: 'euclidean', 'cosine' Any metric from 'scipy.spatial.distance' can be used distance metric for building kNN graph. |
verbose |
'int' or 'boolean', optional (default : 1) If 'TRUE' or '> 0', message verbose updates. |
n.jobs |
'int', optional (default: 1) The number of jobs to use for the computation. If -1 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. For n_jobs below -1, (n.cpus + 1 + n.jobs) are used. Thus for n_jobs = -2, all CPUs but one are used |
seed |
int or 'NULL', random state (default: 'NULL') |
An object of class iCellR.
This function takes an object of class iCellR and and runs kNet for dimensionality reduction.
run.knetl( x = NULL, dist.method = "euclidean", zoom = 300, data.type = "pca", dims = 1:20, joint = FALSE, col.by = "clusters", my.seed = 1, layout.2d = "layout_nicely", layout.3d = "layout_with_fr", add.3d = FALSE, dim.redux = "umap", do.redux = TRUE, run.iclust = FALSE, return.graph = FALSE )
run.knetl( x = NULL, dist.method = "euclidean", zoom = 300, data.type = "pca", dims = 1:20, joint = FALSE, col.by = "clusters", my.seed = 1, layout.2d = "layout_nicely", layout.3d = "layout_with_fr", add.3d = FALSE, dim.redux = "umap", do.redux = TRUE, run.iclust = FALSE, return.graph = FALSE )
x |
An object of class iCellR. |
dist.method |
the distance measure to be used to compute the dissimilarity matrix. This must be one of: "euclidean", "maximum", "mandatattan", "canberra", "binary", "minkowski" or "NULL". By default, distance="euclidean". If the distance is "NULL", the dissimilarity matrix (diss) should be given by the user. If distance is not "NULL", the dissimilarity matrix should be "NULL". |
zoom |
Adjusting zoom the higher the number the less sensitivity, default = 400. |
data.type |
Choose between "tsne", "pca", "umap", default = "pca". |
dims |
PCA dimentions to be use for clustering, default = 1:20. |
joint |
Run in Combined or joint fashion as in CCCA and CPCA, default = FALSE. |
col.by |
If return.graph is TRUE the choose the cluster colors. Choose between "clusters", "conditions". |
my.seed |
seed number, default = 1. |
layout.2d |
Choose your 2D layout, default = "layout_nicely". |
layout.3d |
Choose your 3D layout, default = "layout_with_fr". |
add.3d |
Add 3D KNetL as well, default = FALSE. |
dim.redux |
Choose between "tsne", "pca", "umap" to unpack the nodes, default = "umap". |
do.redux |
Perform dim reudx for unpaking the nodes, default = TRUE. |
run.iclust |
Perform clustering as well (nor recomanded), default = FALSE. |
return.graph |
return igraph object, default = FALSE. |
An object of class iCellR.
This function takes an object of class iCellR and runs MNN alignment. It's a wrapper for scran.
run.mnn( x = NULL, method = "base.mean.rank", top.rank = 500, gene.list = "character", data.type = "main", k = 20, cos.norm = TRUE, ndist = 3, d = 50, approximate = FALSE, irlba.args = list(), subset.row = NULL, auto.order = FALSE, pc.input = FALSE, compute.variances = FALSE, assay.type = "logcounts", get.spikes = FALSE, BNPARAM = NULL, BPPARAM = SerialParam() )
run.mnn( x = NULL, method = "base.mean.rank", top.rank = 500, gene.list = "character", data.type = "main", k = 20, cos.norm = TRUE, ndist = 3, d = 50, approximate = FALSE, irlba.args = list(), subset.row = NULL, auto.order = FALSE, pc.input = FALSE, compute.variances = FALSE, assay.type = "logcounts", get.spikes = FALSE, BNPARAM = NULL, BPPARAM = SerialParam() )
x |
An object of class iCellR. |
method |
Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. |
top.rank |
A number taking the top genes ranked by base mean, default = 500. |
gene.list |
A charactor vector of genes to be used for PCA. If "clust.method" is set to "gene.model", default = "my_model_genes.txt". |
data.type |
Choose from "main" and "imputed", default = "main" |
k |
An integer scalar specifying the number of nearest neighbors to consider when identifying MNNs. |
cos.norm |
A logical scalar indicating whether cosine normalization should be performed on the input data prior to calculating distances between cells. |
ndist |
A numeric scalar specifying the threshold beyond which neighbours are to be ignored when computing correction vectors. Each threshold is defined in terms of the number of median distances. |
d |
Number of dimentions to pass to ‘multiBatchPCA’. |
approximate |
Further arguments to pass to ‘multiBatchPCA’. Setting ‘approximate=TRUE’ is recommended for large data sets with many cells. |
irlba.args |
Further arguments to pass to ‘multiBatchPCA’. Setting ‘approximate=TRUE’ is recommended for large data sets with many cells. |
subset.row |
See ‘?"scran-gene-selection"’. |
auto.order |
Logical scalar indicating whether re-ordering of batches should be performed to maximize the number of MNN pairs at each step. Alternatively an integer vector containing a permutation of ‘1:N’ where ‘N’ is the number of batches. |
pc.input |
Logical scalar indicating whether the values in ‘...’ are already low-dimensional, e.g., the output of ‘multiBatchPCA’. |
compute.variances |
Logical scalar indicating whether the percentage of variance lost due to non-orthogonality should be computed. |
assay.type |
A string or integer scalar specifying the assay containing the expression values, if SingleCellExperiment objects are present in ‘...’. |
get.spikes |
See ‘?"scran-gene-selection"’. Only relevant if ‘...’ contains SingleCellExperiment objects. |
BNPARAM |
A BiocNeighborParam object specifying the nearest neighbor algorithm. Defaults to an exact algorithm if ‘NULL’, see ‘?findKNN’ for more details. |
BPPARAM |
A BiocParallelParam object specifying whether the PCA and nearest-neighbor searches should be parallelized. |
An object of class iCellR.
This function takes an object of class iCellR and runs tSNE on PCA data. Wrapper for the C++ implementation of Barnes-Hut t-Distributed Stochastic Neighbor Embedding. t-SNE is a method for constructing a low dimensional embedding of high-dimensional data, distances or similarities. Exact t-SNE can be computed by setting theta=0.0.
run.pc.tsne( x = NULL, dims = 1:10, my.seed = 0, add.3d = TRUE, initial_dims = 50, perplexity = 30, theta = 0.5, check_duplicates = FALSE, pca = TRUE, max_iter = 1000, verbose = FALSE, is_distance = FALSE, Y_init = NULL, pca_center = TRUE, pca_scale = FALSE, stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L), mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L), momentum = 0.5, final_momentum = 0.8, eta = 200, exaggeration_factor = 12 )
run.pc.tsne( x = NULL, dims = 1:10, my.seed = 0, add.3d = TRUE, initial_dims = 50, perplexity = 30, theta = 0.5, check_duplicates = FALSE, pca = TRUE, max_iter = 1000, verbose = FALSE, is_distance = FALSE, Y_init = NULL, pca_center = TRUE, pca_scale = FALSE, stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L), mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L), momentum = 0.5, final_momentum = 0.8, eta = 200, exaggeration_factor = 12 )
x |
An object of class iCellR. |
dims |
PC dimentions to be used for tSNE analysis. |
my.seed |
seed number, default = 0. |
add.3d |
Add 3D tSNE as well, default = TRUE. |
initial_dims |
integer; the number of dimensions that should be retained in the initial PCA step (default: 50) |
perplexity |
numeric; Perplexity parameter |
theta |
numeric; Speed/accuracy trade-off (increase for less accuracy), set to 0.0 for exact TSNE (default: 0.5) |
check_duplicates |
logical; Checks whether duplicates are present. It is best to make sure there are no duplicates present and set this option to FALSE, especially for large datasets (default: TRUE) |
pca |
logical; Whether an initial PCA step should be performed (default: TRUE) |
max_iter |
integer; Number of iterations (default: 1000) |
verbose |
logical; Whether progress updates should be messageed (default: FALSE) |
is_distance |
logical; Indicate whether X is a distance matrix (experimental, default: FALSE) |
Y_init |
matrix; Initial locations of the objects. If NULL, random initialization will be used (default: NULL). Note that when using this, the initial stage with exaggerated perplexity values and a larger momentum term will be skipped. |
pca_center |
logical; Should data be centered before pca is applied? (default: TRUE) |
pca_scale |
logical; Should data be scaled before pca is applied? (default: FALSE) |
stop_lying_iter |
integer; Iteration after which the perplexities are no longer exaggerated (default: 250, except when Y_init is used, then 0) |
mom_switch_iter |
integer; Iteration after which the final momentum is used (default: 250, except when Y_init is used, then 0) |
momentum |
numeric; Momentum used in the first part of the optimization (default: 0.5) |
final_momentum |
numeric; Momentum used in the final part of the optimization (default: 0.8) |
eta |
numeric; Learning rate (default: 200.0) |
exaggeration_factor |
numeric; Exaggeration factor used to multiply the P matrix in the first part of the optimization (default: 12.0) |
An object of class iCellR.
This function takes an object of class iCellR and runs PCA on the main data.
run.pca( x = NULL, data.type = "main", method = "base.mean.rank", top.rank = 500, plus.log.value = 0.1, scale.data = TRUE, gene.list = "character" )
run.pca( x = NULL, data.type = "main", method = "base.mean.rank", top.rank = 500, plus.log.value = 0.1, scale.data = TRUE, gene.list = "character" )
x |
An object of class iCellR. |
data.type |
Choose from "main" and "imputed", default = "main" |
method |
Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. |
top.rank |
A number. Taking the top genes ranked by base mean, default = 500. |
plus.log.value |
A number to add to each value in the matrix before log transformasion to aviond Inf numbers, default = 0.1. |
scale.data |
If TRUE the data will be scaled (log2 + plus.log.value), default = TRUE. |
gene.list |
A charactor vector of genes to be used for PCA. If "clust.method" is set to "gene.model", default = "my_model_genes.txt". |
An object of class iCellR.
This function takes an object of class iCellR and finds optimal number of clusters and clusters the data.
run.phenograph(x = NULL, k = 100, data.type = "pca", dims = 1:10)
run.phenograph(x = NULL, k = 100, data.type = "pca", dims = 1:10)
x |
An object of class iCellR. |
k |
integer; number of nearest neighbours (default:45) |
data.type |
Choose between "tsne", "pca", "umap", default = "pca". |
dims |
PCA dimentions to be use for clustering, default = 1:10. |
An object of class iCellR.
This function takes an object of class iCellR and runs tSNE on main data. Wrapper for the C++ implementation of Barnes-Hut t-Distributed Stochastic Neighbor Embedding. t-SNE is a method for constructing a low dimensional embedding of high-dimensional data, distances or similarities. Exact t-SNE can be computed by setting theta=0.0.
run.tsne( x = NULL, clust.method = "base.mean.rank", top.rank = 500, gene.list = "character", add.3d = TRUE, initial_dims = 50, perplexity = 30, theta = 0.5, check_duplicates = TRUE, pca = TRUE, max_iter = 1000, verbose = FALSE, is_distance = FALSE, Y_init = NULL, pca_center = TRUE, pca_scale = FALSE, stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L), mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L), momentum = 0.5, final_momentum = 0.8, eta = 200, exaggeration_factor = 12 )
run.tsne( x = NULL, clust.method = "base.mean.rank", top.rank = 500, gene.list = "character", add.3d = TRUE, initial_dims = 50, perplexity = 30, theta = 0.5, check_duplicates = TRUE, pca = TRUE, max_iter = 1000, verbose = FALSE, is_distance = FALSE, Y_init = NULL, pca_center = TRUE, pca_scale = FALSE, stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L), mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L), momentum = 0.5, final_momentum = 0.8, eta = 200, exaggeration_factor = 12 )
x |
An object of class iCellR. |
clust.method |
Choose from "base.mean.rank" or "gene.model", defult is "base.mean.rank". |
top.rank |
A number taking the top genes ranked by base mean, defult = 500. |
gene.list |
A list of genes to be used for tSNE analysis. If "clust.method" is set to "gene.model", defult = "my_model_genes.txt". |
add.3d |
Add 3D tSNE as well, default = TRUE. |
initial_dims |
integer; the number of dimensions that should be retained in the initial PCA step (default: 50) |
perplexity |
numeric; Perplexity parameter |
theta |
numeric; Speed/accuracy trade-off (increase for less accuracy), set to 0.0 for exact TSNE (default: 0.5) |
check_duplicates |
logical; Checks whether duplicates are present. It is best to make sure there are no duplicates present and set this option to FALSE, especially for large datasets (default: TRUE) |
pca |
logical; Whether an initial PCA step should be performed (default: TRUE) |
max_iter |
integer; Number of iterations (default: 1000) |
verbose |
logical; Whether progress updates should be messageed (default: FALSE) |
is_distance |
logical; Indicate whether X is a distance matrix (experimental, default: FALSE) |
Y_init |
matrix; Initial locations of the objects. If NULL, random initialization will be used (default: NULL). Note that when using this, the initial stage with exaggerated perplexity values and a larger momentum term will be skipped. |
pca_center |
logical; Should data be centered before pca is applied? (default: TRUE) |
pca_scale |
logical; Should data be scaled before pca is applied? (default: FALSE) |
stop_lying_iter |
integer; Iteration after which the perplexities are no longer exaggerated (default: 250, except when Y_init is used, then 0) |
mom_switch_iter |
integer; Iteration after which the final momentum is used (default: 250, except when Y_init is used, then 0) |
momentum |
numeric; Momentum used in the first part of the optimization (default: 0.5) |
final_momentum |
numeric; Momentum used in the final part of the optimization (default: 0.8) |
eta |
numeric; Learning rate (default: 200.0) |
exaggeration_factor |
numeric; Exaggeration factor used to multiply the P matrix in the first part of the optimization (default: 12.0) |
An object of class iCellR.
This function takes an object of class iCellR and runs UMAP on PCA data.
run.umap( x = NULL, my.seed = 0, dims = 1:10, n_neighbors = 15, n_components = 2, metric = "euclidean", n_epochs = NULL, learning_rate = 1, scale = FALSE, init = "spectral", init_sdev = NULL, spread = 1, min_dist = 0.01, set_op_mix_ratio = 1, local_connectivity = 1, bandwidth = 1, repulsion_strength = 1, negative_sample_rate = 5, a = NULL, b = NULL, nn_method = NULL, n_trees = 50, search_k = 2 * n_neighbors * n_trees, approx_pow = FALSE, y = NULL, target_n_neighbors = n_neighbors, target_metric = "euclidean", target_weight = 0.5, pca = NULL, pca_center = TRUE, pcg_rand = TRUE, fast_sgd = FALSE, ret_model = FALSE, ret_nn = FALSE, n_threads = 1, n_sgd_threads = 0, grain_size = 1, tmpdir = tempdir(), verbose = getOption("verbose", TRUE) )
run.umap( x = NULL, my.seed = 0, dims = 1:10, n_neighbors = 15, n_components = 2, metric = "euclidean", n_epochs = NULL, learning_rate = 1, scale = FALSE, init = "spectral", init_sdev = NULL, spread = 1, min_dist = 0.01, set_op_mix_ratio = 1, local_connectivity = 1, bandwidth = 1, repulsion_strength = 1, negative_sample_rate = 5, a = NULL, b = NULL, nn_method = NULL, n_trees = 50, search_k = 2 * n_neighbors * n_trees, approx_pow = FALSE, y = NULL, target_n_neighbors = n_neighbors, target_metric = "euclidean", target_weight = 0.5, pca = NULL, pca_center = TRUE, pcg_rand = TRUE, fast_sgd = FALSE, ret_model = FALSE, ret_nn = FALSE, n_threads = 1, n_sgd_threads = 0, grain_size = 1, tmpdir = tempdir(), verbose = getOption("verbose", TRUE) )
x |
An object of class iCellR. |
my.seed |
seed number, default = 0. |
dims |
PC dimentions to be used for UMAP analysis. |
n_neighbors |
The size of local neighborhood (in terms of number of
neighboring sample points) used for manifold approximation. Larger values
result in more global views of the manifold, while smaller values result in
more local data being preserved. In general values should be in the range
|
n_components |
The dimension of the space to embed into. This defaults
to |
metric |
Type of distance metric to use to find nearest neighbors. One of:
Only applies if If Each metric calculation results in a separate fuzzy simplicial set, which are intersected together to produce the final set. Metric names can be repeated. Because non-numeric columns are removed from the data frame, it is safer to use column names than integer ids. Factor columns can also be used by specifying the metric name
For a given data block, you may override the |
n_epochs |
Number of epochs to use during the optimization of the
embedded coordinates. By default, this value is set to |
learning_rate |
Initial learning rate used in optimization of the coordinates. |
scale |
Scaling to apply to
For UMAP, the default is |
init |
Type of initialization for the coordinates. Options are:
For spectral initializations, ( |
init_sdev |
If non- |
spread |
The effective scale of embedded points. In combination with
|
min_dist |
The effective minimum distance between embedded points.
Smaller values will result in a more clustered/clumped embedding where
nearby points on the manifold are drawn closer together, while larger
values will result on a more even dispersal of points. The value should be
set relative to the |
set_op_mix_ratio |
Interpolate between (fuzzy) union and intersection as
the set operation used to combine local fuzzy simplicial sets to obtain a
global fuzzy simplicial sets. Both fuzzy set operations use the product
t-norm. The value of this parameter should be between |
local_connectivity |
The local connectivity required – i.e. the number of nearest neighbors that should be assumed to be connected at a local level. The higher this value the more connected the manifold becomes locally. In practice this should be not more than the local intrinsic dimension of the manifold. |
bandwidth |
The effective bandwidth of the kernel if we view the algorithm as similar to Laplacian Eigenmaps. Larger values induce more connectivity and a more global view of the data, smaller values concentrate more locally. |
repulsion_strength |
Weighting applied to negative samples in low dimensional embedding optimization. Values higher than one will result in greater weight being given to negative samples. |
negative_sample_rate |
The number of negative edge/1-simplex samples to use per positive edge/1-simplex sample in optimizing the low dimensional embedding. |
a |
More specific parameters controlling the embedding. If |
b |
More specific parameters controlling the embedding. If |
nn_method |
Method for finding nearest neighbors. Options are:
By default, if
Multiple nearest neighbor data (e.g. from two different precomputed
metrics) can be passed by passing a list containing the nearest neighbor
data lists as items.
The |
n_trees |
Number of trees to build when constructing the nearest
neighbor index. The more trees specified, the larger the index, but the
better the results. With |
search_k |
Number of nodes to search during the neighbor retrieval. The
larger k, the more the accurate results, but the longer the search takes.
With |
approx_pow |
If |
y |
Optional target data for supervised dimension reduction. Can be a
vector, matrix or data frame. Use the
Unlike |
target_n_neighbors |
Number of nearest neighbors to use to construct the
target simplicial set. Default value is |
target_metric |
The metric used to measure distance for |
target_weight |
Weighting factor between data topology and target
topology. A value of 0.0 weights entirely on data, a value of 1.0 weights
entirely on target. The default of 0.5 balances the weighting equally
between data and target. Only applies if |
pca |
If set to a positive integer value, reduce data to this number of
columns using PCA. Doesn't applied if the distance |
pca_center |
If |
pcg_rand |
If |
fast_sgd |
If |
ret_model |
If |
ret_nn |
If |
n_threads |
Number of threads to use. |
n_sgd_threads |
Number of threads to use during stochastic gradient
descent. If set to > 1, then results will not be reproducible, even if
'set.seed' is called with a fixed seed before running. Set to
|
grain_size |
Minimum batch size for multithreading. If the number of
items to process in a thread falls below this number, then no threads will
be used. Used in conjunction with |
tmpdir |
Temporary directory to store nearest neighbor indexes during
nearest neighbor search. Default is |
verbose |
If |
An object of class iCellR.
A dataset containing the genes for S phase
s.phase
s.phase
A character with 43 genes
https://www.science.org/doi/abs/10.1126/science.aad0501
This function takes an object of class iCellR and creates spatial plots.
spatial.plot( x = NULL, cell.size = 1, cell.colors = c("gray", "red"), back.col = "black", col.by = "clusters", conds.to.plot = NULL, gene = NULL, data.type = "main", scaleValue = TRUE, min.scale = 0, max.scale = 2.5, anno.clust = FALSE, anno.size = 4, anno.col = "white", cell.transparency = 1, interactive = TRUE, out.name = "plot" )
spatial.plot( x = NULL, cell.size = 1, cell.colors = c("gray", "red"), back.col = "black", col.by = "clusters", conds.to.plot = NULL, gene = NULL, data.type = "main", scaleValue = TRUE, min.scale = 0, max.scale = 2.5, anno.clust = FALSE, anno.size = 4, anno.col = "white", cell.transparency = 1, interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
cell.size |
A numeric value for the size of the cells, default = 1. |
cell.colors |
Colors for heat mapping the points in "scatterplot", default = c("gray","red"). |
back.col |
A color for the plot background, default = "black". |
col.by |
Choose between "clusters", "mt","UMIs","nGenes", "cc" (cell cycle) or "gene", default = "clusters". |
conds.to.plot |
Choose the conditions you want to see in the plot, default = NULL (all conditions). |
gene |
Gene name/names to be plotted, if col.by = "gene". |
data.type |
Choose from "main" or "imputed", default = "main". |
scaleValue |
Scale the colors, default = FALSE. |
min.scale |
If scaleValue = TRUE, set a number for min, default = -2.5. |
max.scale |
If scaleValue = TRUE, set a number for max, default = 2.5. |
anno.clust |
Annotate cluster names on the plot, default = TRUE. |
anno.size |
If anno.clust is TRUE set font size, default = 3. |
anno.col |
If anno.clust is TRUE set color, default = "white". |
cell.transparency |
Color transparency for points in "scatterplot" and "boxplot", default = 1. |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
An object of class iCellR.
This function takes an object of class iCellR and creates QC plot.
stats.plot( x = NULL, plot.type = "three.in.one", cell.color = "slategray3", cell.size = 1, cell.transparency = 0.5, box.color = "red", box.line.col = "green", back.col = "white", interactive = TRUE, out.name = "plot" )
stats.plot( x = NULL, plot.type = "three.in.one", cell.color = "slategray3", cell.size = 1, cell.transparency = 0.5, box.color = "red", box.line.col = "green", back.col = "white", interactive = TRUE, out.name = "plot" )
x |
An object of class iCellR. |
plot.type |
Choose from "box.umi", "box.mito", "box.gene", "box.s.phase", "box.g2m.phase","all.in.one","three.in.one", "point.mito.umi", "point.gene.umi". |
cell.color |
Choose a color for points in the plot. |
cell.size |
A number for the size of the points in the plot, default = 1. |
cell.transparency |
Color transparency for points in "scatterplot" and "boxplot", default = 0.5. |
box.color |
A color for the boxes in the "boxplot", default = "red". |
box.line.col |
A color for the lines around the "boxplot", default = "green". |
back.col |
Background color, default = "white" |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the out put name for HTML, default = "plot". |
An object of class iCellR.
This function takes the marker genes info if chooses marker gene names for plots.
top.markers( x = NULL, topde = 10, min.base.mean = 0.2, filt.ambig = TRUE, cluster = 0 )
top.markers( x = NULL, topde = 10, min.base.mean = 0.2, filt.ambig = TRUE, cluster = 0 )
x |
An object of class iCellR. |
topde |
Number of top differentially expressed genes to be choosen from each cluster, default = 10. |
min.base.mean |
Minimum base mean of the genes to be chosen, default = 0.5. |
filt.ambig |
Filter markers that are seen for more than one cluster, default = TRUE. |
cluster |
Choose a cluster to find markers for. If 0, it would find markers for all clusters, , default = 0. |
A set of gene names
This function takes a data frame of VDJ info per cell and dose QC.
vdj.stats(my.vdj = "data.frame")
vdj.stats(my.vdj = "data.frame")
my.vdj |
A data frame containing VDJ data for cells. |
An object of class iCellR
This function takes the result of differential expression (DE) analysis and provides MA and volcano plots.
volcano.ma.plot( x = NULL, sig.value = "padj", sig.line = 0.1, plot.type = "volcano", x.limit = 2, y.limit = 2, limit.force = FALSE, scale.ax = TRUE, dot.size = 1.75, dot.transparency = 0.5, dot.col = c("#E64B35", "#3182bd", "#636363"), interactive = TRUE, out.name = "plot" )
volcano.ma.plot( x = NULL, sig.value = "padj", sig.line = 0.1, plot.type = "volcano", x.limit = 2, y.limit = 2, limit.force = FALSE, scale.ax = TRUE, dot.size = 1.75, dot.transparency = 0.5, dot.col = c("#E64B35", "#3182bd", "#636363"), interactive = TRUE, out.name = "plot" )
x |
A data frame containing differential expression (DE) analysis results. |
sig.value |
Choose from "pval" or "padj", default = "padj". |
sig.line |
A number to draw the line for the significant genes based on sig.value type, default = 0.1. |
plot.type |
Choose from "ma" or "volcano", default = "volcano". |
x.limit |
A number to set a limit for the x axis. |
y.limit |
A number to set a limit for the y axis. |
limit.force |
If set to TRUE the x.limit and y.limit will be forced, default = FALSE. |
scale.ax |
If set to TRUE the y axis will be scaled to include all the points, default = TRUE. |
dot.size |
A number for the size of the points in the plot, default = 1.75. |
dot.transparency |
Color transparency for points in "scatterplot" and "boxplot", default = 0.5. |
dot.col |
A set of three colors for the points in the volcano plot, default = c("#E64B35","#3182bd","#636363"). |
interactive |
If set to TRUE an interactive HTML file will be created, default = TRUE. |
out.name |
If "interactive" is set to TRUE, the output name for HTML, default = "plot". |
Plots