Verified Commit b8f4ed5b authored by Laurent Modolo's avatar Laurent Modolo
Browse files

3_dimension_reduciton update

parent 21b8b0f5
Pipeline #326 failed with stage
in 21 seconds
......@@ -262,10 +262,8 @@ Cell barcode corresponding to $n$-plet should be in the minority if the preparat
## Cell filtering
\begin{block}{hypothesis}
### hypothesis
Cell barcode corresponding to $n$-plet should be in the minority if the preparation went well.
\end{block}
### Algorithm
......
......@@ -8,9 +8,9 @@ output:
fig_caption: no
highlight: tango
latex_engine: xelatex
slide_level: 1
slide_level: 2
theme: metropolis
ioslides_presentation:
oslides_presentation:
highlight: tango
slidy_presentation:
highlight: tango
......@@ -28,8 +28,6 @@ classoption: aspectratio=169
5. Pseudo-time and velocity inference (Thursday 30 June 2022 - 14:00)
6. Differental expression analysis (Friday 8 July 2022 - 14:00)
# Introduction
## Programme
1. Single-cell RNASeq data from 10X Sequencing (Friday 3 June 2022 - 14:00)
......@@ -38,10 +36,106 @@ classoption: aspectratio=169
- Dimension of the data
- Linear dimention reduction
- Non-Linear dimention reduction
- t-SNE
- U-MAP
- Auto-encoder
- Variational Auto-encoder
- t-SNE
- UMAP
- Auto-encoder
4. Clustering and annotation (Thursday 23 June 2022 - 14:00)
5. Pseudo-time and velocity inference (Thursday 30 June 2022 - 14:00)
6. Differential expression analysis (Friday 8 July 2022 - 14:00)
\ No newline at end of file
6. Differential expression analysis (Friday 8 July 2022 - 14:00)
# Dimension of the data
## High dimensional count data
\begin{center}
\[
X_{cells \times genes} =
\begin{bmatrix}
x_{1,1} & x_{1,2} & x_{1,3} & \cdots & x_{1,c} \\
x_{2,1} & x_{2,2} & x_{2,3} & \cdots & x_{2,c} \\
x_{3,1} & x_{3,2} & x_{3,3} & \cdots & x_{3,c} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
x_{n,1} & x_{n,2} & x_{n,3} & \cdots & x_{n,c} \\
\end{bmatrix}
\]
\end{center}
We have $20-30^5$ rows (genes or transcripts) and up to $10^6$ columns (cells)
## Geometric interpretation of $X_{cells \times genes}$
\begin{center}
\begin{columns}
\column{0.5\textwidth}
\begin{center}
\[
X_{1 \times genes} =
\begin{bmatrix}
x_{1,c} \\
x_{2,c} \\
x_{3,c} \\
\end{bmatrix}
\]
\end{center}
\column{0.5\textwidth}
\end{columns}
\end{center}
## Geometric interpretation of $X_{cells \times genes}$
\begin{center}
\begin{columns}
\column{0.5\textwidth}
\begin{center}
\[
X_{1 \times genes} =
\begin{bmatrix}
x_{1,c} \\
x_{2,c} \\
x_{3,c} \\
\end{bmatrix}
\]
\end{center}
\column{0.5\textwidth}
\begin{tikzpicture}[fill=blue,fill opacity=0.7,draw,scale=3,rounded corners=0.5pt]
\def\cubecol{blue}
\def\opacity{0.8}
\filldraw (-0.5,-0.5,-0.5) -- ++(1,0,0) -- ++(0,1,0) -- ++(-1, 0, 0) -- cycle;
\filldraw (-0.5,-0.5,-0.5) -- ++(1,0,0) -- ++(0,0,1) -- ++(-1, 0, 0) -- cycle;
\filldraw (-0.5,-0.5,-0.5) -- ++(0,1,0) -- ++(0,0,1) -- ++(0, -1, 0) -- cycle;
\filldraw[fill=blue!20] (0.5,0.5,0.5) -- ++(-1,0,0) -- ++(0,-1,0) -- ++(1, 0, 0) -- cycle;
\filldraw[fill=blue!50!black!50] (0.5,0.5,0.5) -- ++(-1,0,0) -- ++(0,0,-1) -- ++(1, 0, 0) -- cycle;
\filldraw[fill=blue!20!black!80] (0.5,0.5,0.5) -- ++(0,-1,0) -- ++(0,0,-1) -- ++(0, 1, 0) -- cycle;
\end{tikzpicture}
\end{columns}
\end{center}
## Matrix factorization
### Low dimensional representation
\begin{itemize}
\item Cells: $ {\bf U} \in \mathbb{R}^{n\times \textcolor{red}{K}} $
\item Genes: $ {\bf V} \in \mathbb{R}^{p\times \textcolor{red}{K}} $
\end{itemize}
\vspace{-2em}
\begin{center}
\includegraphics[height=4cm]{./img/matrix_factorization.png}
\end{center}
\begin{center}
What is the sens of ${\bf \approx}$ ?
\end{center}
# Linear dimention reduction
# Non-Linear dimention reduction
# t-SNE
# UMAP
# Auto-encoder
# Variational Auto-encoder
\ No newline at end of file
library(tidyverse)
# regression
x <- c(61, 67, 32, 43, 57, 44, 39, 38, 42, 51)
y <- c(30, 33, 15, 23, 26, 18, 23, 17, 27, 37)
plot(x, y, xlim=c(20, 80), ylim=c(10,40), pch=15, las = 1, main = "Le crit`ere d'ajustement")
b <- 1/6
a <- 17
ytheo <- b*x + a
abline(a,b)
points(x, ytheo, pch=20, col="blue", cex=1.5)
segments(x,ytheo,x,y)
mess <- paste("Ecart = ",round(mean((y-ytheo)^2),dig=2))
text(50,12,mess)
library(MASS)
library(rgl)
library(factoextra)
data <- mvrnorm(
n = 1000,
mu = c(0, 2, -2),
Sigma = matrix(
c(
1, .8, -.8,
.8, 1, -0.9,
-.8, 0.9, 0.9
),
ncol = 3)
) %>%
scale() %>%
as.data.frame() %>%
as_tibble()
data %>% plot()
plot3d(data, type = "p", )
plot3d(ellipse3d(cor(data)), col = "blue", alpha = 0.25, add = T)
pca <- prcomp(data, scale = FALSE)
pca_coord <- prcomp(data, scale = FALSE) %>% get_pca_ind() %>% .$coord
pca_var <- prcomp(data, scale = FALSE) %>% get_pca_var() %>% .$coord
pca_coord %>%
as_tibble() %>%
plot()
plot3d(pca_coord, type = "p")
plot3d(ellipse3d(cor(pca_coord %*% pca_var)), col = "blue", alpha = 0.25, add = T)
cbind(pca_coord[, 2], data[, 1]) %>% plot()
......@@ -8,9 +8,9 @@ output:
fig_caption: no
highlight: tango
latex_engine: xelatex
slide_level: 1
slide_level: 2
theme: metropolis
ioslides_presentation:
oslides_presentation:
highlight: tango
slidy_presentation:
highlight: tango
......
......@@ -8,9 +8,9 @@ output:
fig_caption: no
highlight: tango
latex_engine: xelatex
slide_level: 1
slide_level: 2
theme: metropolis
ioslides_presentation:
oslides_presentation:
highlight: tango
slidy_presentation:
highlight: tango
......
......@@ -8,9 +8,9 @@ output:
fig_caption: no
highlight: tango
latex_engine: xelatex
slide_level: 1
slide_level: 2
theme: metropolis
ioslides_presentation:
oslides_presentation:
highlight: tango
slidy_presentation:
highlight: tango
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment