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

PercentageFeatureSet error #8813

Open
iva302 opened this issue Apr 23, 2024 · 8 comments
Open

PercentageFeatureSet error #8813

iva302 opened this issue Apr 23, 2024 · 8 comments

Comments

@iva302
Copy link

iva302 commented Apr 23, 2024

Hello,
I am running the following code and it fails to add percent.mt information to my seurat object. I have performed this analysis successfully on the same sample before. I have checked the structure of all the objects and everything looks good. This is mouse sample.

the 10x hdf5 file contains both data types.

inputdata.10x <- Read10X_h5("/mnt/Disk2/iva/e8.5_multiome/1180A/outs/filtered_feature_bc_matrix.h5")

extract RNA and ATAC data

rna_counts <- inputdata.10x$Gene Expression
wt <- CreateSeuratObject(counts = rna_counts)
wt[["percent.mt"]] <- PercentageFeatureSet(wt, pattern = "^mt-")

This is the error message-
......."Gm28406", "Gm29436", "Gm28977", "Gm28407", "Gm29392", "Gm29393", "Gm21294",
"Gm28672", "Gm28670", "Gm28673", "Gm28674", "Gm21996", "Gm28930", "Gm29504",
"Gm20837", "Gm28300", "Gm28301", "Gm21860", "Gm47283", "Gm21748", "mt-Nd1",
"mt-Nd2", "mt-Co1", "mt-Co2", "mt-Atp8", "mt-Atp6", "mt-Co3", "mt-Nd3", "mt-Nd4l",
"mt-Nd4", "mt-Nd5", "mt-Nd6", "mt-Cytb", "AC125149.3", "AC125149.5", "AC125149.1",
"AC125149.2", "AC125149.4", "AC133103.4", "AC133103.6", "AC133103.7", "AC133103.5",
"AC133103.1", "AC133103.3", "AC168977.2", "AC168977.1", "CAAA01118383.1",
"Vmn1r186", "AC102264.1", "AC132444.1", "AC132444.3", "AC132444.5", "AC132444.4",
"AC132444.2", "Csprs", "AC132444.6", "Vamp7", "CAAA01165726.1", "Spry3", "Tmlhe",
"Ccl21b.1", "AC087559.3", "Fam205a4.1", "AC087559.2", "Ccl21c", "AC140325.2",
"AC140325.1", "Gm3286.1", "AC140325.3", "AC140325.4", "Vmn2r122", "Il11ra2.1",
"Ccl27a.1", "CR974586.2", "Ccl21c.1", "CR974586.3", "CR974586.5", "CR974586.4",
"4933409K07Rik", "CR974586.1", "Ccl27a.2", "Il11ra2.2", "Ccl19.1", "Ccl21a.1",
"Gm10931", "CT868723.1", "CAAA01147332.1", "AC164084.2", "AC164084.3",
"AC164084.1", "AC165294.1", "AC165294.2", "AC165294.3", "AC125178.1", "AC125178.3",
"AC125178.2", "AC123873.3", "AC123873.1", "AC123873.2", "AC126035.1", "Gm16367",
"AC163611.1", "AC163611.2", "AC140365.1", "AC124606.2", "AC124606.1", "AC133095.2",
"AC133095.1", "AC234645.1", or "AC149090.1", not "counts".
ℹ Did you mean "Clint1"?

