Package 'looking4clusters'

Title: Interactive Visualization of scRNA-Seq
Description: Enables the interactive visualization of dimensional reduction, clustering, and cell properties for scRNA-Seq results. It generates an interactive HTML page using either a numeric matrix, SummarizedExperiment, SingleCellExperiment or Seurat objects as input. The input data can be projected into two-dimensional representations by applying dimensionality reduction methods such as PCA, MDS, t-SNE, UMAP, and NMF. Displaying multiple dimensionality reduction results within the same interface, with interconnected graphs, provides different perspectives that facilitate accurate cell classification. The package also integrates unsupervised clustering techniques, whose results that can be viewed interactively in the graphical interface. In addition to visualization, this interface allows manual selection of groups, labeling of cell entities based on processed meta-information, generation of new graphs displaying gene expression values for each cell, sample identification, and visual comparison of samples and clusters.
Authors: David Barrios [aut, cre] (ORCID: <https://orcid.org/0000-0003-4465-0200>), Angela Villaverde [aut] (ORCID: <https://orcid.org/0000-0002-7337-7218>), Carlos Prieto [aut] (ORCID: <https://orcid.org/0000-0001-8178-9768>)
Maintainer: David Barrios <[email protected]>
License: GPL-2 | GPL-3
Version: 1.3.0
Built: 2026-05-30 07:47:32 UTC
Source: https://github.com/bioc/looking4clusters

Help Index


Clustering determination and visualization

Description

addcluster adds a dimensional reduction to a looking4cluster object.

Usage

addcluster(object, data, name=NULL, groupStatsBy=FALSE,
    myGroups=FALSE, optim_cluster=FALSE)

Arguments

object

A looking4cluster object.

data

a vector with a cluster especified per sample.

name

a name for the dimensional reduction.

groupStatsBy

If TRUE, this cluster will allow to group statistics.

myGroups

If TRUE, this cluster will be initially loaded in user's custom groups

optim_cluster

If TRUE and there are multiple clusterizations for this method, this will be the default.

Value

Object of class looking4clusters.

Author(s)

David Barrios, Angela Villaverde and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

Examples

object <- looking4clusters(iris[,1:4], running_all=FALSE)
object <- addcluster(object,iris[,5],"species",myGroups=TRUE)

Clustering determination and visualization

Description

addreduction adds a dimensional reduction to a looking4cluster object.

Usage

addreduction(object,data,name=NULL)

Arguments

object

A looking4cluster object.

data

a matrix with a row per sample.

name

a name for the dimensional reduction.

Value

Object of class looking4clusters.

Author(s)

David Barrios, Angela Villaverde and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

Examples

object <- looking4clusters(iris[,1:4], running_all=FALSE)
PCAcomponents <- prcomp(data.matrix(iris[,1:4]), scale=FALSE)
pca<-PCAcomponents$x[,1:2]
object <- addreduction(object,pca,"pca")

Clustering determination and visualization

Description

l4chtml creates an html web from a 'looking4cluster' object.

Usage

l4chtml(x, includeData = FALSE, directory = NULL)

Arguments

x

A looking4cluster object or a json generated by a looking4cluster html web.

includeData

If FALSE, size will be reduced but some functionalities will be lost.

directory

A "character" string representing the directory where the graph will be saved.

Value

The function creates a folder in your computer with an HTML document named index.html which contains the interactive web page. This file can be directly opened with your browser.

Author(s)

David Barrios, Angela Villaverde and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

Examples

obj <- looking4clusters(iris[,1:4], running_all=FALSE)
obj <- addcluster(obj,iris[,5],"species",myGroups=TRUE)
PCAcomponents <- prcomp(data.matrix(iris[,1:4]), scale=FALSE)
pca<-PCAcomponents$x[,1:2]
obj <- addreduction(obj,pca,"pca")
l4chtml(obj)

Clustering determination and visualization

Description

looking4clusters Creates interactive clustering visualization plots from a SingleCellExperiment object, Seurat object or a matrix. It can also apply dimension reduction and clustering techniques.

Usage

looking4clusters(data, groups = NULL, assay = NULL,
    components = FALSE, running_all = TRUE, distance = "euclidean",
    agglomeration = "complete", selectedk = NULL, perplex = 30,
    maxIter = 1000, threads = NULL, force_execution = FALSE)

Arguments

data

A Seurat or SingleCellExperiment object. Alternatively, a numeric data.frame or matrix where variables are in columns and samples are in rows.

groups

Factor/Vector which defines an input category for each sample which will be visualized in the output plot.

assay

Specific assay to get data from or set data for; defaults to the default assay.

components

If TRUE, clustering algorithms are applied to main components obtained with PCA.

running_all

If TRUE, applies dimension reduction and clustering techniques if the input is a matrix like object.

distance

the distance measure to be used with hierarchical clustering algorithm. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given.

agglomeration

the agglomeration method to be used with hierarchical clustering algorithm. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

selectedk

Number of expected clusters given by the user. By default, the algorithm will run clustering algorithms with a number of clusters between 2 and 10. If selectedk is specified, a range of 5 units around the 'selectedk' will be used as number of clusters.

perplex

The perplexity parameter used for t-SNE algorithm execution (should not be bigger than 3 * perplexity < nrow(X)-1). This value effectively controls how many nearest neighbors are taken into account when constructing the embedding in the low-dimensional space (default: 30)

maxIter

The number of iterations used for t-SNE algorithm execution (default: 1000)

threads

The number of CPU threads for calculating a distance matrix. Default value is the amount of CPU cores available on the system.

force_execution

force the execution of some methods that could cause performance problems with large matrices.

Value

Object of class looking4clusters.

Author(s)

David Barrios, Angela Villaverde and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

Examples

obj <- looking4clusters(iris[,1:4], groups=iris[,5], threads = 2)