Closed saguilarfer closed 2 years ago
Dear Sergio,
You are correct that RCTD can be used to run on bulk samples. I have to publish the function to be able to do that -- let me get back to you in a little bit.
As far as the DE genes, yes it does seem like a bug that 0 genes were detected. For setting up the RCTD object, we have created a new version of RCTD that should resolve most of the issues. Can you please update to the newest version and try creating the SpatialRNA
and Reference
objects? In this new version, you do not need to load from files, but rather pass in matrices. The new constructor functions should be able to detect any discrepancies that would later cause errors in being unable to detect DE genes. Hope this helps.
Dylan
Closing this issue for now
@dmcable Hi! I'd like to re-open this issue as I'm having a similar problem in computing DE genes. So, I'm trying to run RCTD for a slide-seq dataset, using a scRNA-seq reference (a Zebrafish atlas:https://zebrahub.ds.czbiohub.org, specifically, 1dpf datsaet). However, I got the following error when I ran "myRCTD <- create.RCTD(puck, reference, max_cores = 10)" `Begin: process_cell_type_info process_cell_type_info: number of cells in reference: 12914 process_cell_type_info: number of genes in reference: 32060
blood island blood vasculature cardiac muscle cell
233 359 162
diencephalon endoderm epidermal cell
1173 210 431
fin floor plate neural tube gut
617 42 114
hatching gland cell head mesenchyme hematopoietic system
81 344 946
hindbrain lateral line ganglion midbrain hindbrain boundary
493 194 811
muscle pioneer myotome neural crest
572 771 279
neuron notochord optic cup
810 46 929
otic vesicle periderm pharyngeal arch 3-7
333 115 282
pigment cell primitive heart tube solid lens vesicle
87 381 91
somite spinal cord tail bud
806 439 213
telencephalon trigeminal ganglion
475 75
End: process_cell_type_info create.RCTD: getting regression differentially expressed genes: get_de_genes: blood island found DE genes: 0 get_de_genes: blood vasculature found DE genes: 0 get_de_genes: cardiac muscle cell found DE genes: 1 get_de_genes: diencephalon found DE genes: 0 get_de_genes: endoderm found DE genes: 0 get_de_genes: epidermal cell found DE genes: 0 get_de_genes: fin found DE genes: 0 get_de_genes: floor plate neural tube found DE genes: 0 get_de_genes: gut found DE genes: 0 get_de_genes: hatching gland cell found DE genes: 0 get_de_genes: head mesenchyme found DE genes: 0 get_de_genes: hematopoietic system found DE genes: 0 get_de_genes: hindbrain found DE genes: 0 get_de_genes: lateral line ganglion found DE genes: 1 get_de_genes: midbrain hindbrain boundary found DE genes: 0 get_de_genes: muscle pioneer found DE genes: 1 get_de_genes: myotome found DE genes: 0 get_de_genes: neural crest found DE genes: 0 get_de_genes: neuron found DE genes: 0 get_de_genes: notochord found DE genes: 0 get_de_genes: optic cup found DE genes: 0 get_de_genes: otic vesicle found DE genes: 0 get_de_genes: periderm found DE genes: 0 get_de_genes: pharyngeal arch 3-7 found DE genes: 0 get_de_genes: pigment cell found DE genes: 0 get_de_genes: primitive heart tube found DE genes: 0 get_de_genes: solid lens vesicle found DE genes: 0 get_de_genes: somite found DE genes: 0 get_de_genes: spinal cord found DE genes: 0 get_de_genes: tail bud found DE genes: 0 get_de_genes: telencephalon found DE genes: 0 get_de_genes: trigeminal ganglion found DE genes: 0 get_de_genes: total DE genes: 1 create.RCTD: getting platform effect normalization differentially expressed genes: get_de_genes: blood island found DE genes: 0 get_de_genes: blood vasculature found DE genes: 0 get_de_genes: cardiac muscle cell found DE genes: 1 get_de_genes: diencephalon found DE genes: 0 get_de_genes: endoderm found DE genes: 0 get_de_genes: epidermal cell found DE genes: 0 get_de_genes: fin found DE genes: 0 get_de_genes: floor plate neural tube found DE genes: 0 get_de_genes: gut found DE genes: 0 get_de_genes: hatching gland cell found DE genes: 0 get_de_genes: head mesenchyme found DE genes: 0 get_de_genes: hematopoietic system found DE genes: 0 get_de_genes: hindbrain found DE genes: 0 get_de_genes: lateral line ganglion found DE genes: 1 get_de_genes: midbrain hindbrain boundary found DE genes: 0 get_de_genes: muscle pioneer found DE genes: 1 get_de_genes: myotome found DE genes: 1 get_de_genes: neural crest found DE genes: 0 get_de_genes: neuron found DE genes: 0 get_de_genes: notochord found DE genes: 0 get_de_genes: optic cup found DE genes: 0 get_de_genes: otic vesicle found DE genes: 0 get_de_genes: periderm found DE genes: 0 get_de_genes: pharyngeal arch 3-7 found DE genes: 0 get_de_genes: pigment cell found DE genes: 0 get_de_genes: primitive heart tube found DE genes: 0 get_de_genes: solid lens vesicle found DE genes: 1 get_de_genes: somite found DE genes: 0 get_de_genes: spinal cord found DE genes: 0 get_de_genes: tail bud found DE genes: 0 get_de_genes: telencephalon found DE genes: 0 get_de_genes: trigeminal ganglion found DE genes: 0 get_de_genes: total DE genes: 1 Error in (function (cl, name, valueClass) : assignment of an object of class “numeric” is not valid for @‘counts’ in an object of class “SpatialRNA”; is(value, "dgCMatrix") is not TRUE`
I wonder whether it's because the cell-type annotation was too fine, such that the DE gene detection is not working, or if there's a bug/error in what I'm trying to do. Any help would be appreciated. Thanks!
Sure, please post / email me your objects.
@dmcable Hi! Thanks for your quick reply! I sent you the link to my datasets via your email, but I'm putting the link here for just in case. Thank you again for your help! link - https://drive.google.com/drive/folders/10x0OOkuW3duXNezt9IxABIy1CDSwf-4_?usp=sharing Note that the puck/reference folders have csv files exported from h5ad/anndata, and I attached a R markdown script I used to run RCTD. Please email me know if you have any questions! (yang-joon.kim@czbiohub.org)
Best, Yang-Joon
Hi, thanks, I receive your email and the dataset. I've added a new error message to this function so that next time it will catch and explain the error. In your case, this is caused by a mismatch (upper vs. lower case) of the gene names between Reference and SpatialRNA.
Best, Dylan
Dear RCTD developers,
I am currently trying to use your package to deconvolute bulk data from TCGA (mixtures) using a reference data obtained at https://www.biorxiv.org/content/10.1101/2020.10.26.354829v1).
Therefore, I have two initial objects: A. seurat_reference (seurat object with the reference count matrix and the cell types in the variable newcelltypes:
B. mixtures (count matrix of TCGA samples):
whose column names have been rename to: spot_1, spot_2... to facilitate the understanding.
1. I run RCTD_structure to obtain reference files:
2. I obtain the spatial files
3. I obtain puck and reference
4. I create RCTD
However here I obtain the following error:
Therefore, I am asking:
In case you need the data, I could send them if you provide me an e-mail address.
Thank you very much in advance,
Regards,
Sergio Aguilar.