Error in initiate_grn()
Dear developers, I am getting a similar error message to #44 and hope you can help me fix it. I am following the quick start vignette as follows:
seurat An object of class Seurat 370722 features across 18311 samples within 3 assays Active assay: ATAC (303707 features, 288760 variable features) 2 layers present: counts, data 2 other assays present: RNA, SCT 5 dimensional reductions calculated: pca, umap_rna, lsi, umap_atac, umap
data("motifs") seurat <- Seurat::FindVariableFeatures(seurat, assay = "RNA") 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% [----|----|----|----|----|----|----|----|----|----| **************************************************|
grn_object <- initiate_grn(seurat, rna_assay = "RNA", peak_assay = "ATAC") Warning: Each of the 2 combined objects has sequence levels not in the other:
in 'x': GL000195.1, GL000205.2, GL000219.1, KI270711.1, KI270713.1, KI270721.1, KI270727.1, KI270728.1, KI270731.1 in 'y': chrMT Make sure to always combine/compare objects based on the same reference genome (use suppressWarnings() to suppress this warning).Warning: Each of the 2 combined objects has sequence levels not in the other: in 'x': GL000195.1, GL000205.2, GL000219.1, KI270711.1, KI270713.1, KI270721.1, KI270727.1, KI270728.1, KI270731.1 in 'y': chrMT Make sure to always combine/compare objects based on the same reference genome (use suppressWarnings() to suppress this warning).Error in compatibleSeqnames(rep(seqnames(x), elementNROWS(y)), seqnames(y@unlistData)) : Level set of 'x' must be subset of that of 'y', or vice versa Then I tried the solution suggested above:
DefaultAssay(seurat) <- "ATAC" granges(seurat) main_chroms <- standardChromosomes(BSgenome.Hsapiens.UCSC.hg38) keep_peaks <- as.logical(seqnames(granges(seurat)) %in% main_chroms) seurat <- seurat[keep_peaks, ]
And got the following: Error: None of the features provided found in this assay
Do you have any suggestions how to fix this? Thank you in advance!
I solved it by setting "exclude_exons = FALSE" for initiate_grn function. I don't know if it will affect the result...