1. About
SingleRepExplorer is an interactive web application,
built using the R/Shiny framework, designed for the comprehensive
analysis of single-cell immune profiling data. It addresses the
significant challenge of integrating single-cell RNA sequencing
(scRNA-seq) transcriptomics with paired T-cell receptor (TCR) and B-cell
receptor (BCR) repertoire analysis.
The tool is specifically designed to be accessible to biologists and
researchers who may have limited bioinformatics or command-line
expertise. It provides a user-friendly graphical interface that
streamlines complex analytical workflows, from data input to
publication-ready visualizations.
Core Functionalities
- Data Input and Processing:
- Accepts standard output files from 10x Genomics Cell Ranger (e.g.,
filtered_feature_bc_matrix.h5 and
filtered_contig_annotations.csv).
- Performs an automated workflow upon data upload, including
normalization, scaling, clustering, and non-linear dimensionality
reduction (UMAP/t-SNE) using the Seurat package.
- Transcriptome Analysis:
- Visualization: Offers interactive UMAP, violin
plots, and feature plots to explore gene expression.
- Annotation: Facilitates automated cell typing
(e.g., via scType) and allows users to explore marker genes.
- Differential Expression: Identifies differentially
expressed genes (DEGs) between user-defined cell groups.
- Immune Repertoire Analysis:
- Integration: Seamlessly combines TCR/BCR contig
information with the scRNA-seq data using the
scRepertoire package.
- Basic Characterization: Provides modules to analyze
clonal frequency, abundance, CDR3 length distribution, and repertoire
diversity (e.g., Alpha diversity).
- Comparative Analysis: Includes tools for assessing
clonal overlap between samples, identifying “public” clonotypes shared
across groups, and tracking the dynamics of specific clones.
- Advanced Features: Offers specialized analyses such
as:
- Antigen Prediction: Predicts potential antigens for
specific TCR clonotypes.
- BCR Analysis: Visualizes isotype usage (e.g., IGHM,
IGHG1) and constructs phylogenetic trees to explore clonal evolution and
somatic hypermutation.
By integrating these diverse functionalities into a single workbench,
SingleRepExplorer significantly reduces the time and effort required for
analysis, empowering researchers to interactively explore and interpret
complex single-cell immune profiling datasets.
2. Getting Started
SingleRepExplorer is distributed as a Docker container,
making it easy to run on any system (Windows, macOS, or Linux). The only
prerequisite is to have Docker Desktop installed.
Step 1: Install Docker Desktop
If you do not already have it, please install Docker Desktop. It is a
free application for Mac and Windows.
After installing, please start the Docker Desktop
application. You must have it running in the background to
proceed.
Step 2: Run SingleRepExplorer
Once Docker is running, open your command-line terminal.
- On macOS: Open the “Terminal” app
(you can find it in Applications/Utilities).
- On Windows: Open “PowerShell” or
“Command Prompt” (you can find it in the Start
Menu).
Copy and paste the following command into your terminal, then press
Enter:
docker run --rm -p 3838:3838 amufaamo/singlerepexplorer:latest
This command will automatically:
- Download (pull) the
amufaamo/singlerepexplorer:latest
image from Docker Hub, if you don’t have it.
- Start the application.
--rm: This flag ensures the container is automatically
removed when you stop it.
-p 3838:3838: This maps port 3838 on your computer
(localhost) to the application’s port 3838 inside the container.
Step 3: Access the Application
The application is now running. Open your web browser (like Chrome,
Firefox, or Safari) and navigate to the following address:
http://localhost:3838
You should now see the SingleRepExplorer interface and
can begin your analysis.
Stopping the Application
To stop the application, simply return to your terminal window where
the command is running and press
Ctrl+C.
3. Data Upload and Processing
The first step in using SingleRepExplorer is to upload
your dataset via this tab. The application is designed to process
outputs from the 10x Genomics Cell Ranger pipeline.
1. Files to Upload
You must upload the gene expression data, and you can optionally
provide TCR and/or BCR repertoire files.
- 1. Choose .h5 file (Required)
- Upload the
filtered_feature_bc_matrix.h5 file. This
contains the core single-cell gene expression data and is mandatory for
all analyses.
- 2. Choose .tcr file (Optional)
- Upload the
filtered_contig_annotations.csv file for the
T-cell receptor (TCR) repertoire. This is required if you wish to
perform TCR analysis.
- 3. Choose .bcr file (Optional)
- Upload the
filtered_contig_annotations.csv file for the
B-cell receptor (BCR) repertoire. This is required for BCR
analysis.
After selecting a file, a green “✅ Uploaded!” status message will
appear beside the button to confirm the upload.
2. Running the Analysis
- Analysis Start (Custom Data):
- Once you have uploaded the necessary files, click the blue
[Run] button.
- This initiates the analysis pipeline on your uploaded data.
- Analysis Start (Demo Data):
- If you want to try the application without uploading files, click
the blue [Demo Data] button.
- This will automatically load the provided example dataset and run
the analysis.
- Note: The [Demo Data] button is located below the [Run]
button.
- Analysis Workflow (Background):
- When an analysis starts (via Run or Demo Data), the buttons are
temporarily disabled.
- A status message appears: “🏃 Starting analysis…”.
- A progress bar titled “Analysis in progress” shows the current step:
Loading .h5 file...
Running Seurat object... (Normalization, Scaling, PCA,
UMAP/t-SNE)
Adding cell types...
Processing TCR/BCR data...
- Upon completion, a “🎉 Analysis finished successfully!” message
appears, and the buttons are re-enabled.
Error Handling: If you click [Run] without searching
for or uploading the mandatory .h5 file, an alert box will appear.
This section provides a detailed guide to the various analysis tabs
available in SingleRepExplorer.
4. Dimensional Plot
This tab is the primary interface for visualizing your clustered
single-cell data. It allows you to explore cell populations on a 2D map
(like UMAP or t-SNE) and interact with the data by coloring, renaming,
and highlighting specific cell groups.
The tab is divided into a Sidebar Panel (left) for
controls and a Main Panel (right) for outputs.
Main Panel: Outputs
1. Plot
This area displays the dimensional reduction plot you have
configured. * Download plot (.pdf): Click to download
the current plot as a high-resolution, publication-ready PDF.
2. Coordinates Table
This is an interactive table showing the underlying data for the
plot. * It displays the selected “Group by” information (e.g.,
seurat_clusters) and the X/Y coordinates (e.g.,
UMAP_1, UMAP_2) for every cell. *
Download Table (.csv): Click to download this full data
table as a CSV file.
[Transcriptome] Tab
This tab contains modules for exploring gene expression patterns and
performing differential expression analysis.
Expression Visualization
This module allows you to visualize the expression levels of specific
genes across your single-cell dataset.
Main Panel: Outputs
- Plot: Displays the gene expression plot.
- Download plot (.pdf): Download the current
plot.
Differential Expression
This module allows you to perform Differential Gene
Expression (DGE) analysis.
Main Panel: Outputs
- If “To entire dataset”:
- Markers Table: Summary of top markers for each
cluster.
- All Features Table: Complete DGE results
table.
- If “Between selected group(s)”:
- Volcano Plot: Log-fold change vs. p-value.
- Results Table: Complete DGE results for the
comparison.
[Repertoire] Tab
This tab provides a suite of tools for in-depth analysis of immune
repertoires.
Frequency Analysis
This versatile module allows you to analyze and visualize the
frequencies of two different targets: 1. Clonotype
Frequency: (e.g., the “Top 10” most abundant clonotypes) 2.
Gene Usage: (e.g., the usage frequency of different
V-genes)
Main Panel: Outputs
- Plot: Displays the configured bar chart or heatmap.
Download plot (.pdf): Click to download the
visualization as a publication-ready PDF.
- Table: Shows the summary data table used to
generate the plot, with exact counts and percentages.
Download table (.csv): Click to download this summary
data as a CSV file.
Unique Clones
This module helps quantify the diversity of your repertoire by
answering the question: “How many different types of clonotypes exist
within each group?”
It generates a bar chart showing the total count (or proportion) of
unique clonotypes found within each user-defined group (e.g., sample,
cluster).
Main Panel: Outputs
- Plot: A bar chart where each bar represents a group
(from your “Group by” selection). The height of the bar shows either the
total count or the proportion of unique clonotypes, based on your “Value
Type” selection.
Download plot (.pdf): Downloads the bar chart as a
publication-ready PDF.
- Table: An interactive data table showing the
summary data used to generate the plot. It includes:
Group: The categories from your “Group by”
selection.
unique_clonotype_count: The absolute number of unique
clonotypes.
total_clonotype_count: The total number of cells
(barcodes) in that group.
proportion_unique: The calculated percentage (unique /
total).
Download table (.csv): Downloads this summary table as
a CSV file.
Clonal Abundance
This module visualizes the clonal abundance
distribution for each group. It plots the abundance (either as
a proportion or raw count) of each clonotype against its rank within its
group. This type of plot is useful for assessing clonal dominance and
evenness – for example, a steep drop-off indicates that a few clones
dominate the repertoire, while a flatter curve suggests a more even
distribution.
Main Panel: Outputs
- Plot: Displays a rank-abundance
plot.
- X-axis: Shows the rank of the clonotypes within
each group (log scale), ordered from most abundant (rank 1) to least
abundant.
- Y-axis: Shows the abundance of the clonotype at
that rank, either as a percentage or count, based on your
selection.
- Color: Each line represents a different group
defined by your “Group by” selection.
Download plot (.pdf): Downloads the rank-abundance plot
as a publication-ready PDF.
- Table: An interactive data table showing the data
used for the plot. It includes:
- The grouping column (e.g.,
sample).
raw_clonotype_id: The identifier for each
clonotype.
count: The raw number of cells for that clonotype in
that group.
proportion: The calculated proportion of that clonotype
within its group.
rank: The rank of that clonotype within its group based
on abundance.
Download table (.csv): Downloads this summary data as a
CSV file.
Clonal Length
This module analyzes the length distribution of specific repertoire
sequences, most commonly the CDR3. It allows you to visualize and
compare whether different cell groups (e.g., samples or clusters) have
different characteristic lengths for their receptor sequences.
Main Panel: Outputs
- Plot: Displays the configured bar chart or boxplot
showing the length distributions.
Download plot (.pdf): Click to download the
visualization as a publication-ready PDF.
- Table: An interactive data table showing the
summary data used to generate the bar charts. It lists each group, each
observed sequence length, the raw count, and the calculated percentage.
(Note: The boxplot uses the non-summarized raw length data).
Download table (.csv): Click to download this summary
data as a CSV file.
Track Clonotype
This powerful module allows you to track the abundance of specific,
user-selected clonotypes across different groups (e.g., samples,
clusters, or time points). It is ideal for visualizing how particular
clones expand, contract, or are shared between populations.
This module can generate two types of visualizations: a
Stacked Bar chart or an Alluvial
Plot.
Main Panel: Outputs
- Clonotype Tracking Plot: Displays the Stacked Bar
or Alluvial plot.
- Stacked Bar: Useful for seeing the relative
contribution of each tracked clone to each group.
- Alluvial Plot: Useful for seeing the “flow” and
proportional changes of specific clones as they move between
groups.
Download plot (.pdf): Downloads the visualization as a
publication-ready PDF.
- Tracking Results Table: An interactive data table
showing the raw data for the plot. It lists each tracked clonotype, each
group, its raw count (
n), the total cells in that group
(total_n), and its calculated frequency
(frequency).
Download table (.csv): Downloads this summary data as a
CSV file.
Clonal Overlap
This module is used to compare the similarity between the repertoires
of different groups. It calculates an “overlap coefficient” for every
pair of groups and displays the results as a heatmap, allowing you to
quickly see which groups share the most clonotypes.
Main Panel: Outputs
- Plot: This panel displays a
heatmap of the overlap scores.
- Both the X-axis and Y-axis list the groups you selected (e.g.,
“Sample A”, “Sample B”).
- Each tile’s color (and the number inside it) represents the overlap
coefficient between the two corresponding groups.
- Calculation: The value is the Overlap
Coefficient (Szymkiewicz–Simpson coefficient), which is
calculated as:
(Number of shared clonotypes) / (Size of the smaller repertoire)
- A value of 1.0 (darkest color) means 100% overlap.
The diagonal will always be 1.0, as a group perfectly overlaps with
itself.
- A value of 0.0 (lightest color) means the two
groups share no clonotypes.
Download plot (.pdf): Click to download the heatmap as
a publication-ready PDF.
- Table: An interactive data table showing the raw
matrix of overlap coefficients used to generate the plot.
- The rows and columns represent the groups, and the cells contain the
calculated overlap values (rounded to 3 decimal places).
Public Clonotype
This module helps identify “public clonotypes” –
clonotypes that are shared across two or more different groups (e.g.,
samples, clusters). It visualizes the overlap using a Venn diagram and
allows you to inspect the details of the clonotypes found in specific
intersections.
Main Panel: Outputs
- Public Clonotypes Venn Diagram: Displays a
Venn diagram illustrating the overlap of unique
clonotypes (
raw_clonotype_id) between the selected groups.
- Each circle represents a group.
- The numbers indicate the count of unique clonotypes
found exclusively in that section (either specific to one group or
shared only by the groups in that intersection).
- Clonotype Details:
- Select intersection to inspect: This dropdown menu
lists all possible intersections shown in the Venn diagram (including
sections unique to a single group). The number of unique clonotypes in
each section is shown in parentheses. Select the intersection you want
to investigate further.
- Clonotype Table: This interactive data table
displays detailed information about the clonotypes found only in
the selected intersection.
raw_clonotype_id: The identifier of the public
clonotype.
- Subsequent columns show the abundance (count and/or
proportion, based on your sidebar selection) of that specific clonotype
within each of the originally selected groups.