4 TKO chimera processing
##
## 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/
4.0.0.4 Generate single-cell balanced kNN-graph
This step needs the file
data/tet_tko.bad_genes.txt
## initializing scdb to scrna_db/
## [1] TRUE
4.0.0.6 Time chimera embryos based on their host and KO cells
## Loading required package: slam
## Loading required package: sparsesvd
4.0.0.8 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_chim_ko"
generate_mc(name = 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_chim_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_chim_ko",
# mc_id = "tko_chim_ko",
# atlas = wt_atlas,
# fig_cmp_dir = paste0("figs/atlas_projection_", "tko_chim_ko"), recolor_mc_id = "tko_chim_ko", ten2mars = F
# )
tgconfig::set_param(param = "mcell_mc2d_T_edge", value = 0.03, package = "metacell")
mcell_mc2d_force_knn(mc2d_id = "tko_chim_ko", mc_id = "tko_chim_ko", graph_id = "tko_chim_ko", graph_parametric = T, feats_gset = "tko_chim_ko")
## got 74 feat genes for mc graph construction
## png
## 2