Closed diegoalexespi closed 3 years ago
Apologies for the wait, @diegoalexespi. Thanks for bringing this issue to my attention. Unfortunately, there's no good catchall way to ensure flexmix returns two components for each dataset. miQC is designed to work on a variety of datasets, but one crucial assumption of miQC is that there's an inverse relationship between % mitochondrial reads and number of genes in the compromised cells. If that assumption isn't met, we'd suggest a different method of filtering, such as a simple mitochondrial % cutoff or filtering outliers based on median absolute deviation. In the example you posted, I'd say a basic cutoff of cells above say 15% would suffice.
Changes I've made to the package to reflect this:
fantastic, thank you so much! I will work on implementing this tool as a Seurat Wrapper soon; I will keep you posted
Hi, thanks for the great tool! I've ran into an issue when attempting to use this with some of my samples. There are cases were the flexmix model returns only one component rather than the specified two components. It seems to happen when the cells with the highest mitochondrial proportions also happen to be the cells with the lowest molecule counts. Reproducible example below.
I think this arises from the code snippet below: https://github.com/greenelab/miQC/blob/b13d62ee1f332c83694ddadf4edefb0a095453e5/R/plotModel.R#L55-L56
which is similar to this one as well: https://github.com/greenelab/miQC/blob/b13d62ee1f332c83694ddadf4edefb0a095453e5/R/filterCells.R#L53-L54
happy to provide more info!