You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error in validate_infercnv_obj(infercnv_obj): Problem detected w/ infercnv_obj and Error: No feature overlap between existing object and new layer data
#659
Open
Prakrithi-P opened this issue
Apr 23, 2024
· 0 comments
out_dir = tempfile()
infercnv_obj_default = infercnv::run(
infercnv_obj,
cutoff=1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics
out_dir="./infercnv/CY112/",
cluster_by_groups=TRUE,
plot_steps=FALSE,
denoise=TRUE,
HMM=FALSE,
no_prelim_plot=TRUE,
png_res=60
)
This gave me the following error:
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(p_val=0.1
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: CD8+ T cell
INFO [2024-04-18 17:56:52] Less cells in group CD8+ T cell than k_nn setting. Keeping as a single subcluster.
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: B cell
INFO [2024-04-18 17:56:52] Less cells in group B cell than k_nn setting. Keeping as a single subcluster.
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: Macrophage
Warning message:
“Data is of class matrix. Coercing to dgCMatrix.”
Error: No feature overlap between existing object and new layer data
Traceback:
LayerData<-(object = *tmp*, layer = layer, features = features[[layer]],
. cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
LayerData<-.Assay5(object = *tmp*, layer = layer, features = features[[layer]],
. cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
stop("No feature overlap between existing object and new layer data",
. call. = FALSE)
In the New version 1.19.1, the same command gives the following error:
INFO [2024-04-23 18:08:51] ::above_min_mean_expr_cutoff:Start
INFO [2024-04-23 18:08:51] Removing 1919 genes from matrix as below mean expr threshold: 1
INFO [2024-04-23 18:08:51] validating infercnv_obj
ERROR [2024-04-23 18:08:51] hmm.... rownames([email protected] != rownames(infercnv_obj@gene_order))
Error in validate_infercnv_obj(infercnv_obj): Problem detected w/ infercnv_obj
Traceback:
Hi when I run inferCNV I get errors, irrespective of the versions.
In an older Version
options("CY112sn_subset.assay.version" = "v3")
infercnv_obj = CreateInfercnvObject(
raw_counts_matrix=GetAssayData(CY112sn_subset, slot="scale.data"),
annotations_file=infercnv_meta,
delim="\t",
gene_order_file="infercnv//hg38_gencode_v27.txt",
ref_group_names=c("CD8+ T cell","B cell","CD4+ T cell","Lymphatic endothelial cell","Fibroblast","Endothelial cell"))
#Macrophage
out_dir = tempfile()
infercnv_obj_default = infercnv::run(
infercnv_obj,
cutoff=1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics
out_dir="./infercnv/CY112/",
cluster_by_groups=TRUE,
plot_steps=FALSE,
denoise=TRUE,
HMM=FALSE,
no_prelim_plot=TRUE,
png_res=60
)
This gave me the following error:
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(p_val=0.1
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: CD8+ T cell
INFO [2024-04-18 17:56:52] Less cells in group CD8+ T cell than k_nn setting. Keeping as a single subcluster.
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: B cell
INFO [2024-04-18 17:56:52] Less cells in group B cell than k_nn setting. Keeping as a single subcluster.
INFO [2024-04-18 17:56:52] define_signif_tumor_subclusters(), tumor: Macrophage
Warning message:
“Data is of class matrix. Coercing to dgCMatrix.”
Error: No feature overlap between existing object and new layer data
Traceback:
. cluster_by_groups = TRUE, plot_steps = FALSE, denoise = TRUE,
. HMM = FALSE, no_prelim_plot = TRUE, png_res = 60)
. p_val = tumor_subcluster_pval, k_nn = k_nn, leiden_resolution = leiden_resolution,
. leiden_method = leiden_method, leiden_function = leiden_function,
. hclust_method = hclust_method, cluster_by_groups = cluster_by_groups,
. partition_method = tumor_subcluster_partition_method, per_chr_hmm_subclusters = per_chr_hmm_subclusters,
. z_score_filter = z_score_filter)
. tumor_group_idx = tumor_group_idx, tumor_expr_data = tumor_expr_data,
. chrs = chrs, k_nn = k_nn, leiden_resolution = leiden_resolution,
. leiden_method = leiden_method, leiden_function = leiden_function,
. hclust_method = hclust_method)
. k_nn = k_nn, resolution_parameter = leiden_resolution, objective_function = leiden_function)
. names.field = 1)
. names.field = 1)
. ...)
. transpose = transpose, type = type, csum = csum, fsum = fsum,
. ...)
. min.features = min.features, transpose = transpose, type = type,
. csum = csum, fsum = fsum, ...)
LayerData<-
(object =*tmp*
, layer = layer, features = features[[layer]],. cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
LayerData<-.Assay5
(object =*tmp*
, layer = layer, features = features[[layer]],. cells = cells[[layer]], transpose = transpose, value = counts[[layer]])
. call. = FALSE)
In the New version 1.19.1, the same command gives the following error:
INFO [2024-04-23 18:08:51] ::above_min_mean_expr_cutoff:Start
INFO [2024-04-23 18:08:51] Removing 1919 genes from matrix as below mean expr threshold: 1
INFO [2024-04-23 18:08:51] validating infercnv_obj
ERROR [2024-04-23 18:08:51] hmm.... rownames([email protected] != rownames(infercnv_obj@gene_order))
Error in validate_infercnv_obj(infercnv_obj): Problem detected w/ infercnv_obj
Traceback:
. cluster_by_groups = TRUE, plot_steps = FALSE, denoise = TRUE,
. HMM = FALSE, no_prelim_plot = TRUE, png_res = 60)
I get the same errors despite the rownames being the same. Could you please help me solve this?
Thanks,
Prakrithi
The text was updated successfully, but these errors were encountered: