-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi!
First off, thank you for this analysis tool!
I am analyzing some Perturb-Seq data and have followed the vignette. I ran Mixscale_Scatterplot and interestingly the perturbation score seems positively correlated to the expression of my knocked-down transcription factors. I would expect a the highest perturbation score to be correlated with very low expression of the target gene.
I'm interested to know what you believe may be happening or whether I have made an error in my code. Thank you!
Here is my code:
library(Seurat)
library(ggridges)
library(ggplot2)
library(Mixscale)
library(dplyr)
file <- "experimental"
load(paste0("data/",file,"_scMAGeCK_meta_filtered.RData"))
filtered_seurat@meta.data$perturb_status <- case_when(is.na(filtered_seurat@meta.data$gene) ~ "NP",
filtered_seurat@meta.data$gene == "Non-Targeting" ~ "NT",
.default = "KO")
# standard pre-processing
filtered_seurat = NormalizeData(filtered_seurat)
filtered_seurat = FindVariableFeatures(filtered_seurat, nfeatures = 2000)
filtered_seurat = ScaleData(filtered_seurat)
filtered_seurat = RunPCA(filtered_seurat)
Idents(filtered_seurat) <- "gene"
# calculate Perturbation signatures
seurat_obj <- CalcPerturbSig(
object = filtered_seurat,
assay = "RNA",
slot = "data",
gd.class ="gene",
nt.cell.class = "Non-Targeting",
reduction = "pca",
ndims = 40,
num.neighbors = 20,
new.assay.name = "PRTB",
split.by = NULL)
# run mixscale
seurat_obj = RunMixscale(
object = seurat_obj,
assay = "PRTB",
slot = "scale.data",
labels = "gene",
nt.class.name = "Non-Targeting",
min.de.genes = 5,
logfc.threshold = 0.2,
de.assay = "RNA",
max.de.genes = 100,
new.class.name = "mixscale_score",
fine.mode = F,
verbose = F,
split.by = NULL)
# Visualize
RidgePlot(
seurat_obj,
features = "mixscale_score",
group.by = "gene") + NoLegend()
# Check if the scores correlate with the expression level of the target gene itself
Mixscale_ScatterPlot(object = seurat_obj,
nt.class.name = "Non-Targeting",
slct.ident = unique(seurat_obj$gene)[unique(seurat_obj$gene) != "Non-Targeting"][1:8],
nbin = 10,
facet_wrap = "gene") + NoLegend()
Best,
Mujeeb
Metadata
Metadata
Assignees
Labels
No labels
