-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCENIC_Bcell.r
97 lines (45 loc) · 2.53 KB
/
SCENIC_Bcell.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/Rscript
# 2021-2-19
# TFs analysis in B cells
#==================================================================================================
# first you have to generate a csv file
# run in R
library(Seurat)
dat <- readRDS("/public/workspace/lily/CTN/version_3_20/data/Bcell.RDS")
# sub.data=subset(dat,cells=which(dat$refine.group.new%in%c("CT.SC.dominant","CTN.dominant","NC.dominant")))
# if the result is all cells with TFs ,so do not subset cells
write.csv(t(as.matrix(dat[['RNA']]@data)),file="/public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.csv")
#===============================================================================================
# run in shell use pyscenic
#===============================================================================================
#!/bin/sh
bytlib load python-3.6.6
/public/workspace/lily/Lung2Brain/inte7/Pyscenic/Scenic/arboreto_with_multiprocessing.py \
-o /public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.adjacencies.csv \
--method grnboost2 \
--seed 12345 \
--num_workers 5 \
/public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.csv \
/public/workspace/zhumy/ref/SCENIC/hs_hgnc_curated_tfs.txt
echo "step 1 done"
sleep 10
pyscenic ctx \
/public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.adjacencies.csv \
/public/workspace/zhumy/ref/SCENIC/hg19-500bp-upstream-7species.mc9nr.feather \
/public/workspace/zhumy/ref/SCENIC/hg19-tss-centered-10kb-7species.mc9nr.feather \
--annotations_fname /public/workspace/lily/Lung2Brain/inte7/Pyscenic/motifs-v9-nr.hgnc-m0.001-o0.0.tbl \
--expression_mtx_fname /public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.csv \
--output /public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell_regulons.tsv \
--num_workers 6 \
--mode "custom_multiprocessing"
#=====================================================================================================
echo "step 2 done"
sleep 10
pyscenic aucell \
/public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell.csv /public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell_regulons.tsv \
--output /public/workspace/lily/CTN/version_3_20/trajectory/Bcell/all_Bcell_auc_mtx.tsv \
--num_workers 5 --seed 12345
# pyscenic aucell \
# $expression_mtx_fname $ctx_output \
# --output $aucell_output \
# --num_workers 5 --seed 12345