Closed h1hui closed 2 years ago
Hey, we really need a copy of the dataset that gives the error before we can figure out what has gone wrong. How have you generated your ctd? Did you use the current version of EWCE (1.5.1+)? Perhaps you should rerun the EWCE function to generate the ctd on your raw data and check if that worked? Try comparing it to the example ctd in EWCE:
ctd_ <- ewceData::ctd()
ctd_
At a glance it appears different e.g. yours is missing the median_exp and median_speciicity matrices and your cell types are factors not characters:
I converted my Seurat object into sce, and then generated celltype data. Here is the code:
sce <- as.SingleCellExperiment(Nuclei)
# drop genes
nKeep = 8000
must_keep = genes
keep_genes = c(must_keep,sample(names(rowRanges(sce)),7955))
sce = sce[keep_genes,]
# calculate specificity matrices
exp_DROPPED <- drop_uninformative_genes(exp=sce,
drop_nonhuman_genes = T,
input_species = "human",
level2annot=sce$celltype)
# generate CellTypeDataset
annotLevels = list(level1class=sce$celltype,
level2class=sce$type)
fNames <- generate_celltype_data(exp=exp_DROPPED,
annotLevels=annotLevels,
groupName="Nuclei",
savePath=tempdir())
I skipped fix bad genes and normalization, since they also produce error. But I did run drop genes. If there's anything wrong with what I did, please let me know.
Hey!
Again, we can't really help unless we have a copy of you 'Nuclei' dataset. It clearly has some differences to what EWCE is used to since you got errors after converting to SCE. One piece of advice is to have a look at this example SCE dataset and compare it to your 'Nuclei' dataset after you convert to sce, this code:
# Make SCE object
cortex_mrna <- ewceData::[cortex_mrna](https://rdrr.io/pkg/ewceData/man/cortex_mrna.html)()
cortex_mrna_sce <- scKirby::ingest_data(cortex_mrna, save_output = FALSE)
Also try using scKirby to convert to SCE, it can deal with a lot of dataset types and so is very robust and may work for you.
Also see the website section on creating a ctd for information on this.
I'm going to close this issue for now but if these suggestions don't work and you can provide the full dataset or a subset which gives the same error, feel free to open it again.
Thanks
1. Bug description
When I ran generate_bootstrap_plots on my dataset it caused an error.
Console output
Expected behaviour
All the previous steps ran through without a problem, I expect this should make a plot.
2. Reproducible example
Code
Data
I included with a screenshot of how my dataset looks like, since I don't know how to subset my dataset and provide here. Hope this helps.
3. Session info