添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

上周运行成功的代码如下:

infercnv_obj = CreateInfercnvObject(raw_counts_matrix="counts.matrix.txt.gz",
annotations_file="Cell_type.txt",
delim="\t",
gene_order_file="hg38_gencode_v27.txt",
ref_group_names = c("Myeloid cells",

infercnv_obj =  readRDS(file = "../14_invert_log_transformHMMi6.infercnv_obj")
# 运行inferCNV程序
infercnv_obj = infercnv::run(infercnv_obj,
cutoff=0.1, # cutoff=1 works well for Smartseq2,and cutoff=0.1 works well for 10x Genomics
out_dir="./",
cluster_by_groups=TRUE,
denoise=TRUE,
HMM=TRUE,num_threads = 40)

再次运行后报错如下:

STEP 15: computing tumor subclusters via leiden
INFO [2023-09-11 08:22:45] define_signif_tumor_subclusters(p_val=0.1
INFO [2023-09-11 08:22:45] define_signif_tumor_subclusters(), tumor: 0
Counts matrix provided is not sparse. Creating V5 assay in Seurat Object.
Error in GetAssay.Seurat(object = object, assay = assay) : 
  infercnv is not an assay present in the given object. Available assays are: 

以上为完整报错,第15步出现上述报错,请是什么原因呢? 该怎么解决呢?
Counts matrix provided is not sparse. Creating V5 assay in Seurat Object. Error in GetAssay.Seurat(object = object, assay = assay) : infercnv is not an assay present in the given object. Available assays are: 这个错误提示说明在给定的Seurat对象中不存在名为"infercnv"的assay。这可能是由于以下原因之一造成的: 1. 可能在运行infercnv之前,counts.matrix.txt.gz文件的内容或格式发生了变化。请确保该文件的内容没有被更改,并且仍然符合infercnv的要求。 2. 可能在读取保存的infercnv对象时发生了错误。请确保文件路径和文件名正确,并且文件没有被损坏。 为了解决这个问题,你可以尝试以下步骤: 1. 检查counts.matrix.txt.gz文件的内容和格式是否正确,确保没有发生任何变化。 2. 检查读取保存的infercnv对象的代码是否正确,并且文件路径和文件名是否正确。 3. 如果上述步骤都没有解决问题,可以尝试重新运行整个流程,包括重新生成counts.matrix.txt.gz文件和重新创建infercnv对象。 希望这些解决方法能够帮助你解决问题。如果问题仍然存在,请提供更多的细节和错误信息,以便我能够提供更具体的帮助。