kharchenkolab / Baysor

Bayesian Segmentation of Spatial Transcriptomics Data
https://kharchenkolab.github.io/Baysor/
MIT License
155 stars 31 forks source link

Issues with running the STARmap example #99

Open HongBei-SS opened 1 year ago

HongBei-SS commented 1 year ago

Hi, when I run the STARmap example, the following problem occurs

baysor preview -x 'x' -y 'y' -g 'gene' -c configs/starmap.toml -o output_dapi molecules.csv [19:16:50] Info: (2023-09-13) Run Baysor v0.6.2 [19:16:50] Info: Loading data... [19:16:52] Info: Loaded 949459 transcripts [19:16:53] Info: Estimating noise level [19:17:15] Info: Done [19:17:15] Info: Estimating local colors [19:17:47] Warning: n=10000, which is > length(high_conf_ids) (0) └ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/initialization.jl:180 ERROR: ArgumentError: size(X, 2) must be greater than n_neighbors and nneighbors must be greater than 0 Stacktrace: [1] UMAP.UMAP(X::Matrix{Float32}, n_components::Int64; n_neighbors::Int64, metric::Distances.Euclidean, n_epochs::Int64, learning_rate::Int64, init::Symbol, min_dist::Float64, spread::Float64, set_operation_ratio::Int64, local_connectivity::Int64, repulsion_strength::Int64, neg_sample_rate::Int64, a::Nothing, b::Nothing) @ UMAP /home/viktorpetukhov/.julia/packages/UMAP/oqkOM/src/umap.jl:94 [2] UMAP_ @ /home/viktorpetukhov/.julia/packages/UMAP/oqkOM/src/umap.jl:77 [inlined] [3] #umap#7 @ /home/viktorpetukhov/.julia/packages/UMAP/oqkOM/src/umap.jl:45 [inlined] [4] umap @ /home/viktorpetukhov/.julia/packages/UMAP/oqkOM/src/umap.jl:43 [inlined] [5] fit(::Type{Baysor.Processing.UmapFit}, x::Matrix{Float32}; n_components::Int64, nn_interpolate::Int64, spread::Float64, min_dist::Float64, metric::Distances.Euclidean, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/umap_wrappers.jl:22 [6] fit @ /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/umap_wrappers.jl:17 [inlined] [7] gene_composition_color_embedding(pca::Matrix{Float32}, confidence::Vector{Float64}; normalize::Bool, sample_size::Int64, seed::Int64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/neighborhood_composition.jl:128 [8] gene_composition_color_embedding(pca::Matrix{Float32}, confidence::Vector{Float64}) @ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/neighborhood_composition.jl:116 [9] gene_composition_colors(df_spatial::DataFrames.DataFrame, k::Int64; method::Symbol, n_pcs::Int64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/neighborhood_composition.jl:165 [10] gene_composition_colors(df_spatial::DataFrames.DataFrame, k::Int64) @ Baysor.Processing /home/viktor_petukhov/.julia/dev/Baysor/src/processing/data_processing/neighborhood_composition.jl:160 [11] preview(coordinates::String; config::Baysor.Utils.RunOptions, x_column::String, y_column::String, z_column::String, gene_column::String, min_molecules_per_cell::Int64, output::String) @ Baysor.CommandLine /home/viktor_petukhov/.julia/dev/Baysor/src/cli/preview.jl:63 [12] command_main(ARGS::Vector{String}) @ Baysor.CommandLine /home/viktor_petukhov/.julia/packages/Comonicon/HDhA6/src/codegen/julia.jl:343 [13] command_main @ /home/viktor_petukhov/.julia/packages/Comonicon/HDhA6/src/codegen/julia.jl:90 [inlined] [14] julia_main() @ Baysor.CommandLine /home/viktor_petukhov/.julia/packages/Comonicon/HDhA6/src/frontend/cast.jl:481 [15] julia_main(; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Baysor /home/viktor_petukhov/.julia/dev/Baysor/src/Baysor.jl:42 [16] julia_main() @ Baysor /home/viktor_petukhov/.julia/dev/Baysor/src/Baysor.jl:42 [17] top-level scope @ none:1

VPetukhov commented 2 months ago

Looks like a duplicate of https://github.com/kharchenkolab/Baysor/issues/90.