BPCells icon indicating copy to clipboard operation
BPCells copied to clipboard

Error: basic_ios::clear: iostream error

Open nashchem opened this issue 8 months ago • 1 comments

Hi Team, I have been trying to use BPCells package to process the data with 870k cells. I just followed the Seurat's tutorial and everything works fine as expected. After integration, clustering, trying to find cluster markers using, cluster_markers_harmony_integrated <- FindAllMarkers(seurat_obj_filtered_harmony_integrated) or bp_markers <- BPCells::marker_features(seurat_obj_filtered_harmony_integrated$RNA$data, Idents(seurat_obj_filtered_harmony_integrated))

Both results in the same error, Error: basic_ios::clear: iostream error

Does anyone had this issue, what are other options?

Thank you.

nashchem avatar May 06 '25 03:05 nashchem

Hi @nashchem, sorry for the slow response here. Would you be able to provide more background on exactly what you ran to prep the seurat object you used? Just the error message and last function call aren't enough to know what has gone wrong -- it presumably has something to do with the earlier processing steps you used.

Ideally, would you be able to provide a reproducible example that hits this problem? I've tried making a little demo below using Seurat's ifnb dataset, but I don't get any errors. Would you be able to adjust the code to make it re-create your problem?

library(Seurat)
library(SeuratData)
library(BPCells)

InstallData("ifnb")

# load dataset
ifnb <- LoadData("ifnb")

# Create a BPCells version of the input data
ifnb[["RNA"]]$counts <- write_matrix_dir(ifnb[["RNA"]]$counts, tempfile("bpcells_counts"))
ifnb <- NormalizeData(ifnb)
Idents(ifnb) <- ifnb$seurat_annotations

# Run FindAllMarkers
markers <- FindAllMarkers(ifnb)

bnprks avatar May 22 '25 21:05 bnprks