almaan / her2st

Her2 Breast Cancer Project
56 stars 14 forks source link

Seurat object without image #6

Open martin284 opened 11 months ago

martin284 commented 11 months ago

Hi, I want to read your dataset into a Seurat object. So, I copied the code in your script "Seurat_analysis_HER2_BC_samples.Rmd" and just changed the paths. When I run InputFromTable I don't get any errors or warnings. However, the image file is missing from the resulting Seurat object.

This is my code: library(Seurat) library(openxlsx) library(STutility)

meta_data <- read.xlsx(paste0(dir,"clinical_data/10_HER2+_info.xlsx")) rownames(meta_data) <- meta_data$Sample samples <- list.files(pattern = ".tsv", path = paste0(dir,"ST-cnts/"), full.names = T) names(samples) <- substr(do.call(rbind, strsplit(samples, split = "/"))[,13], start = 1, stop = 2) imgs <- list.files(path = paste0(dir,"ST-imgs"), recursive = T, full.names = T, pattern = ".jpg") names(imgs) <- do.call(rbind, strsplit(imgs, split = "/"))[, 14] ids <- names(samples) infoTable <- data.frame(samples, imgs = imgs[ids], ids, patient_id = substr(x = ids, start = 1, stop = 1), stringsAsFactors = FALSE) infoTable$spotfiles <- list.files(path = paste0(dir,"ST-spotfiles"), full.names = T)[1:36]

G3.seurat <- InputFromTable( infotable = infoTable["G3",], minGenesPerSpot = 50, minSpotsPerGene = 300, platform = "1k")`

I have checked the paths in infoTable and everything looks fine. I have noticed that I am probably using a different version of STutility. However, I could not find out which version is used in your script.

So, I actually have two questions:

Many thanks, Martin