Answers.Body: <p>The counts stored in the Seurat object are: raw counts (seuratobject@raw.data), the log + normalized counts (seuratobject@data), and the scaled counts (seuratobject@scale.data). <code>FeaturePlot()</code> plots the log + normalized counts.</p>
  
  <p>In order to identify double-positive cells, you need to identify cells that express a gene (i.e. positive for a gene) and that is not trivial: you need a <a href="https://bioinformatics.stackexchange.com/questions/687/what-methods-are-available-to-find-a-cutoff-value-for-non-expressed-genes-in-rna">cutoff value</a> for each gene, and also to <a href="https://bioinformatics.stackexchange.com/questions/693/how-can-we-distinguish-between-true-zero-and-dropout-zero-counts-in-single-cell">distinguish between true and dropout zero counts</a>.</p>
  
  <p>Provided you solve these, you can retrieve your cells by:</p>
  
  <pre><code>MYH11.cutoff &lt;- 1
  ACTA2.cutoff &lt;- 1
  length(which(FetchData(seuratobject, vars.all='MYH11') &gt; MYH11.cutoff))
  length(which(FetchData(seuratobject, vars.all='ACTA2') &gt; ACTA2.cutoff))
  length(which(FetchData(seuratobject, vars.all='MYH11') &gt; MYH11.cutoff &amp; FetchData(seuratobject, vars.all='ACTA2') &gt; ACTA2.cutoff))
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T14:01:04.020Z
Answers.Text: you can substitute the `length(which(` by just using `sum`: TRUE is evaluated as 1 and then you end up with the same result (but a bit faster).
Answers.UserDisplayName: llrs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-23T20:23:36.033Z
Answers.Text: Sorry   what  would be the code if   we have    3 clusters of  cells and we we want to show the cluster in which the ratio of gene named DDB_G0267412 is two times higher than DDB_G0277853?
Answers.UserDisplayName: Zizogolu
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T10:02:37.080Z
Answers.LastActivityDate: 2018-06-20T10:02:37.080Z
Answers.UserDisplayName: Peter
Body: <p>I'm interested in looking into cells that are positive for two (or in some cases more) genes. I know I have some double positive just by looking at the FeaturePlot of those genes, but now I'm trying to figure it out how many are double positive and further percentage wise. Example:</p>
  
  <p>50 cells are positive for Myh11<br>
  100 cells are positive for Acta2<br>
  30 cells are double positive<br>
  60% of Myh11+ cells are Acta2+<br>
  30% of Acta2+ cells are Myh11+  </p>
  
  <p>Is the data used to generated the FeaturePlot the scale.data? If so, I could just make a new dataset out of that, but I'm not sure if that is the case.</p>
  
Tags: <r><scrnaseq><seurat>
Title: Is it possible to identify cells that are expressing two or more genes in Seurat?
ThreadText: # Is it possible to identify cells that are expressing two or more genes in Seurat?
  
  (Asked by: username_0 on 2018-06-18)
  
  I'm interested in looking into cells that are positive for two (or in some cases more) genes. I know I have some double positive just by looking at the FeaturePlot of those genes, but now I'm trying to figure it out how many are double positive and further percentage wise. Example:
  
  50 cells are positive for Myh11  
  100 cells are positive for Acta2  
  30 cells are double positive  
  60% of Myh11+ cells are Acta2+  
  30% of Acta2+ cells are Myh11+
  
  Is the data used to generated the FeaturePlot the scale.data? If so, I could just make a new dataset out of that, but I'm not sure if that is the case.
  
  **Tags:** r, scrnaseq, seurat
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-20. Score: 4
  
  The counts stored in the Seurat object are: raw counts (seuratobject@raw.data), the log + normalized counts (seuratobject@data), and the scaled counts (seuratobject@scale.data). `FeaturePlot()` plots the log + normalized counts.
  
  In order to identify double-positive cells, you need to identify cells that express a gene (i.e. positive for a gene) and that is not trivial: you need a [cutoff value](https://bioinformatics.stackexchange.com/questions/687/what-methods-are-available-to-find-a-cutoff-value-for-non-expressed-genes-in-rna) for each gene, and also to [distinguish between true and dropout zero counts](https://bioinformatics.stackexchange.com/questions/693/how-can-we-distinguish-between-true-zero-and-dropout-zero-counts-in-single-cell).
  
  Provided you solve these, you can retrieve your cells by:
  
  ```
  MYH11.cutoff <- 1
  ACTA2.cutoff <- 1
  length(which(FetchData(seuratobject, vars.all='MYH11') > MYH11.cutoff))
  length(which(FetchData(seuratobject, vars.all='ACTA2') > ACTA2.cutoff))
  length(which(FetchData(seuratobject, vars.all='MYH11') > MYH11.cutoff & FetchData(seuratobject, vars.all='ACTA2') > ACTA2.cutoff))
  
  ```
  
  > **Comments:**
  > **username_2**: you can substitute the `length(which(` by just using `sum`: TRUE is evaluated as 1 and then you end up with the same result (but a bit faster).  
  > **username_3**: Sorry   what  would be the code if   we have    3 clusters of  cells and we we want to show the cluster in which the ratio of gene named DDB_G0267412 is two times higher than DDB_G0277853?  
  
  ---
  
  