Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BioCellGenpublic
MIG_2019_scRNAseqworkshop
Commits
a86f3d1d
Commit
a86f3d1d
authored
Oct 03, 2019
by
Ruqian Lyu
Browse files
fix typos
parent
aaa63eae
Pipeline
#961
passed with stage
in 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Sidebyside
course_files/pseudotime.Rmd
View file @
a86f3d1d
...
...
@@ 294,7 +294,6 @@ heatmap(heatdata, Colv = NA,
```
We
will
regress
each
gene
on
the
pseudotime
variable
we
have
generated
,
using
a
general
additive
model
(
GAM
).
This
allows
us
to
detect
non

linear
patterns
in
gene
expression
.
##
Monocle
...
...
@@ 311,12 +310,12 @@ defined as a separate cell state.
###
Monocle
2
`
Monocle
2
`
[@
Qiu2017

xq
]
uses
a
different
approach
,
with
dimensionality
reduction
and
ordering
performed
by
reverse
graph
embedding
(
RGE
),
allowing
it
to
detect
branching
events
in
an
unsupervised
manner
.
RGE
,
a
machine

learning
strategy
,
learns
a
‘
principal
graph
’
to
describe
the
single

cell
dataset
.
RGE
also
learns
the
mapping
function
of
data
points
on
the
trajectory
back
to
the
original
high
dimentional
space
simutaneously
.
In
doing
so
,
it
aims
to
position
the
latent
points
in
the
lower
dimension
space
(
along
the
trajectory
)
while
also
ensuring
their
corresponding
graph
embedding
(
RGE
),
allowing
it
to
detect
branching
events
in
an
unsupervised
manner
.
RGE
,
a
machine

learning
strategy
,
learns
a
‘
principal
graph
’
to
describe
the
single

cell
dataset
.
RGE
also
learns
the
mapping
function
of
data
points
on
the
trajectory
back
to
the
original
high
dimentional
space
simutaneously
.
In
doing
so
,
it
aims
to
position
the
latent
points
in
the
lower
dimension
space
(
along
the
trajectory
)
while
also
ensuring
their
corresponding
positions
in
the
input
dimension
are
‘
neighbors
’
.
There
are
different
ways
of
implementing
the
RGE
framework
,
`
Monocle
2
`
uses
`
DDRTree
`(
Discriminative
dimensionality
reduction
via
learning
a
tree
)
by
default
.
DDRTree
learns
latent
points
and
the
projection
of
latent
points
to
the
points
in
original
input
space
,
which
is
equivalent
to
"dimension reduction"
.
In
addition
,
it
simutanously
learns
'principal graph'
for
K

means
soft
clustered
cetroids
for
the
latent
points
.
Principal
graph
is
the
spanning
tree
of
those
centroids
.
`
DDRTree
`
learns
latent
points
and
the
projection
of
latent
points
to
the
points
in
original
input
space
,
which
is
equivalent
to
"dimension reduction"
.
In
addition
,
it
simutanously
learns
'principal graph'
for
K

means
soft
clustered
centroids
for
the
latent
points
.
Principal
graph
is
the
spanning
tree
of
those
centroids
.
DDRTree
returns
a
principal
tree
of
the
centroids
of
cell
clusters
in
low
dimension
,
pseudotime
is
derived
for
individual
cells
by
calculating
geomdestic
distance
of
their
projections
onto
the
tree
from
the
root
(
user

defined
or
arbitrarily
assigned
).
...
...
@@ 385,12 +384,11 @@ Monocle 2 performs pretty well on these cells.
###
Monocle
3
[`
Monocle3
`](
https
://
www
.
nature
.
com
/
articles
/
s41586

019

0969

x
)[@
Cao2019

cj
]
is
the
updated
single

cell
analysis
toolkit
for
analysing
large
datasets
.
[
Monocle
3
](
https
://
cole

trapnell

lab
.
github
.
io
/
monocle3
/
docs
/
starting
/)
is
designed
for
use
with
absolute
transcript
counts
(
e
.
g
.
from
UMI
experiments
).
It
first
does
dimension
reduction
with
UMAP
and
then
clusters
the
cells
with
Louvian
/
Leiden
algorithms
and
merge
adjacent
groups
into
supergroup
,
and
finaly
resovles
the
trajectories
individual
cells
can
take
during
development
,
identifies
the
locations
of
branches
and
convergences
within
each
supergroup
.
[`
Monocle3
`](
https
://
www
.
nature
.
com
/
articles
/
s41586

019

0969

x
)[@
Cao2019

cj
]
is
the
updated
single

cell
analysis
toolkit
for
analysing
large
datasets
.
[
Monocle
3
](
https
://
cole

trapnell

lab
.
github
.
io
/
monocle3
/
docs
/
starting
/)
is
designed
for
use
with
absolute
transcript
counts
(
e
.
g
.
from
UMI
experiments
).
It
first
does
dimension
reduction
with
UMAP
,
then
it
clusters
the
cells
with
Louvain
/
Leiden
algorithms
and
merge
adjacent
groups
into
supergroup
,
and
finaly
resovles
the
trajectories
individual
cells
can
take
during
development
within
each
supergroup
.
In
short
,
Monocle3
uses
`
UMAP
`
to
construct
a
initial
trajectory
inference
and
refines
it
with
learning
principal
graph
.
It
builds
KNN
graph
in
the
UMAP
dimensions
and
runs
Louvain
/
Leiden
algorithms
o
m
the
KNN
graph
to
derive
communities
;
edges
are
drawn
to
connect
communities
that
have
more
links
(
Partitioned
Approximate
Graph
Abstraction
(
PAGA
)
graph
).
Each
component
of
the
PAGA
grah
is
passed
to
the
next
step
which
is
learning
principal
graph
based
on
the
SimplePPT
algorithm
.
The
pseudotime
is
calculated
for
individual
cells
by
projecting
the
cells
to
their
nearest
point
on
the
principal
graph
edge
and
measure
geodesic
distance
along
of
principal
points
to
the
closest
of
their
root
nodes
.
It
builds
KNN
graph
in
the
UMAP
dimensions
and
runs
Louvain
/
Leiden
algorithms
o
n
the
KNN
graph
to
derive
communities
;
edges
are
drawn
to
connect
communities
that
have
more
links
(
Partitioned
Approximate
Graph
Abstraction
(
PAGA
)
graph
).
Each
component
of
the
PAGA
gra
p
h
is
passed
to
the
next
step
which
is
learning
principal
graph
based
on
the
SimplePPT
algorithm
.
The
pseudotime
is
calculated
for
individual
cells
by
projecting
the
cells
to
their
nearest
point
on
the
principal
graph
edge
and
measure
geodes
t
ic
distance
along
of
principal
points
to
the
closest
of
their
root
nodes
.
```{
r
run_monocle3
}
...
...
@@ 423,7 +421,8 @@ cds < order_cells(cds, root_cells = c("zy","zy.1","zy.2","zy.3") )
plot_cells
(
cds
,
color_cells_by
=
"cell_type2"
,
graph_label_size
=
4
,
cell_size
=
2
,
group_label_size
=
6
)+
scale_color_manual
(
values
=
my_color
)
plot_cells
(
cds
,
graph_label_size
=
6
,
cell_size
=
1
,
color_cells_by
=
"pseudotime"
,
plot_cells
(
cds
,
graph_label_size
=
6
,
cell_size
=
1
,
color_cells_by
=
"pseudotime"
,
group_label_size
=
6
)
pdata_cds
<
pData
(
cds
)
pdata_cds
$
pseudotime_monocle3
<
monocle3
::
pseudotime
(
cds
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment