autoSPIN {uSORT} | R Documentation |
A wrapper function for autoSPIN method which implements optimized local refinement using the selected SPIN sorting method, i.e. STS or Neighborhood.
autoSPIN(data, data_type = c("linear", "cyclical"), sorting_method = c("STS", "neighborhood"), alpha = 0.2, sigma_width = 1, no_randomization = 20, window_perc_range = c(0.1, 0.9), window_size_incre_perct = 0.05)
data |
An log2 transformed expresssion matrix containing n-rows of cells and m-cols of genes. |
data_type |
A character string indicating the type of progression, i.e. 'linear' (strictly linear) or 'cyclical' (cyclically linear). |
sorting_method |
A character string indicating the choice of SPIN sorting method, i.e. 'STS' (Side-to-Side) or 'Neighborhood'. |
alpha |
A fraction value denoting the size of locality used for calculating the summed local variance. |
sigma_width |
An integer number denoting the degree of spread of the gaussian distribution which is used for computing weight matrix for Neighborhood sorting method. |
no_randomization |
An integer number indicating the number of repeated sorting, each of which uses randomly selected initial cell position. |
window_perc_range |
A fraction value indicating the range of window size to be examined during local refinement. |
window_size_incre_perct |
A fraction value indicating the step size at each iteration for incrementing window size. |
A data frame containing single column of ordered sample IDs.
set.seed(15) da <- iris[sample(150, 150, replace = FALSE), ] rownames(da) <- paste0('spl_',seq(1,nrow(da))) d <- da[,1:4] dl <- da[,5,drop=FALSE] res <- autoSPIN(data = d) dl <- dl[match(res$SampleID,rownames(dl)),] annot <- data.frame(id = seq(1,nrow(res)), label=dl, stringsAsFactors = FALSE) #ggplot(annot, aes(x=id, y=id, colour = label)) + geom_point() + theme_bw()