Giter Site home page Giter Site logo

spotclean's People

Contributors

hpliner avatar jwokaty avatar zijianni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spotclean's Issues

BayesSpace after SpotClean

Dear developers,

I want to use BayesSpace for clustering after spotclean like you mentioned at your paper.
Can I please know how did you process spotclean results for the BayesSpace input?
I am confusing since BayesSpace requires us to use count assay and we need to normalize & run pca & run umap.
Can I just use spot clean decont assay instead of counts assay and log-normalize & run pca to be used as a BayesSpace input file??

Thank you,
Jihyun

SpotClean performance on 11x11mm slides and questions regarding to output

Hello and thank you again for this wonderful package,

During the release of the paper, you had mentioned that the package was only tested on 6.5x6.5mm Visium V1 slides. I have both Visium CytAssist Gene Expression (GEX) and Visium CytAssist Gene + Protein Expression (GEX/PEX) outputs from 11x11mm slides. I have a few questions about the downstream analysis outputs of these data:

  • Filtering in CreateSlide Function: When I use the CreateSlide function, roughly ~30,000 genes with average expressions below or equal to 0.1 get filtered out. When I reduce the gene_cutoff parameter to 0.01, around ~25,000 genes are filtered out, leaving between approximately 6,000 and 10,000 features. Is this number of features sufficient for downstream analyses, or should I reconsider the filtering process? Cause' when I compare scRNA-seq deconvolution methods using unfiltered and filtered data, the deconvolution from the unfiltered data seemed more consistent with the Immunohistochemistry (IHC) staining results. However, the unfiltered data appears noisy. Are there any different filtering methods you could recommend?

  • Barcode Mismatch: As I mentioned in #15 , there was a mismatch between my slide info object and raw data in terms of barcodes. I proceeded with my analysis by discarding barcodes not present in the raw matrix. However, when I run PCA, I find genes like “DEPRECATED-ENSG00000026297” as variable genes. Is this an expected behavior, or has a technical artifact occurred?

  • Issues with CytAssist Gene + Protein Assay: When I run the CytAssist Gene + Protein Assay (additionally to GEX, co-detect 35-Plex Immune Proteins with oligo-tagged antibody panel on same slide), it captures protein expressions similarly to gene expressions. However, this seems to lead the Principal Components (PCs) astray. PEX values average around 15,000 to 20,000, and when combined with GEX values, it appears to cause overrepresentation of these proteins, potentially affecting the downstream analysis.

Would appreciate any insights or guidance on these matters.

Thank you.

Adapt to Spaceranger 2.0 output

Hello,

the ouput of the newest version of Spaceranger 2.0 changed slightly (see Release Notes).
The file tissue_positions_list.csv was renamed to tissue_positions.csv and a header was added to the CSV file.

Changing header = FALSE to TRUE for tissue_csv_file in read10xSlide worked for me (but of course would break backwards compatibility).

Thanks
Jérémy

Error in convertToSeurat function, "Error in FUN(left, right) : non-numeric argument to binary operator"

Hi,

Thanks for the great software.
I want to convert my slide object to seurat object. When I run the convertToSeurat function, I get the following error and it does not work.

set.seed(1234)
raw <-SpotClean::read10xRaw("B1_SRT/raw.data")
image <- SpotClean::read10xSlide(tissue_csv_file = "B1_SRT/image/tissue_positions_list.csv",
                      tissue_img_file = "B1_SRT/image/tissue_lowres_image.png",
                      scale_factor_file = "B1_SRT/image/scalefactors_json.json")

obj <- createSlide(count_mat = raw, slide_info = image)
visualizeSlide(slide_obj = obj)
p1 <- visualizeHeatmap(obj,rownames(obj)[1])
decont_obj <- spotclean(obj)
seurat_obj <- SpotClean::convertToSeurat(slide_obj = decont_obj, image_dir = "B1_SRT/image")

> seurat_obj <- SpotClean::convertToSeurat(slide_obj = decont_obj, image_dir = "B1_SRT/image")
Warning: Feature names cannot have underscores ('_'), replacing with dashes ('-')
Error in FUN(left, right) : non-numeric argument to binary operator

If anyone have any idea about it, please let me know.

Thank you a lot.

Maki

Error in createSlide(), 'barcodes in count matrix do not match barcodes in slide info'