Backtrace:

  1. ├─Seurat::PercentageFeatureSet(wt, pattern = "^mt-")
  2. │ ├─features %||% ...
  3. │ ├─base::grep(...)
  4. │ │ └─base::is.factor(x)
  5. │ ├─base::rownames(x = object[[assay]][layer])
  6. │ ├─object[[assay]][layer]
  7. │ └─SeuratObject:::[.Assay(object[[assay]], layer)
  8. │ ├─SeuratObject::LayerData(...)
  9. │ └─SeuratObject:::LayerData.Assay(features = i)
  10. │ └─rlang::arg_match(...)
  11. │ └─rlang:::arg_match_multi(arg, values, error_arg, error_call)
  12. │ └─rlang:::map_chr(arg, ~arg_match0(.x, values, error_arg, error_call = error_call))
  13. │ └─rlang:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
  14. │ └─base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
  15. │ └─rlang (local) FUN(X[[i]], ...)
  16. │ └─rlang::arg_match0(.x, values, error_arg, error_call = error_call)
  17. └─rlang:::stop_arg_match(w, values = x, error_arg = y, error_call = z)
  18. └─rlang::abort(msg, call = error_call, arg = error_arg)

Thank you,
Iva

@samuel-marsh
Copy link
Collaborator

Hi,

Can you please post the output of sessionInfo()?

Thanks,
Sam

@iva302
Copy link
Author

iva302 commented Apr 24, 2024

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] patchwork_1.1.3 ggplot2_3.4.4 EnsDb.Mmusculus.v79_2.99.0
[4] ensembldb_2.18.4 AnnotationFilter_1.18.0 GenomicFeatures_1.46.5
[7] AnnotationDbi_1.56.2 Biobase_2.54.0 GenomicRanges_1.46.1
[10] GenomeInfoDb_1.30.1 IRanges_2.28.0 S4Vectors_0.32.4
[13] BiocGenerics_0.40.0 Seurat_5.0.1 SeuratObject_5.0.1
[16] sp_2.1-2 Signac_1.12.0 dplyr_1.1.4
[19] magrittr_2.0.3

loaded via a namespace (and not attached):
[1] spam_2.10-0 fastmatch_1.1-4
[3] BiocFileCache_2.2.1 plyr_1.8.9
[5] igraph_1.5.1 lazyeval_0.2.2
[7] splines_4.1.2 RcppHNSW_0.5.0
[9] BiocParallel_1.28.3 listenv_0.9.0
[11] scattermore_1.2 digest_0.6.33
[13] htmltools_0.5.7 fansi_1.0.6
[15] memoise_2.0.1 tensor_1.5
[17] cluster_2.1.6 ROCR_1.0-11
[19] globals_0.16.2 Biostrings_2.62.0
[21] matrixStats_1.1.0 spatstat.sparse_3.0-3
[23] prettyunits_1.2.0 colorspace_2.1-0
[25] rappdirs_0.3.3 blob_1.2.4
[27] ggrepel_0.9.4 crayon_1.5.2
[29] RCurl_1.98-1.13 jsonlite_1.8.8
[31] progressr_0.14.0 spatstat.data_3.0-3
[33] survival_3.5-7 zoo_1.8-12
[35] glue_1.7.0 polyclip_1.10-6
[37] gtable_0.3.4 zlibbioc_1.40.0
[39] XVector_0.34.0 leiden_0.4.3.1
[41] DelayedArray_0.20.0 future.apply_1.11.0
[43] abind_1.4-5 scales_1.3.0
[45] DBI_1.2.1 spatstat.random_3.2-2
[47] miniUI_0.1.1.1 Rcpp_1.0.11
[49] progress_1.2.3 viridisLite_0.4.2
[51] xtable_1.8-4 reticulate_1.34.0
[53] bit_4.0.5 dotCall64_1.1-1
[55] htmlwidgets_1.6.4 httr_1.4.7
[57] RColorBrewer_1.1-3 ellipsis_0.3.2
[59] ica_1.0-3 XML_3.99-0.16
[61] pkgconfig_2.0.3 dbplyr_2.3.4
[63] uwot_0.1.16 deldir_2.0-2
[65] utf8_1.2.4 tidyselect_1.2.1
[67] rlang_1.1.3 reshape2_1.4.4
[69] later_1.3.2 munsell_0.5.0
[71] tools_4.1.2 cachem_1.0.8
[73] cli_3.6.2 generics_0.1.3
[75] RSQLite_2.3.4 ggridges_0.5.4
[77] stringr_1.5.1 fastmap_1.1.1
[79] yaml_2.3.7 goftest_1.2-3
[81] bit64_4.0.5 fitdistrplus_1.1-11
[83] purrr_1.0.2 RANN_2.6.1
[85] KEGGREST_1.34.0 pbapply_1.7-2
[87] future_1.33.0 nlme_3.1-164
[89] mime_0.12 RcppRoll_0.3.0
[91] xml2_1.3.6 biomaRt_2.50.3
[93] compiler_4.1.2 rstudioapi_0.15.0
[95] filelock_1.0.2 curl_5.2.0
[97] plotly_4.10.3 png_0.1-8
[99] spatstat.utils_3.0-4 tibble_3.2.1
[101] stringi_1.8.3 RSpectra_0.16-1
[103] lattice_0.22-5 ProtGenerics_1.26.0
[105] Matrix_1.6-4 vctrs_0.6.5
[107] pillar_1.9.0 lifecycle_1.0.4
[109] spatstat.geom_3.2-7 lmtest_0.9-40
[111] RcppAnnoy_0.0.21 data.table_1.15.4
[113] cowplot_1.1.1 bitops_1.0-7
[115] irlba_2.3.5.1 rtracklayer_1.54.0
[117] httpuv_1.6.13 BiocIO_1.4.0
[119] R6_2.5.1 promises_1.2.1
[121] KernSmooth_2.23-20 gridExtra_2.3
[123] parallelly_1.36.0 codetools_0.2-18
[125] fastDummies_1.7.3 MASS_7.3-60
[127] SummarizedExperiment_1.24.0 rjson_0.2.21
[129] withr_3.0.0 GenomicAlignments_1.30.0
[131] sctransform_0.4.1 Rsamtools_2.10.0
[133] GenomeInfoDbData_1.2.7 hms_1.1.3
[135] parallel_4.1.2 grid_4.1.2
[137] tidyr_1.3.1 MatrixGenerics_1.6.0
[139] Rtsne_0.17 spatstat.explore_3.2-5
[141] shiny_1.8.0 restfulr_0.0.15

