Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
msbeckel committed Oct 19, 2023
1 parent f2a3ba9 commit e5fd100
Show file tree
Hide file tree
Showing 32 changed files with 288 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
^vignettes/articles$
^_pkgdown\.yml$
^docs$
^pkgdown$
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ Imports:
viridis
Suggests:
doParallel,
Seurat
knitr,
rmarkdown,
Seurat
LazyData: true
VignetteBuilder: knitr
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center"> scXplorer package </h1>

<div align="justify" >
<img align="left" width="25%" src="inst/www/scXplorer-03.png" title="@irimiodo"> scXplorer is an R package that enables interactive visualization and analysis of single-cell experiment data by creating a Shiny-based application. With scXplorer all aspects of single-cell data can be explored using a large number of different types of plots, such as scatter plots, heatmaps, boxplots, dot and violins plots, etc. All the information associated with cells can be displayed in a customized way: both numerical variables such as logcounts or pseudotime values, and categorical variables such as cell types or sample. One of the main hallmarks of scXplorer is the possibility to plot the main embeddings used for single cell - UMAP, tSNE and PCA - both in 2D and 3D in an interactive way. Thus, embeddings can be rotated, translated and zoomed. But scXplorer is not only a visualization tool, it also allows you to perform different types of analysis on single cell data, such as finding the markers of a cell type or determining the differential genes between two different conditions.
<img align="left" width="25%" src="man/figures/scXplorer-03.png" title="@irimiodo"> scXplorer is an R package that enables interactive visualization and analysis of single-cell experiment data by creating a Shiny-based application. With scXplorer all aspects of single-cell data can be explored using a large number of different types of plots, such as scatter plots, heatmaps, boxplots, dot and violins plots, etc. All the information associated with cells can be displayed in a customized way: both numerical variables such as logcounts or pseudotime values, and categorical variables such as cell types or sample. One of the main hallmarks of scXplorer is the possibility to plot the main embeddings used for single cell - UMAP, tSNE and PCA - both in 2D and 3D in an interactive way. Thus, embeddings can be rotated, translated and zoomed. But scXplorer is not only a visualization tool, it also allows you to perform different types of analysis on single cell data, such as finding the markers of a cell type or determining the differential genes between two different conditions.
</div>

---
Expand All @@ -24,7 +24,7 @@

<td width="66.66%" style="border:0px; width:66.66%">

<img src="/images/presentation_t2.gif" width="100%" />
<img src="man/figures/presentation_t2.gif" width="100%" />

</td>
</tr>
Expand Down Expand Up @@ -106,7 +106,7 @@ In the summary section, you can explore through graphical visualization the cove

<details><summary> <h5> View more </h5> </summary>

<img src="/images/summary.gif" width="100%" />
<img src="man/figures/summary.gif" width="100%" />

</details>

Expand All @@ -127,7 +127,7 @@ By clicking on a marker in the table you can see its expression profile across t
</p>


<img src="/images/cluster_markers.gif" width="100%" />
<img src="man/figures/cluster_markers.gif" width="100%" />


### Find new markers
Expand All @@ -139,7 +139,7 @@ As in the previous section, if you click on one of the markers you can see its e
</p>


<img src="/images/new_markers.gif" width="100%" />
<img src="man/figures/new_markers.gif" width="100%" />
</details>


Expand All @@ -160,7 +160,7 @@ A wide variety of plots are available to analyse the expression of the genes of
</p>


<img src="/images/categories.gif" width="100%" />
<img src="man/figures/categories.gif" width="100%" />


### Fields
Expand All @@ -170,7 +170,7 @@ Fields allows you to analyse the expression of a set of genes in relation to num
</p>


<img src="/images/ge_fields.gif" width="100%" />
<img src="man/figures/ge_fields.gif" width="100%" />



Expand All @@ -181,7 +181,7 @@ In Co-expression section you can analyse the co-appearance of pairs of genes, de
</p>


<img src="/images/coexpression.gif" width="100%" />
<img src="man/figures/coexpression.gif" width="100%" />

</details>

Expand All @@ -194,7 +194,7 @@ The main figure in this section is a VolcanoPlot in which genes that are down an

<details><summary> <h5> View more </h5> </summary>

<img src="/images/differential_expression.gif" width="100%" />
<img src="man/figures/differential_expression.gif" width="100%" />

</details>