Hi SpotClean

First, thanks for this awesome tool, can't wait to implement it into my research program.

I am following the SpotClean vignette.Rmd tutorial
https://github.com/JEFworks-Lab/STdeconvolve/blob/package/vignettes/vignette.Rmd

At the 'visualize data' section I get an error message stating 'Barcodes in count matrix do not match barcodes in slide information' (see screenshot).
image

Also my first time using GitHub, so please excuse my nube-newness.

Best
Bart

How to modify strength of SpotClean?

Hi SpotClean authors,

I found spotclean effectively reduced the diffusion of some region-specific signals to surrounding regions (I could still see some signals diffusing into surrounding regions). Is it possible to modify the strength of spotclean?

Thanks!

Issue due to missing spot barcodes in raw matrix

Hi @zijianni ,

It was brought to my attention that running spotclean can have issues when the set of barcodes in the raw matrix does not match the set of barcodes in the tissue positions csv. This occurs when one or more spots has 0 reads, since the raw matrix only contains spot barcodes with > 0 reads and the tissue positions csv contains all barcodes. While this isn't very common in Visium data, it is the intended behavior of Space Ranger.

Thanks for developing and maintaining this package for Visium users,
Matt

Spotclean() stalls on testdata

Hi,
I'm running Spotclean on the provided test data of adult mouse brain following the vignette. However, the function spotclean() produces a Warning and then stops running:

data(mbrain_raw)

spatial_dir <- system.file(file.path("extdata", "V1_Adult_Mouse_Brain_spatial"), package = "SpotClean")

mbrain_slide_info <- read10xSlide(tissue_csv_file=file.path(spatial_dir, "tissue_positions_list.csv"),
tissue_img_file = file.path(spatial_dir, "tissue_lowres_image.png"),
scale_factor_file = file.path(spatial_dir, "scalefactors_json.json"))

slide_obj <- createSlide(mbrain_raw, mbrain_slide_info)
Filtered out 0 genes with average expressions below or equal to 0.1.

decont_obj <- spotclean(slide_obj, maxit=10, candidate_radius = 20)
2024-03-14 11:39:18.71935 Start.
Warning: No layers found matching search pattern providedError in match.arg(arg = method, choices = names(x = methods)) :
'arg' should be one of

The warning actually stops with " 'arg' should be one of ".

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.4

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-arm64/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/Berlin
tzcode source: internal

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

other attached packages:
[1] sceasy_0.0.7 reticulate_1.35.0 SpotClean_1.4.0

loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 rstudioapi_0.15.0 jsonlite_1.8.8
[4] magrittr_2.0.3 magick_2.8.3 spatstat.utils_3.0-4
[7] farver_2.1.1 rmarkdown_2.26 zlibbioc_1.48.0
[10] vctrs_0.6.5 ROCR_1.0-11 spatstat.explore_3.2-6
[13] RCurl_1.98-1.14 bmp_0.3 S4Arrays_1.2.1
[16] htmltools_0.5.7 readbitmap_0.1.5 Rhdf5lib_1.24.2
[19] rhdf5_2.46.1 SparseArray_1.2.4 sctransform_0.4.1
[22] parallelly_1.37.1 KernSmooth_2.23-22 htmlwidgets_1.6.4
[25] ica_1.0-3 plyr_1.8.9 plotly_4.10.4
[28] zoo_1.8-12 igraph_2.0.2 mime_0.12
[31] lifecycle_1.0.4 pkgconfig_2.0.3 Matrix_1.6-5
[34] R6_2.5.1 fastmap_1.1.1 GenomeInfoDbData_1.2.11
[37] MatrixGenerics_1.14.0 fitdistrplus_1.1-11 future_1.33.1
[40] shiny_1.8.0 digest_0.6.34 colorspace_2.1-0
[43] patchwork_1.2.0 S4Vectors_0.40.2 Seurat_5.0.2
[46] tensor_1.5 RSpectra_0.16-1 irlba_2.3.5.1
[49] GenomicRanges_1.54.1 labeling_0.4.3 progressr_0.14.0
[52] fansi_1.0.6 spatstat.sparse_3.0-3 httr_1.4.7
[55] polyclip_1.10-6 abind_1.4-5 compiler_4.3.2
[58] withr_3.0.0 tiff_0.1-12 viridis_0.6.5
[61] fastDummies_1.7.3 MASS_7.3-60.0.1 DelayedArray_0.28.0
[64] rjson_0.2.21 tools_4.3.2 lmtest_0.9-40
[67] httpuv_1.6.14 future.apply_1.11.1 goftest_1.2-3
[70] glue_1.7.0 rhdf5filters_1.14.1 nlme_3.1-164
[73] promises_1.2.1 grid_4.3.2 Rtsne_0.17
[76] cluster_2.1.6 reshape2_1.4.4 generics_0.1.3
[79] gtable_0.3.4 spatstat.data_3.0-4 tidyr_1.3.1
[82] data.table_1.15.2 sp_2.1-3 utf8_1.2.4
[85] XVector_0.42.0 BiocGenerics_0.48.1 spatstat.geom_3.2-9
[88] RcppAnnoy_0.0.22 ggrepel_0.9.5 RANN_2.6.1
[91] pillar_1.9.0 stringr_1.5.1 spam_2.10-0
[94] RcppHNSW_0.6.0 later_1.3.2 splines_4.3.2
[97] dplyr_1.1.4 lattice_0.22-5 survival_3.5-8
[100] deldir_2.0-4 tidyselect_1.2.0 SingleCellExperiment_1.24.0
[103] miniUI_0.1.1.1 pbapply_1.7-2 knitr_1.45
[106] gridExtra_2.3 IRanges_2.36.0 SummarizedExperiment_1.32.0
[109] scattermore_1.2 stats4_4.3.2 xfun_0.42
[112] Biobase_2.62.0 matrixStats_1.2.0 stringi_1.8.3
[115] lazyeval_0.2.2 yaml_2.3.8 evaluate_0.23
[118] codetools_0.2-19 tibble_3.2.1 cli_3.6.2
[121] uwot_0.1.16 xtable_1.8-4 munsell_0.5.0
[124] Rcpp_1.0.12 GenomeInfoDb_1.38.7 globals_0.16.3
[127] spatstat.random_3.2-3 png_0.1-8 parallel_4.3.2
[130] ellipsis_0.3.2 ggplot2_3.5.0 dotCall64_1.1-1
[133] jpeg_0.1-10 bitops_1.0-7 listenv_0.9.1
[136] SpatialExperiment_1.12.0 viridisLite_0.4.2 scales_1.3.0
[139] ggridges_0.5.6 crayon_1.5.2 SeuratObject_5.0.1
[142] leiden_0.4.3.1 purrr_1.0.2 rlang_1.1.3
[145] cowplot_1.1.3

Happy to hear your opinions on that.
Thanks!

install for R <= 4.1.3

Hi there,
is it possible to install your package for R version <= 4.1.3 ?

ERROR: this R is version 4.1.3, package 'SpotClean' requires R >= 4.2.0

Many Thanks

How to run with large datasets in limited memory?

Hello,

Thanks for the software.
I have a datasets of around 80k spots in tissue. I tried run decontamination on a 1000Gb memory machine, but met errors below:

Loading required package: stats4
Loading required package: BiocGenerics

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:stats’:

    IQR, mad, sd, var, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min


Attaching package: ‘S4Vectors’

The following object is masked from ‘package:utils’:

    findMatches

The following objects are masked from ‘package:base’:

    expand.grid, I, unname

Filtered out 30107 genes with average expressions below or equal to 0.1.
2023-06-05 09:24:16.913087 Start.
Kept 142 highly expressed or highly variable genes.
2023-06-05 09:32:47.415611 Estimating contamination parameters...
  |                                                                      |   0%
 *** caught segfault ***
address 0x2b1118048000, cause 'invalid permissions'

Traceback:
 1: base::crossprod(x, y)
 2: crossprod(W_y)
 3: crossprod(W_y)
 4: unname(crossprod(W_y))
 5: .SpotClean(raw_data = raw_data, slide = slide, gene_keep = gene_keep,     maxit = maxit, tol = tol, candidate_radius = candidate_radius,     kernel = kernel, verbose = verbose)
 6: spotclean.SummarizedExperiment(slide_obj, maxit = 10, candidate_radius = 20)
 7: spotclean(slide_obj, maxit = 10, candidate_radius = 20)
