5 Processing of tetraploid-complemented TKO embryos
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## initializing scdb to scrna_db/
5.0.0.3 Generate single-cell balanced kNN-graph
This step needs the file
data/tet_tko.bad_genes.txt
## initializing scdb to scrna_db/
## [1] TRUE
5.0.0.5 Time tetraploid-complemented embryos based on their injected TKO cells
## Loading required package: slam
## Loading required package: sparsesvd
5.0.0.7 Generate a separate UMI matrix and metacell object for the TKO cells
source("scripts/pipeline/generic_mc.R")
tgconfig::override_params(config_file = "config/tet_chim.yaml", package = "metacell")
bad_genes <- read.table("data/tet_tko.bad_genes.txt", sep = "\t", stringsAsFactors = F)
bad_genes <- bad_genes[, 1]
mat_nm <- "tko_tetra_ko"
generate_mc(mat_nm, add_bad_genes = bad_genes)
# Run the line below if you want to transfer cell type annotation from the WT atlas to the tko_tetra_ko metacell object
#
# wt_atlas <- mcell_gen_atlas(
# mat_id = "sing_emb_wt10",
# mc_id = "sing_emb_wt10_recolored",
# gset_id = "sing_emb_wt10",
# mc2d_id = "sing_emb_wt10_recolored"
# )
# cmp <- mcell_proj_on_atlas(
# mat_id = "tko_tetra_ko",
# mc_id = "tko_tetra_ko",
# atlas = wt_atlas,
# fig_cmp_dir = paste0("figs/atlas_projection_", "tko_tetra_ko"), recolor_mc_id = "tko_tetra_ko", ten2mars = F
# )
tgconfig::set_param(param = "mcell_mc2d_T_edge", value = 0.03, package = "metacell")
mcell_mc2d_force_knn(mc2d_id = "tko_tetra_ko", mc_id = "tko_tetra_ko", graph_id = "tko_tetra_ko", graph_parametric = T, feats_gset = "tko_tetra_ko")
## got 67 feat genes for mc graph construction
## png
## 2