seurat icon indicating copy to clipboard operation
seurat copied to clipboard

`FindAllMarkers` - `fc.name` column is "avg_log2FC" with "scale.data" slot, rather than "avg_diff"

Open lucygarner opened this issue 2 months ago • 0 comments

Expected the fold change column in the FindAllMarkers output data.frame to be named avg_diff when using the "scale.data" slot, but it is named avg_log2FC.

library(Seurat)
library(SeuratData)

InstallData("pbmc3k")
data("pbmc3k")
pbmc3k <- UpdateSeuratObject(pbmc3k)

pbmc3k <- NormalizeData(pbmc3k)
pbmc3k <- FindVariableFeatures(pbmc3k)
all.genes <- rownames(pbmc3k)
pbmc3k <- ScaleData(pbmc3k, features = all.genes)

Idents(pbmc3k) <- "seurat_annotations"
markers <- FindAllMarkers(pbmc3k, slot = "scale.data", only.pos = TRUE)

R version 4.3.2 (2023-10-31) Platform: x86_64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.4.1

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London tzcode source: internal

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

other attached packages: [1] pbmcref.SeuratData_1.0.0 pbmc3k.SeuratData_3.1.4 SeuratData_0.2.2.9001
[4] Seurat_5.0.3 SeuratObject_5.0.1 sp_2.1-3

loaded via a namespace (and not attached): [1] deldir_2.0-4 pbapply_1.7-2 gridExtra_2.3
[4] rlang_1.1.3 magrittr_2.0.3 RcppAnnoy_0.0.22
[7] spatstat.geom_3.2-9 matrixStats_1.2.0 ggridges_0.5.6
[10] compiler_4.3.2 png_0.1-8 vctrs_0.6.5
[13] reshape2_1.4.4 stringr_1.5.1 crayon_1.5.2
[16] pkgconfig_2.0.3 fastmap_1.1.1 utf8_1.2.4
[19] promises_1.2.1 purrr_1.0.2 jsonlite_1.8.8
[22] goftest_1.2-3 later_1.3.2 spatstat.utils_3.0-4
[25] irlba_2.3.5.1 parallel_4.3.2 cluster_2.1.6
[28] R6_2.5.1 ica_1.0-3 stringi_1.8.3
[31] RColorBrewer_1.1-3 spatstat.data_3.0-4 limma_3.58.1
[34] reticulate_1.35.0 parallelly_1.37.1 lmtest_0.9-40
[37] scattermore_1.2 Rcpp_1.0.12 tensor_1.5
[40] future.apply_1.11.2 zoo_1.8-12 sctransform_0.4.1
[43] httpuv_1.6.15 Matrix_1.6-5 splines_4.3.2
[46] igraph_2.0.3 tidyselect_1.2.1 rstudioapi_0.16.0
[49] abind_1.4-5 spatstat.random_3.2-3 codetools_0.2-19
[52] miniUI_0.1.1.1 spatstat.explore_3.2-7 listenv_0.9.1
[55] lattice_0.22-6 tibble_3.2.1 plyr_1.8.9
[58] withr_3.0.0 shiny_1.8.1 ROCR_1.0-11
[61] Rtsne_0.17 future_1.33.2 fastDummies_1.7.3
[64] survival_3.5-8 polyclip_1.10-6 fitdistrplus_1.1-11
[67] pillar_1.9.0 BiocManager_1.30.22 KernSmooth_2.23-22
[70] renv_1.0.5 plotly_4.10.4 generics_0.1.3
[73] RcppHNSW_0.6.0 ggplot2_3.5.0 munsell_0.5.1
[76] scales_1.3.0 globals_0.16.3 xtable_1.8-4
[79] glue_1.7.0 lazyeval_0.2.2 tools_4.3.2
[82] data.table_1.15.4 RSpectra_0.16-1 RANN_2.6.1
[85] leiden_0.4.3.1 dotCall64_1.1-1 cowplot_1.1.3
[88] grid_4.3.2 tidyr_1.3.1 colorspace_2.1-0
[91] nlme_3.1-164 patchwork_1.2.0 presto_1.0.0
[94] cli_3.6.2 rappdirs_0.3.3 spatstat.sparse_3.0-3 [97] spam_2.10-0 fansi_1.0.6 viridisLite_0.4.2
[100] dplyr_1.1.4 uwot_0.1.16 gtable_0.3.4
[103] digest_0.6.35 progressr_0.14.0 ggrepel_0.9.5
[106] htmlwidgets_1.6.4 htmltools_0.5.8 lifecycle_1.0.4
[109] httr_1.4.7 statmod_1.5.0 mime_0.12
[112] MASS_7.3-60.0.1

lucygarner avatar May 05 '24 20:05 lucygarner