@samuel-marsh
Copy link
Collaborator

Hi @iva302,

If you update Seurat to current cran release (5.0.3) do you get the same error?

Best,
Sam

@iva302
Copy link
Author

iva302 commented Apr 25, 2024

Hello,
I uninstalled older Seurat version and installed 5.0.3 version and I am still getting the same error-

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base

other attached packages:
[1] patchwork_1.2.0 ggplot2_3.5.1 EnsDb.Mmusculus.v79_2.99.0
[4] ensembldb_2.18.4 AnnotationFilter_1.18.0 GenomicFeatures_1.46.5
[7] AnnotationDbi_1.56.2 Biobase_2.54.0 GenomicRanges_1.46.1
[10] GenomeInfoDb_1.30.1 IRanges_2.28.0 S4Vectors_0.32.4
[13] BiocGenerics_0.40.0 Seurat_5.0.3 SeuratObject_5.0.1
[16] sp_2.1-3 Signac_1.12.0 dplyr_1.1.4
[19] magrittr_2.0.3

loaded via a namespace (and not attached):
[1] utf8_1.2.4 spatstat.explore_3.2-7
[3] reticulate_1.36.1 tidyselect_1.2.1
[5] RSQLite_2.3.4 htmlwidgets_1.6.4
[7] grid_4.1.2 BiocParallel_1.28.3
[9] Rtsne_0.17 munsell_0.5.1
[11] codetools_0.2-18 ica_1.0-3
[13] future_1.33.2 miniUI_0.1.1.1
[15] withr_3.0.0 spatstat.random_3.2-3
[17] colorspace_2.1-0 progressr_0.14.0
[19] filelock_1.0.2 knitr_1.46
[21] rstudioapi_0.15.0 ROCR_1.0-11
[23] tensor_1.5 listenv_0.9.1
[25] MatrixGenerics_1.6.0 GenomeInfoDbData_1.2.7
[27] polyclip_1.10-6 bit64_4.0.5
[29] parallelly_1.37.1 vctrs_0.6.5
[31] generics_0.1.3 xfun_0.43
[33] biovizBase_1.42.0 BiocFileCache_2.2.1
[35] R6_2.5.1 hdf5r_1.3.8
[37] bitops_1.0-7 spatstat.utils_3.0-4
[39] cachem_1.0.8 DelayedArray_0.20.0
[41] promises_1.3.0 BiocIO_1.4.0
[43] scales_1.3.0 nnet_7.3-19
[45] gtable_0.3.5 globals_0.16.3
[47] processx_3.8.2 goftest_1.2-3
[49] spam_2.10-0 rlang_1.1.3
[51] RcppRoll_0.3.0 splines_4.1.2
[53] rtracklayer_1.54.0 lazyeval_0.2.2
[55] dichromat_2.0-0.1 checkmate_2.3.1
[57] spatstat.geom_3.2-9 yaml_2.3.8
[59] reshape2_1.4.4 abind_1.4-5
[61] backports_1.4.1 httpuv_1.6.15
[63] Hmisc_5.1-1 tools_4.1.2
[65] RColorBrewer_1.1-3 ggridges_0.5.6
[67] Rcpp_1.0.12 plyr_1.8.9
[69] base64enc_0.1-3 progress_1.2.3
[71] zlibbioc_1.40.0 purrr_1.0.2
[73] RCurl_1.98-1.13 ps_1.7.5
[75] prettyunits_1.2.0 rpart_4.1.23
[77] deldir_2.0-4 pbapply_1.7-2
[79] cowplot_1.1.3 zoo_1.8-12
[81] SummarizedExperiment_1.24.0 ggrepel_0.9.5
[83] cluster_2.1.6 data.table_1.15.4
[85] RSpectra_0.16-1 scattermore_1.2
[87] lmtest_0.9-40 RANN_2.6.1
[89] ProtGenerics_1.26.0 fitdistrplus_1.1-11
[91] matrixStats_1.3.0 evaluate_0.23
[93] hms_1.1.3 mime_0.12
[95] xtable_1.8-4 XML_3.99-0.16
[97] fastDummies_1.7.3 gridExtra_2.3
[99] compiler_4.1.2 biomaRt_2.50.3
[101] tibble_3.2.1 KernSmooth_2.23-20
[103] crayon_1.5.2 htmltools_0.5.8.1
[105] later_1.3.2 Formula_1.2-5
[107] tidyr_1.3.1 DBI_1.2.1
[109] dbplyr_2.3.4 MASS_7.3-60
[111] rappdirs_0.3.3 Matrix_1.6-4
[113] cli_3.6.2 parallel_4.1.2
[115] dotCall64_1.1-1 igraph_2.0.3
[117] pkgconfig_2.0.3 GenomicAlignments_1.30.0
[119] foreign_0.8-86 plotly_4.10.4
[121] spatstat.sparse_3.0-3 xml2_1.3.6
[123] XVector_0.34.0 VariantAnnotation_1.40.0
[125] stringr_1.5.1 callr_3.7.3
[127] digest_0.6.35 sctransform_0.4.1
[129] RcppAnnoy_0.0.22 spatstat.data_3.0-4
[131] Biostrings_2.62.0 rmarkdown_2.26
[133] leiden_0.4.3.1 fastmatch_1.1-4
[135] htmlTable_2.4.2 uwot_0.2.2
[137] restfulr_0.0.15 curl_5.2.1
[139] shiny_1.8.1.1 Rsamtools_2.10.0
[141] rjson_0.2.21 lifecycle_1.0.4
[143] nlme_3.1-164 jsonlite_1.8.8
[145] BSgenome_1.62.0 viridisLite_0.4.2
[147] fansi_1.0.6 pillar_1.9.0
[149] lattice_0.22-5 KEGGREST_1.34.0
[151] fastmap_1.1.1 httr_1.4.7
[153] pkgbuild_1.4.2 survival_3.5-7
[155] glue_1.7.0 remotes_2.4.2.1
[157] png_0.1-8 bit_4.0.5
[159] stringi_1.8.3 blob_1.2.4
[161] RcppHNSW_0.6.0 memoise_2.0.1
[163] irlba_2.3.5.1 future.apply_1.11.2

