请务必注意关闭一切的代理!!
勘误:一开始把文章中的
P** 与数据中的 BIOKEY** 误认为是对等的,结果导致有两幅图是错误的。
1. import packages
# clean
rm(list = ls())
gc()
# packages)
library(dyno)
library(tidyverse)
library(Matrix)
library(Seurat)
library(stringr)
library(magrittr)
library(ggplot2)
# options
options(stringsAsFactors = F)
options(as.is = T)
setwd('/media/yuansh/14THHD/胰腺癌')
mycolors = c("#1a476f","#90353b","#55752f","#e37e00","#6e8e84",
"#c10534","#938dd2","#cac27e","#a0522d","#7b92a8",
"#2d6d66","#9c8847","#bfa19c","#ffd200","#d9e6eb")
### check dyno
dynwrap::test_docker_installation(detailed = TRUE)
dynwrap::test_singularity_installation(detailed = TRUE)
# main
### load data
sce = readRDS('Step-04-cd8_annotion_tiss_2021-11-01_01-20.rds')
dataset <- wrap_expression(
counts = t(sce@assays$RNA@counts),
expression = t(sce@assays$RNA@data)
)
#添加数据的cluster信息,这里我们直接用“seurat_clusters”即可
dataset <- add_grouping(
dataset,
sce$cell_annotion
)
dataset <- add_prior_information(
dataset,
start_id = "tils1_CATTCGCGTGCGCTTG-1"
)
guidelines <- guidelines_shiny(dataset)
methods_selected <- guidelines$methods_selected
model_slingshot <- infer_trajectory(dataset, methods_selected[1])
model_paga_tree <- infer_trajectory(dataset, methods_selected[2])
model_scorpius <- infer_trajectory(dataset, methods_selected[3])
model_angle <- infer_trajectory(dataset, methods_selected[4])
model = model_paga_tree
model <- model %>% add_dimred(dyndimred::dimred_mds, expression_source = dataset$expression)
plot_dimred(
model,
expression_source = dataset$expression,
grouping = dataset$grouping,
label_milestones = TRUE
)
plot_dimred(
model,
color_density = "grouping",
grouping = dataset$grouping
)
save(list = ls(),file = 'Step-05-cd8_tiss_dyno_2021-11-01_01-21.rdata')
### ---------------
###
### Create: Yuan.Sh
### Date: 2021-10-16 23:03:26
### Email: yuansh3354@163.com
### Blog: https://blog.csdn.net/qq_40966210
### Fujian Medical University
###
### ---------------
> 课题项目合作以及咨询请联系:yuansh3354@163.com
After advisement, if you still have questions, you can send me an E-mail asking for help
Best Regards,
Yuan.SH
---------------------------------------
please contact me via the following ways:
(a) E-mail: yuansh3354@gmail/163/outlook.com
(b) QQ: 1044532817
(c) WeChat: YuanSh181014
(d) Address: School of Basic Medical Sciences,
Fujian Medical University, Fuzhou,
Fujian 350108, China
---------------------------------------
2021-11-01 10:32:01