Expand All @@ -210,15 +210,15 @@ In **Exploratory Data Analysis** section you will be able to understand the rela
Here you can observe the proportion of cells belonging to the different levels of a categorical variable presented in the metadata and disaggregate these proportions according to the levels of another categorical variable. All this information is displayed in the form of a barplot. In the subsection "Matrix" a confusion matrix between the two selected features can be plotted with the option to display the Jaccard index for each of the grid cells. In addition, the Rand index is displayed, which is a global measure of the similarity between the two clusterings.
</p>

<img src="/images/exploratory_categories.gif" width="100%" />
<img src="man/figures/exploratory_categories.gif" width="100%" />



### Fields

In a similar way to the previous subsection, in "Field" you can explore how the value of one or more numerical variables changes as a function of another variable, either numerical or categorical. You can make different types of plots such as: Distribution Plots, Heatmaps, Dotplots and StackedViolins.

<img src="/images/fields.gif" width="100%" />
<img src="man/figures/fields.gif" width="100%" />


</details>
Expand All @@ -233,13 +233,13 @@ In the "Visual Tools" section, different plots can be obtained to explore in mor

By selecting or uploading a set of genes of interest, a set of Violin plots can be obtained and download in .pdf format, allowing to facet the plots by differents categorical co-variables.

<img src="/images/violins.gif" width="100%" />
<img src="man/figures/violins.gif" width="100%" />

### Multiplots

Multiplots allows you to explore how different variables change across cells in an embedding of your choice, such as the expression of a given set of genes, the partitions of a categorical variable or the value of a continuous variable.

<img src="/images/multiplots.gif" width="100%" />
<img src="man/figures/multiplots.gif" width="100%" />


</details>
Expand Down
28 changes: 28 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
url: https://tvegawaichman.github.io/scXplorer/

development:
mode: auto

template:
bootstrap: 5
params:
bootswatch: superhero
# includes:
# in-header: |
# <script defer data-domain="indrajeetpatil.github.io/ggstatsplot" src="https://plausible.io/js/plausible.js"></script>
bslib:
base_font: { google: "Roboto" }
heading_font: { google: "Roboto" }
code_font: { google: "JetBrains Mono" }

articles:
- title: Sections
navbar: Sections
desc: Details about sections
contents:
- articles/Summary
- articles/Markers
- articles/Gene_Expression
- articles/Differential_Expression
- articles/Exploratory_Data_Analysis
- articles/Visual_Tools
1 change: 0 additions & 1 deletion images/README.md

This file was deleted.

Binary file added man/figures/01_image_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/presentation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/presentation_t.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/presentation_t2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/scXplorer-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions vignettes/articles/Differential_Expression.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: "Differential Expression"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.path = "man/figures/",
collapse = TRUE,
comment = "#>"
)
```


<p align="justify">
In this section, the differentially expressed genes between two clusters can be obtained. The algorithm used is `findMarkers()` from the scran package and the test type can be defined in the `createSCEobject()` function (see "Summary" section). Different significance levels can be chosen interactively for both the logFC and the FDR. Once the clusters have been chosen, a table will be displayed with the list of differentially expressed genes accompanied by the logFC and the FDR obtained for each of them. This table can be downloaded in different formats: csv, pdf, xlsx.

The main figure in this section is a VolcanoPlot in which genes that are down and up expressed are coloured in blue and red, respectively. On the other hand, you can also display ViolinPlots, Spikeplots, Heatmaps and Dotplots of the differentially expressed genes.
</p>


```{r}
knitr::include_graphics("figures/differential_expression.gif")
```

41 changes: 41 additions & 0 deletions vignettes/articles/Exploratory_Data_Analysis.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Exploratory Data Analysis"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.path = "man/figures/",
collapse = TRUE,
comment = "#>"
)
```

In **Exploratory Data Analysis** section you will be able to understand the relationship between different features contained as metadata in your SCE object.

## Categories

<p align="justify">
Here you can observe the proportion of cells belonging to the different levels of a categorical variable presented in the metadata and disaggregate these proportions according to the levels of another categorical variable. All this information is displayed in the form of a barplot. In the subsection "Matrix" a confusion matrix between the two selected features can be plotted with the option to display the Jaccard index for each of the grid cells. In addition, the Rand index is displayed, which is a global measure of the similarity between the two clusterings.
</p>


```{r}
knitr::include_graphics("figures/exploratory_categories.gif")
```


## Fields

In a similar way to the previous subsection, in "Field" you can explore how the value of one or more numerical variables changes as a function of another variable, either numerical or categorical. You can make different types of plots such as: Distribution Plots, Heatmaps, Dotplots and StackedViolins.


```{r}
knitr::include_graphics("figures/fields.gif")
```




59 changes: 59 additions & 0 deletions vignettes/articles/Gene_Expression.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
title: "Gene Expression"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.path = "man/figures/",
collapse = TRUE,
comment = "#>"
)
```

<p align="justify">
In "Gene Expression" you can explore different aspects of the expression of one or more genes of interest. Determine how expression changes according to different categorical and continuous variables, as well as analyse co-detection between pairs of genes.
</p>

### Categories

<p align="justify">
In Settings you can select one or more genes or upload a file with a list of genes. The average expression of the genes of interest can be viewed in the different embeddings available, with the possibility to colour according to the different SCE partitions to compare gene expression with different cell types or conditions present in the metadata.

A wide variety of plots are available to analyse the expression of the genes of interest in the different categories. Heatmaps allow normalisation of expression by gene, clustering by row and column and grouping of cells by condition. Similarly, dotplots allow normalisation of expression and group genes with similar expression pattern.
</p>


```{r}
knitr::include_graphics("figures/categories.gif")
```


## Fields

<p align="justify">
Fields allows you to analyse the expression of a set of genes in relation to numeric variables present in your dataset, such as the number of counts or pseudotime value, if present in the metadata of the sce object. Below the embedding, a line plot of the average expression of the genes of interest as a function of the chosen variables and a spikeplot are displayed. Furthermore, you can find heatmaps sorted by the chosen numerical variable that can be divided according to some categorical variable, and multiline plots showing the comparison of the expression profile of the genes of interest along the field.
</p>


```{r}
knitr::include_graphics("figures/ge_fields.gif")
```


## Co-expression

<p align="justify">
In Co-expression section you can analyse the co-appearance of pairs of genes, determine the number and percentage of cells in which each gene is expressed separately and together. You can also view this information graphically in the embedding. In addition, the co-expression of these genes in the different conditions of any of the partitions in the dataset can be analysed by a co-detection matrix.
</p>

```{r}
knitr::include_graphics("figures/coexpression.gif")
```




48 changes: 48 additions & 0 deletions vignettes/articles/Markers.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Markers"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.path = "man/figures/",
collapse = TRUE,
comment = "#>"
)
```

<p align="justify">
This section allows to find and interact with the markers of each different clusterization. In "Markers" section there are two types of analysis. On the one hand, in "Cluster markers" clicking on a cell displays a table with the marker genes of the cluster to which that cell belongs. On the other hand, in "Find new markers" you can select a group of cells in the embedding and scXplorer will calculate their marker genes.
</p>


## Clusters markers

<p align="justify">
This section allows you to find the marker genes for the partition defined in the single-cell object, typically cell types or cell states. Clicking on one of the cells in the embedding will display a table of marker genes for the partition to which that cell belongs. For each of the markers different metrics such as boxcor, robustness and FDR are displayed. This table can be downloaded in various formats, such as .csv, .xlsx .pdf, or you can copy it to the clipboard.

By clicking on a marker in the table you can see its expression profile across the entire dataset in the embedding. In addition violin and spikeplots are displayed at the bottom.
</p>

```{r}
knitr::include_graphics("figures/cluster_markers.gif")
```


## Find new markers

<p align="justify">
Here you can select with the box or lasso tool a set of cells in the embedding and scXplorer will calculate the marker genes. You can download not only the marker table but also the selected cell list.

As in the previous section, if you click on one of the markers you can see its expression along the dataset with violin and spikeplots.
</p>

```{r}
knitr::include_graphics("figures/new_markers.gif")
```




25 changes: 25 additions & 0 deletions vignettes/articles/Summary.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "Summary"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.path = "man/figures/",
collapse = TRUE,
comment = "#>"
)
```


<p align="justify">
scXplorer displays a summary of the main descriptive information of the dataset: number of cells and genes, mean number of genes detected per cell, partions, experiments and average library size.

In the summary section, you can explore through graphical visualization the coventional quality control metrics: this is the relationship between the number of features and the count numbers. In this plot you can distinguish the cells coming from the different partitions of the dataset.
</p>

```{r}
knitr::include_graphics("figures/summary.gif")
```

Loading

0 comments on commit e5fd100

Please sign in to comment.