Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in initiate_grn() #70

Open
madeleineagerholm opened this issue Jan 12, 2025 · 0 comments
Open

Error in initiate_grn() #70

madeleineagerholm opened this issue Jan 12, 2025 · 0 comments

Comments

@madeleineagerholm
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant