Hi,
I am trying to find tumor cells in my dataset of epithelial cells. I have labelled the wild type condition cells as my reference (ob1).
When running the infercnv:: run command (whole code below):
newobj<-readRDS('integrated_epi.rds')
Idents(newobj)<-'dataset'
DefaultAssay(newobj)<-'RNA'
counts_matrix <- GetAssayData(newobj,slot ="counts")
ann<-ne...@meta.data[,"dataset",drop=FALSE]
infercnv_obj = CreateInfercnvObject(raw_counts_matrix=counts_matrix,
annotations_file=ann,
gene_order_file="gene_orderfile.txt",
delim="\t",
ref_group_names=c("ob1"))
# perform infercnv operations to reveal cnv signal
infercnv_obj = infercnv::run(infercnv_obj,
cutoff=0.1, # use 1 for smart-seq, 0.1 for 10x-genomics## since already processed count matrix setting to 0
out_dir="infercnv_out", # dir is auto-created for storing outputs
denoise=T,
HMM=T
)
I am getting the following error:
STEP 15: computing tumor subclusters via leiden
INFO [2023-12-03 16:19:37] define_signif_tumor_subclusters(p_val=0.1
INFO [2023-12-03 16:19:37] define_signif_tumor_subclusters(), tumor: ob2
Warning: Data is of class matrix. Coercing to dgCMatrix.
Finding variable features for layer counts
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Warning: No layers found matching search pattern provided
Error in `ScaleData()`:
! No layer matching pattern 'data' found. Please run NormalizeData and retry
My seurat object was normalized and scaled and had the data slot in RNA assay. But I cant see any 'data' in infercnv_obj. Please advice on how to proceed.