An irrecoverable exception occurred. R is aborting now ...
/opt/gridengine/default/spool/cngb-gpu-f15-1/job_scripts/2281748: line 2: 71808 Segmentation fault      (core dumped) /jdfssz1/ST_SUPERCELLS/P21Z10200N0134/USER/lizeyu/00.software/Miniconda3/envs/r430/bin/Rscript /jdfssz1/ST_SUPERCELLS/P21Z10200N0134/Project/25.ESCA/lizeyu/27.SpotClean/spotclean.run.R

It looks like caused by memory size limit. Do you have advice about running on this large data?
Can I downsample in-tissue spots into several parts to run seperately and later merge the results into one?

Thank you a a lot!

Pixel removal issue

Dear spotclean developers,

Hello!
When I use spotclean with multiple visium samples, some samples still keep most of the pixel.
But for my half of visium samples, almost 1/3 of pixels are removed..
This problem is kept even when I used different options (kernal and gene cutoff) while running spot clean.

I want to know what caused this situation. Is this only due to my low-quality visium? or Is there anyway that I can keep most of the pixel even after use of spotclean?

Thank you,
Jihyun

Error in keepHighGene(raw_ts_data, verbose = verbose) : no slot of name "meta.data" for this object of class "Assay"

Spotclean really helps when searching for the common signatures in the clustering of ST spots. When i followed the tutorial, i came up with a problem. My raw code was following:

rawdata=read10xRawH5('PATH/TO/raw_feature_bc_matrix.h5')
spatial_dir='PATH/TO/spatial'
slide_info <- read10xSlide(tissue_csv_file=file.path(spatial_dir,
                                                            "tissue_positions_list.csv"),
                                  tissue_img_file = file.path(spatial_dir,
                                                              "tissue_lowres_image.png"),
                                  scale_factor_file = file.path(spatial_dir,
                                                                "scalefactors_json.json"))
slide_obj <- createSlide(rawdata, slide_info)
decont_obj <- spotclean(slide_obj);

And it came up with:

Error in keepHighGene(raw_ts_data, verbose = verbose) : 
  no slot of name "meta.data" for this object of class "Assay"

I am anticipating for your kind help!

Questions about the output

Hi SpotClean developers,

Can I ask another question about the output?

Since the default parameter for SpotClean will work on highly expressed and highly variable genes, the decontaminated objects will only contain those highly expressed genes. Would you suggest only keeping these genes for downstream analysis, or also try to include lowly expressed genes?

Thanks!

Questions about tissue regions

Hi SpotClean developers,

Thank you for contributing this great tool to the community.

I have a question about the tissue regions.

In the tissue_positions.csv file from SpaceRanger output, it has a column that indicates whether the spot is in tissue or not.
However, this region is predefined by the user in Loupe Browser. Sometimes, we see folds on the tissue, and we exclude these regions. The fold regions will still have a lot of reads, but not marked as in tissue in the tissue_positions.csv file. Since the spotclean model takes information of the regions outside the tissue, do I need to manually include these fold regions to get more accurately cleaned spots?

Thanks,
Changfeng

Error: non-finite value supplied by optim

Hello,

I am testing SpotClean on a few 10X Visium datasets and am running into an error on some. I have not tried debugging too extensively as I'm hoping to get more information from the community. Below is an example of the error. Wish I could provide data, but hopefully it won't be necessary. Appreciate any input, thanks!

debug: res <- .SpotClean(raw_data = raw_data, slide = slide, gene_keep = gene_keep, 
    maxit = maxit, tol = tol, candidate_radius = candidate_radius, 
    kernel = kernel, verbose = verbose)
