diazlab / CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing
73 stars 28 forks source link

How to process the natural log values from Seurat into log2(CPM/10+1) #16

Closed biobug16 closed 4 years ago

biobug16 commented 4 years ago

Hi All and soerenmueller I want to use the read count matrix generated by Seurat which which is in natural log scale but don't know how to convert these to log2(CPM/10+1) for the downstream analysis by CONICSmat. If anybody who has already done this before and can share his/her experience.

Any help will be highly appreciated. Thanks

soerenmueller commented 4 years ago

Hi,

the easiest way to get from Seurat to a log2CPM matrix is as follows:

mat=seu@assays$RNA@counts log2mat=CONICSmat::normMat(mat)

This assumes your Seurat object (seu) is processed with Seurat V3. Hope this helps.

biobug16 commented 4 years ago

Hi soerenmueller Thank you for your kind reply but I got an error with your second line of code and that's Error in t.default(expmat) : argument is not a matrix Can you please give it a look. Thanks

biobug16 commented 4 years ago

Oh ok I guess it was just the mat<-as.matrix(mat) which was missing. Its working fine now. Thanks again for this wonderful tool and your help.