@igrabski
Copy link
Contributor

igrabski commented May 3, 2024

Hi, can you show what the output of your object wt looks like, and what your input counts rna_counts looks like?

@iva302
Copy link
Author

iva302 commented May 3, 2024

Hello,
This is the output of my object wt-

wt
An object of class Seurat
32285 features across 20000 samples within 1 assay
Active assay: RNA (32285 features, 0 variable features)
2 layers present: counts, data

Is this what you mean by rna_counts?

wt$nCount_RNA
AAACAGCCAACTAGGG-1 AAACAGCCAAGGTAAC-1 AAACAGCCAAGTGAAC-1 AAACAGCCAATAACGA-1
3507 2507 2324 2663
AAACAGCCACAAAGCG-1 AAACAGCCACAACCTA-1 AAACAGCCACATTAAC-1 AAACAGCCACTAGCGT-1
1380 4056 2564 1285
AAACAGCCAGCAATAA-1 AAACAGCCAGCATTAT-1 AAACAGCCAGGAACAT-1 AAACAGCCAGGCATCT-1
1992 1729 783 974
AAACAGCCAGTTGCGT-1 AAACAGCCATCAGCAC-1 AAACAGCCATTCAGCA-1 AAACAGCCATTCCTGT-1
1183 804 1432 2074