Browse[3]> 
2023-11-29 18:20:23.937389 Start.
Kept 1710 highly expressed or highly variable genes.
2023-11-29 18:20:26.097311 Estimating contamination parameters...
  |                                                                      |   0%Error in optim(x_init, .fn_optim, .gr_optim, method = "L-BFGS-B", obs_exp = obs_exp,  : 
  non-finite value supplied by optim

Here is the output of sessionInfo()

R version 4.3.2 (2023-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Rocky Linux 8.7 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /gpfs/gsfs12/users/abbass2/miniforge3/envs/spotclean/lib/libopenblasp-r0.3.25.so;  LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: system (glibc)

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

other attached packages:
 [1] SpatialExperiment_1.10.0    SingleCellExperiment_1.22.0
 [3] SummarizedExperiment_1.30.2 Biobase_2.60.0             
 [5] GenomicRanges_1.52.0        GenomeInfoDb_1.36.1        
 [7] IRanges_2.34.1              S4Vectors_0.38.1           
 [9] BiocGenerics_0.46.0         MatrixGenerics_1.12.2      
[11] matrixStats_1.1.0           SpotClean_1.2.0            
[13] SeuratObject_4.1.4          Seurat_4.4.0               

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3        jsonlite_1.8.7           
  [3] magrittr_2.0.3            magick_2.8.1             
  [5] spatstat.utils_3.0-4      zlibbioc_1.46.0          
  [7] vctrs_0.6.4               ROCR_1.0-11              
  [9] DelayedMatrixStats_1.22.1 spatstat.explore_3.2-5   
 [11] RCurl_1.98-1.13           bmp_0.3                  
 [13] htmltools_0.5.7           S4Arrays_1.0.4           
 [15] readbitmap_0.1.5          Rhdf5lib_1.22.0          
 [17] rhdf5_2.44.0              sctransform_0.4.1        
 [19] parallelly_1.36.0         KernSmooth_2.23-22       
 [21] htmlwidgets_1.6.3         ica_1.0-3                
 [23] plyr_1.8.9                plotly_4.10.3            
 [25] zoo_1.8-12                igraph_1.5.1             
 [27] mime_0.12                 lifecycle_1.0.4          
 [29] pkgconfig_2.0.3           Matrix_1.6-3             
 [31] R6_2.5.1                  fastmap_1.1.1            
 [33] GenomeInfoDbData_1.2.10   fitdistrplus_1.1-11      
 [35] future_1.33.0             shiny_1.8.0              
 [37] digest_0.6.33             colorspace_2.1-0         
 [39] patchwork_1.1.3           tensor_1.5               
 [41] dqrng_0.3.1               irlba_2.3.5.1            
 [43] beachmat_2.16.0           progressr_0.14.0         
 [45] fansi_1.0.5               spatstat.sparse_3.0-3    
 [47] httr_1.4.7                polyclip_1.10-6          
 [49] abind_1.4-5               compiler_4.3.2           
 [51] withr_2.5.2               tiff_0.1-12              
 [53] BiocParallel_1.34.2       viridis_0.6.4            
 [55] R.utils_2.12.3            HDF5Array_1.28.1         
 [57] MASS_7.3-60               DelayedArray_0.26.6      
 [59] rjson_0.2.21              tools_4.3.2              
 [61] lmtest_0.9-40             httpuv_1.6.12            
 [63] future.apply_1.11.0       goftest_1.2-3            
 [65] R.oo_1.25.0               glue_1.6.2               
 [67] rhdf5filters_1.12.1       nlme_3.1-164             
 [69] promises_1.2.1            grid_4.3.2               
 [71] Rtsne_0.16                cluster_2.1.5            
 [73] reshape2_1.4.4            generics_0.1.3           
 [75] gtable_0.3.4              spatstat.data_3.0-3      
 [77] R.methodsS3_1.8.2         tidyr_1.3.0              
 [79] data.table_1.14.8         sp_2.1-2                 
 [81] utf8_1.2.4                XVector_0.40.0           
 [83] spatstat.geom_3.2-7       RcppAnnoy_0.0.21         
 [85] ggrepel_0.9.4             RANN_2.6.1               
 [87] pillar_1.9.0              stringr_1.5.1            
 [89] limma_3.56.2              later_1.3.1              
 [91] splines_4.3.2             dplyr_1.1.4              
 [93] lattice_0.22-5            survival_3.5-7           
 [95] deldir_2.0-2              tidyselect_1.2.0         
 [97] locfit_1.5-9.8            scuttle_1.10.1           
 [99] miniUI_0.1.1.1            pbapply_1.7-2            
[101] gridExtra_2.3             edgeR_3.42.4             
[103] scattermore_1.2           DropletUtils_1.20.0      
[105] stringi_1.8.2             lazyeval_0.2.2           
[107] codetools_0.2-19          tibble_3.2.1             
[109] cli_3.6.1                 uwot_0.1.16              
[111] xtable_1.8-4              reticulate_1.34.0        
[113] munsell_0.5.0             Rcpp_1.0.11              
[115] globals_0.16.2            spatstat.random_3.2-2    
[117] png_0.1-8                 parallel_4.3.2           
[119] ellipsis_0.3.2            ggplot2_3.4.4            
[121] jpeg_0.1-10               sparseMatrixStats_1.12.2 
[123] bitops_1.0-7              listenv_0.9.0            
[125] viridisLite_0.4.2         scales_1.3.0             
[127] ggridges_0.5.4            crayon_1.5.2             
[129] leiden_0.4.3.1            purrr_1.0.2              
[131] rlang_1.1.2               cowplot_1.1.1    

Ensembl IDs to Gene Names

Sorry for the many questions, but I decided to open a separate issue for this in case anyone else has the same problem. I noticed that running SpotClean seems to convert gene names into Ensembl IDs. Is there a way to avoid this or change back after running SpotClean?

Thanks.

SpatialExperiment::spatialData now deprecated

It looks like spotclean is relying on SpatialExperiment::spatialData for pulling various data from a SpatialExperiment object, but spatialData is now deprecated and when I run spotclean I get the following error:

spotclean(spe)
Note: spatialData and spatialDataNames have been deprecated; all columns should be stored in colData and spatialCoords
Error in `rename()`:
! Can't rename columns that don't exist.
✖ Column `in_tissue` doesn't exist.

But in_tissue does exist in my object:

> head(colData(spe))
DataFrame with 6 rows and 4 columns
                   in_tissue array_row array_col   sample_id
                   <logical> <integer> <integer> <character>
AAACAACGAATAGTTC-1     FALSE         0        16    sample01
AAACAAGTATCTCCCA-1     FALSE        50       102    sample01
AAACAATCTACTAGCA-1     FALSE         3        43    sample01
AAACACCAATAACTGC-1     FALSE        59        19    sample01
AAACAGAGCGACTCCT-1     FALSE        14        94    sample01
AAACAGCTTTCAGAAG-1     FALSE        43         9    sample01

some session details:

R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.7.1
SpatialExperiment_1.8.0
SpotClean_1.0.0 

Prepare for upcoming Seurat v5 release

I am opening this issue as a notification because SpotClean is listed here as a package that relies (depends/imports/suggests) on Seurat. As you may know, we recently released Seurat v5 as a beta in March of this year, with new updates for spatial, multimodal, and massively scalable analysis. For more information on updates and improvements, check out our website https://satijalab.org/seurat/.
We are now preparing to release Seurat v5 to CRAN, and plan to submit it on October 23rd. While we have tried our best to keep things backward-compatible, it is possible that updates to Seurat and SeuratObject might break your existing functionality or tests. We wanted to reach out before the new version is on CRAN, so that there's time to report issues/incompatibilities and prepare you for any changes in your code base that might be necessary.

We apologize for any disruption or inconvenience, but hope that the improvements to Seurat v5 will benefit your users going forward.
To test the upcoming release, you can install Seurat from the seurat5 branch using the instructions available on this page: https://satijalab.org/seurat/articles/install.

Thank you!
Seurat v5 team

Running SpotClean on all genes

Hey Zijan,

I've been doing the analysis on the SpatialLIBD, but I'm running into an error when I try to retain all genes when running SpotClean.

2021-08-05 05:01:00 Start.
2021-08-05 05:01:02 Estimating contamination parameters...
  |=======================================================================================================================| 100%
2021-08-05 05:22:39 Decontaminating genes ...

Iteration: 1
Log-likelihood: -Inf
Max difference of decontaminated expressions: NaN

Iteration: 2
Log-likelihood: -1141369.052
Max difference of decontaminated expressions: NaN
Error in if (Lambda_maxdiff < tol) { : 
  missing value where TRUE/FALSE needed

I noticed you pointed out it's not that useful for lowly expressing genes, but I still need all genes when computing things like a cell-signature score on the spatial plot.

Best,
Chang

The "max difference of decontaminated expressions"

Hi zijianni,

When I run spotclean, should I maximize the 'maxit' to make sure the "max difference of decontaminated expressions" of different tissue slides are less than 1? Or, I should set a fixed 'maxit' when I decontaminated different tissue slides?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.