-
Notifications
You must be signed in to change notification settings - Fork 25
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
function plotSpatialScatterpie with image=TRUE does not work #86
Comments
Could you perhaps post |
Hi, this is the class and content of imgData
|
Hm, I can't see intuitively what's going wrong. Could you try
|
I got the same error, it looks like the error of the function plotImage(), it works after add return(plt) to the function
|
sample is seurat object, My code: img = Seurat::Images(sample)[1], and then get error: |
plotSpatialScatterpie( The resulting graph only shows the tissue original I passed along without the pie chart |
my code:
Error:
Error in plotImage(x = img): is.matrix(x) | is.character(x) | is.array(x) | is(x, "rastergrob") | .... is not TRUE
Traceback:
. cell_types = colnames(deconvolution_matrix), img = TRUE,
. scatterpie_alpha = 1)
. "rastergrob") | is(x, "Seurat") | is(x, "SpatialExperiment"),
. is.null(slice) | is.character(slice))
str(spatial_data)
:Formal class 'SpatialExperiment' [package "SpatialExperiment"] with 9 slots
..@ int_elementMetadata:Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. ..@ rownames : NULL
.. .. ..@ nrows : int 16687
.. .. ..@ elementType : chr "ANY"
.. .. ..@ elementMetadata: NULL
.. .. ..@ metadata : list()
.. .. ..@ listData :List of 1
.. .. .. ..$ rowPairs:Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. .. ..@ rownames : NULL
.. .. .. .. .. ..@ nrows : int 16687
.. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. ..@ metadata : list()
.. .. .. .. .. ..@ listData : Named list()
..@ int_colData :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. ..@ rownames : NULL
.. .. ..@ nrows : int 1438
.. .. ..@ elementType : chr "ANY"
.. .. ..@ elementMetadata: NULL
.. .. ..@ metadata : list()
.. .. ..@ listData :List of 4
.. .. .. ..$ reducedDims :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. .. ..@ rownames : NULL
.. .. .. .. .. ..@ nrows : int 1438
.. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. ..@ metadata : list()
.. .. .. .. .. ..@ listData : Named list()
.. .. .. ..$ altExps :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. .. ..@ rownames : NULL
.. .. .. .. .. ..@ nrows : int 1438
.. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. ..@ metadata : list()
.. .. .. .. .. ..@ listData : Named list()
.. .. .. ..$ colPairs :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. .. ..@ rownames : NULL
.. .. .. .. .. ..@ nrows : int 1438
.. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. ..@ metadata : list()
.. .. .. .. .. ..@ listData : Named list()
.. .. .. ..$ spatialCoords: int [1:1438, 1:2] 4116 6932 6669 5279 6037 5839 4938 5009 5504 7698 ...
.. .. .. .. ..- attr(, "dimnames")=List of 2
.. .. .. .. .. ..$ : chr [1:1438] "AAACCGTTCGTCCAGG-1" "AAACCTAAGCAGCCGG-1" "AAACGAGACGGTTGAT-1" "AAACGGTTGCGAACTG-1" ...
.. .. .. .. .. ..$ : chr [1:2] "pxl_col_in_fullres" "pxl_row_in_fullres"
..@ int_metadata :List of 3
.. ..$ version :Classes 'package_version', 'numeric_version' hidden list of 1
.. .. ..$ : int [1:3] 1 20 0
.. ..$ spatialDataNames: chr(0)
.. ..$ imgData :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. ..@ rownames : NULL
.. .. .. ..@ nrows : int 1
.. .. .. ..@ elementType : chr "ANY"
.. .. .. ..@ elementMetadata: NULL
.. .. .. ..@ metadata : list()
.. .. .. ..@ listData :List of 4
.. .. .. .. ..$ sample_id : chr "10X_Mouse_Kidney"
.. .. .. .. ..$ image_id : chr "hires"
.. .. .. .. ..$ data :List of 1
.. .. .. .. .. ..$ :Formal class 'StoredSpatialImage' [package "SpatialExperiment"] with 1 slot
.. .. .. .. .. .. .. ..@ path: chr "/home/ub-sonvo-25d094476064960/spatial/SPOTlight/data/SPOTlight/sample/outs/spatial/tissue_hires_image.png"
.. .. .. .. ..$ scaleFactor: num 0.177
..@ rowRanges :Formal class 'CompressedGRangesList' [package "GenomicRanges"] with 5 slots
.. .. ..@ unlistData :Formal class 'GRanges' [package "GenomicRanges"] with 7 slots
.. .. .. .. ..@ seqnames :Formal class 'Rle' [package "S4Vectors"] with 4 slots
.. .. .. .. .. .. ..@ values : Factor w/ 0 levels:
.. .. .. .. .. .. ..@ lengths : int(0)
.. .. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. .. ..@ metadata : list()
.. .. .. .. ..@ ranges :Formal class 'IRanges' [package "IRanges"] with 6 slots
.. .. .. .. .. .. ..@ start : int(0)
.. .. .. .. .. .. ..@ width : int(0)
.. .. .. .. .. .. ..@ NAMES : NULL
.. .. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. .. ..@ metadata : list()
.. .. .. .. ..@ strand :Formal class 'Rle' [package "S4Vectors"] with 4 slots
.. .. .. .. .. .. ..@ values : Factor w/ 3 levels "+","-","":
.. .. .. .. .. .. ..@ lengths : int(0)
.. .. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. .. ..@ metadata : list()
.. .. .. .. ..@ seqinfo :Formal class 'Seqinfo' [package "GenomeInfoDb"] with 4 slots
.. .. .. .. .. .. ..@ seqnames : chr(0)
.. .. .. .. .. .. ..@ seqlengths : int(0)
.. .. .. .. .. .. ..@ is_circular: logi(0)
.. .. .. .. .. .. ..@ genome : chr(0)
.. .. .. .. ..@ elementMetadata:Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. .. .. ..@ rownames : NULL
.. .. .. .. .. .. ..@ nrows : int 0
.. .. .. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. .. .. ..@ metadata : list()
.. .. .. .. .. .. ..@ listData : Named list()
.. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. ..@ metadata : list()
.. .. ..@ elementMetadata:Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. .. .. ..@ rownames : NULL
.. .. .. .. ..@ nrows : int 16687
.. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. ..@ metadata : list()
.. .. .. .. ..@ listData :List of 1
.. .. .. .. .. ..$ symbol: chr [1:16687] "0610005C13Rik" "0610009B22Rik" "0610009L18Rik" "0610010K14Rik" ...
.. .. ..@ elementType : chr "GRanges"
.. .. ..@ metadata : list()
.. .. ..@ partitioning :Formal class 'PartitioningByEnd' [package "IRanges"] with 5 slots
.. .. .. .. ..@ end : int [1:16687] 0 0 0 0 0 0 0 0 0 0 ...
.. .. .. .. ..@ NAMES : chr [1:16687] "0610005C13RIK" "0610009B22RIK" "0610009L18RIK" "0610010K14RIK" ...
.. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. ..@ metadata : list()
..@ colData :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. ..@ rownames : chr [1:1438] "AAACCGTTCGTCCAGG-1" "AAACCTAAGCAGCCGG-1" "AAACGAGACGGTTGAT-1" "AAACGGTTGCGAACTG-1" ...
.. .. ..@ nrows : int 1438
.. .. ..@ elementType : chr "ANY"
.. .. ..@ elementMetadata: NULL
.. .. ..@ metadata : list()
.. .. ..@ listData :List of 4
.. .. .. ..$ in_tissue: logi [1:1438] TRUE TRUE TRUE TRUE TRUE TRUE ...
.. .. .. ..$ array_row: int [1:1438] 52 65 35 67 66 45 62 55 24 44 ...
.. .. .. ..$ array_col: int [1:1438] 42 83 79 59 70 67 54 55 62 94 ...
.. .. .. ..$ sample_id: chr [1:1438] "10X_Mouse_Kidney" "10X_Mouse_Kidney" "10X_Mouse_Kidney" "10X_Mouse_Kidney" ...
..@ assays :Formal class 'SimpleAssays' [package "SummarizedExperiment"] with 1 slot
.. .. ..@ data:Formal class 'SimpleList' [package "S4Vectors"] with 4 slots
.. .. .. .. ..@ listData :List of 1
.. .. .. .. .. ..$ counts:Formal class 'DelayedMatrix' [package "DelayedArray"] with 1 slot
.. .. .. .. .. .. .. ..@ seed:Formal class 'DelayedSubset' [package "DelayedArray"] with 2 slots
.. .. .. .. .. .. .. .. .. ..@ index:List of 2
.. .. .. .. .. .. .. .. .. .. ..$ : int [1:16687] 12222 19113 20672 19512 26587 10210 5568 14571 3888 9179 ...
.. .. .. .. .. .. .. .. .. .. ..$ : NULL
.. .. .. .. .. .. .. .. .. ..@ seed :Formal class 'TENxMatrixSeed' [package "HDF5Array"] with 6 slots
.. .. .. .. .. .. .. .. .. .. .. ..@ filepath : chr "/home/ub-sonvo-25d094476064960/spatial/SPOTlight/data/SPOTlight/sample/outs/filtered_feature_bc_matrix.h5"
.. .. .. .. .. .. .. .. .. .. .. ..@ group : chr "/matrix"
.. .. .. .. .. .. .. .. .. .. .. ..@ subdata : NULL
.. .. .. .. .. .. .. .. .. .. .. ..@ dim : int [1:2] 32285 1438
.. .. .. .. .. .. .. .. .. .. .. ..@ indptr_ranges:'data.frame': 1438 obs. of 2 variables:
.. .. .. .. .. .. .. .. .. .. .. .. ..$ start: num [1:1438] 1 5000 11093 19145 25487 ...
.. .. .. .. .. .. .. .. .. .. .. .. ..$ width: int [1:1438] 4999 6093 8052 6342 7964 7517 7710 8754 6924 3921 ...
.. .. .. .. .. .. .. .. .. .. .. ..@ dimnames :List of 2
.. .. .. .. .. .. .. .. .. .. .. .. ..$ : chr [1:32285] "XKR4" "GM1992" "GM19938" "GM37381" ...
.. .. .. .. .. .. .. .. .. .. .. .. ..$ : chr [1:1438] "AAACCGTTCGTCCAGG-1" "AAACCTAAGCAGCCGG-1" "AAACGAGACGGTTGAT-1" "AAACGGTTGCGAACTG-1" ...
.. .. .. .. ..@ elementType : chr "ANY"
.. .. .. .. ..@ elementMetadata: NULL
.. .. .. .. ..@ metadata : list()
..@ NAMES : NULL
..@ elementMetadata :Formal class 'DFrame' [package "S4Vectors"] with 6 slots
.. .. ..@ rownames : NULL
.. .. ..@ nrows : int 16687
.. .. ..@ elementType : chr "ANY"
.. .. ..@ elementMetadata: NULL
.. .. ..@ metadata : list()
.. .. ..@ listData : Named list()
..@ metadata : list()
The text was updated successfully, but these errors were encountered: