Entering edit mode
16 months ago
bioinformatics
▴
40
Hello,
I am trying to perform scrna seq analysis in R using this workflow https://www.singlecellcourse.org/single-cell-rna-seq-analysis-using-seurat.html
I have tried to enter this code, however I do not have the file? Do you know what this file is or how I can create one?
doublets <- read.table("data/update/scrublet_calls.tsv",header = F,row.names = 1)
*Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'data/update/scrublet_calls.tsv': No such file or directory*
I think the purpose of this line of code is to add the doublet annotation generated by scrublet to the Seurat object metadata.
I used patient 1 data from this link: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM4952363
Kind regards,
google is your friend here.
Ok thank you. Is that link to the file used in this code?
Also how do I download this as tsv file?
Yes, you are right. This is a file where you have annotations about cells that are possibly singlets or doublets. You don't want to include doublets that will hamper downstream analysis.
You can run Scrublet on the raw count and the command is very simple. It is a Python-based tool.
There are other options for doublet detection, one of them is scDblFinder, an R-Bioconductor package.
Regards,
Nitin N.
Ok thanks. Does anyone know where I have gone wrong? My table does not show doublet scores.
Also, after quality control I only have 29 cells that passed and are considered good quality. Is it expected to have a higher count of cells that passed the quality control criteria?
table(srat[['QC']])
1I also ended up with this plot which I don't think is correct from the published paper. The clusters should be myeloid cells 1, myeloid cells 2, plasmocytes, osteoblastic OS cells, Osteoclasts, Endothelial cells, NK/T cells, CAFs, B cells. Do you know why the cell annotation is not working and do you think I should follow a different workflow?
Did you check whether the cell barcodes of your Seurat object are matching with the doublets?
Additionally, can you post the actual code you are using for this analysis, without looking at the code?
monaco.main <- SingleR(test = sce,assay.type.test = 1,ref = monaco.ref,labels = monaco.ref$label.main) monaco.fine <- SingleR(test = sce,assay.type.test = 1,ref = monaco.ref,labels = monaco.ref$label.fine)
Thanks.
About doublets, what is the output of the
table(rownames(doublets) %in% rownames(srat@meta.data))
command?About cell type annotation, I would suggest replicating the methods used in the original publication, parameters (number of PCs and resolution), and all. How did they annotate their clusters? Did they use the same reference & SingleR OR used custom markers?
All the best.
Regards,
Nitin N.
The paper used the SubsetData function in the Seurat package, and then the FindClusters function (resolution = 0.10) to analyse the different cell types.
There is a serious mismatch between the barcodes in your doublets and the Seurat object. you need to check that and correct one of them.
For the cell type annotation, if the methodology is not clear in the original publication, I would suggest going for Denovo annotation and reference-based. perform analysis at different PC and resolutions, perform DGE between the clusters, and use markers to define the population.
NOTE: Before subset clustering you need to know what you are subsetting and for that, you need to annotate superclusters.
All the best.
Regards,
Nitin N.