satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.29k stars 914 forks source link

change all Chr to chr in Seurat object #6491

Closed thugib closed 2 years ago

thugib commented 2 years ago

Many months ago I completed a Seurat analysis for scRNA-seq, and recently I just completed Signac analysis for ATAC-seq on the same tissue, and now I would like to integrate the two datasets.

However, when performing RNA-Seq analysis I used a genome and gtf file that represented chromosomes with the first letter uppercase, e.g. 'Chr1'. Later, when I did the ATAC-seq analysis I had to use a genome and gtf file where chromosomes are represented all in lower case, e.g. 'chr'.

Is there any way I can go through the Seurat object from the scRNA-seq analysis and change all the 'Chr' to 'chr', so that I would be able to integrate Seurat object with the Signac ATAC-Seq analysis ?

I have a basic idea of how this would be done. First pull out the part of the object in which the 'Chr' is found, then change that list or whatever it may be with a regular exrpression and put it back in the object. However, I am not sure as to where in the object the relevant data is, how to pull it out and put it back in again.

thugib commented 2 years ago

Changing Chr1, Chr2, etc. to lowercase is not necessary. Can still do the integration of the two datasets,https://satijalab.org/seurat/articles/atacseq_integration_vignette.html, without making this change.