Thank you,
Iva

@igrabski
Copy link
Contributor

igrabski commented May 3, 2024

Thanks! And sorry, by rna_counts, I am referring to your object called rna_counts (from this line of code, rna_counts <- inputdata.10x$Gene Expression)

@iva302
Copy link
Author

iva302 commented May 3, 2024

Hello,
This is output of rna_counts-

rna_counts
32285 x 20000 sparse Matrix of class "dgCMatrix"
[[ suppressing 35 column names 'AAACAGCCAACTAGGG-1', 'AAACAGCCAAGGTAAC-1', 'AAACAGCCAAGTGAAC-1' ... ]]
[[ suppressing 35 column names 'AAACAGCCAACTAGGG-1', 'AAACAGCCAAGGTAAC-1', 'AAACAGCCAAGTGAAC-1' ... ]]

Xkr4 . . . . . . . 3 . . . . . . 1 . . . . 1 1 2 . . . . . . . . . . . . . ......
Gm1992 . . . . . . . 1 . . . . . . . . . . . . . . . 1 . . . . . . . . . . . ......
Gm19938 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Gm37381 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Rp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Sox17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Gm37587 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Gm37323 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Mrpl15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Lypla1 . 2 . 2 . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Tcea1 . 2 1 . . . . . . 1 1 . . 1 . . 1 1 . 4 1 . 1 4 . 1 1 . . . . . . 2 . ......
Rgs20 . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Gm16041 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Atp6v1h 1 . . . . . . . . . . . . 1 . 1 1 . . 1 . . . . . . . . . . . . . 2 . ......

..............................
........suppressing 19965 columns and 32257 rows in show(); maybe adjust options(max.print=, width=)
..............................
[[ suppressing 35 column names 'AAACAGCCAACTAGGG-1', 'AAACAGCCAAGGTAAC-1', 'AAACAGCCAAGTGAAC-1' ... ]]

AC123873.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC123873.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC123873.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC126035.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
Gm16367 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC163611.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC163611.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC140365.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC124606.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC124606.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC133095.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC133095.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC234645.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
AC149090.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......

Thank you,
Iva

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

3 participants