yanwu2014 / swne

Similarity Weighted Nonnegative Embedding (SWNE), a method for visualizing high dimensional datasets
BSD 3-Clause "New" or "Revised" License
104 stars 20 forks source link

mitochondrial/UMI regression #3

Closed dylanmr closed 6 years ago

dylanmr commented 6 years ago

Hi!

This is a really great tool you have developed. I was wondering is there any way built into the package to regress out the variation in mitochondrial content or number of UMI? I know this is possible in the Seurat pipeline, but it appears you recommend to begin the swne pipeline with the raw seurat matrix.

Would I be able to use my scaled and regressed data matrix from the seurat object as long as I do not center it with a mean of 0?

Best, Dylan

yanwu2014 commented 6 years ago

Hi,

Thanks! So you can use the scale.data slot from a Seurat object as long as you make sure it's nonnegative. The regression model will almost always result in negative values, even if you don't center the data. We just added a function ExtractNormCounts to do this (just set obj.type = seurat and rescale = F), but you can also do it yourself by using min/max scaling, or whatever type of scaling you prefer.

Let me know if that helps! Yan