Closed SiyuanHuang1 closed 2 years ago
Hi,
I believe that you meant to use check_spe()
not the one that ends in sce.
Best, Leo
No, maybe my code confused you. I re-show it:
> load("D:/hsy/project/ST/data/DLPFC/Human_DLPFC_Visium_processedData_sce_scran_spatialLIBD.Rdata")
> check_sce(sce)
Error in check_sce(sce) :
Not all of all(c("imagerow", "imagecol", "sample_name", "key", variables) %in% .... are TRUE
> spe <- sce_to_spe(sce)
Error in check_sce(sce) :
Not all of all(c("imagerow", "imagecol", "sample_name", "key", variables) %in% .... are TRUE
The reason is that there is not ManualAnnotation
&spatialLIBD
in Human_DLPFC_Visium_processedData_sce_scran_spatialLIBD.Rdata
Hi @SiyuanHuang1 ,
I tried reproducing your error and couldn't initially:
master > sce <- fetch_data("sce")
snapshotDate(): 2022-03-01
2022-03-04 19:00:27 loading file /Users/leocollado/Library/Caches/org.R-project.R/R/BiocFileCache/3ae9464272d_Human_DLPFC_Visium_processedData_sce_scran_spatialLIBD.Rdata%3Fdl%3D1
master > check_sce(sce)
class: SingleCellExperiment
dim: 33538 47681
metadata(1): image
assays(2): counts logcounts
rownames(33538): ENSG00000243485 ENSG00000237613 ...
ENSG00000277475 ENSG00000268674
rowData names(9): source type ... gene_search is_top_hvg
colnames(47681): AAACAACGAATAGTTC-1 AAACAAGTATCTCCCA-1 ...
TTGTTTCCATACAACT-1 TTGTTTGTGTAAATTC-1
colData names(74): barcode sample_name ... spatialLIBD
ManualAnnotation
reducedDimNames(6): PCA TSNE_perplexity50 ...
TSNE_perplexity80 UMAP_neighbors15
mainExpName: NULL
altExpNames(0):
However, I was forgetting about https://github.com/LieberInstitute/spatialLIBD/blob/master/R/fetch_data.R#L150 which is defined at https://github.com/LieberInstitute/spatialLIBD/blob/master/R/fetch_data.R#L161-L170. So in your case you would need to do this:
library("spatialLIBD")
load("Human_DLPFC_Visium_processedData_sce_scran_spatialLIBD.Rdata", verbose = TRUE)
## You could use the same name, but I'm using different ones here for clarity
updated_sce <- spatialLIBD:::.update_sce(sce)
## Note the ::: and not the :: in the line above, that's because .update_sce() is a non-exported function in spatialLIBD
check_sce(updated_sce)
## Continue along ^^
Have a good weekend!
Best, Leo
I got it! Thank u for your advice
Hi, I followed the steps, but I still encountered an error in the final step. What should I do to resolve it? library("spatialLIBD") load("Human_DLPFC_Visium_processedData_sce_scran_spatialLIBD.Rdata", verbose = TRUE)
updated_sce <- spatialLIBD:::.update_sce(sce)
check_sce(updated_sce)
@FAFUshiyan it doesn't seem like you are using https://research.libd.org/spatialLIBD/reference/sce_to_spe.html.
Also, I didn't notice your message before since you didn't open a new issue.
As you said before (#35), I downloaded the three files manually: modeling_results, sce, sce_layer. But when I tried to convert sce to spe object, error happened. I used check_sce(), there was the same message.
Code
error information
I found this was because the downloaded sce object didn't include the
ManualAnnotation
andspatialLIBD
columnsSo the
ManualAnnotation
andspatialLIBD
are important? could you provide them as.Rdata
for us? or should I delete these terms incheck_sce()
code for smooth running?R session information