text: user2005: I have two scRNAseq datasets, and I select a cluster from one of them, and another cluster from the other. I want to find differentially expressed genes between the two clusters. What would be the right way of doing that? Right now I am using DESeq2 in the following way. I select only the selected clusters' cells, merge them together forming a matrix and then feed them into DESeq2:
  mtx <- merge(data_1,data_2,by="row.names",all=TRUE)
  mtx[is.na(mtx)] <- 0
  mtx_conv <- matrix(as.numeric(unlist(mtx[,2:ncol(mtx)])),nrow=nrow(mtx))
  mtx_int <- round(mtx_conv, 0)
  rownames(mtx_int) <- as.character(mtx$Row.names)
  
  cluster <- as.factor(c(rep(0, dim(data_1)[2]), rep(1, dim(data_2)[2])))
  colData <- data.frame(
    Cluster = cluster
  )
  
  dds <- DESeqDataSetFromMatrix(countData = mtx_int,
                            colData = colData,
                            design = ~ Cluster)
  dds <- DESeq(dds)
  
  I am not sure though that it is the correct way to go because I am not using the full original datasets. The reason is that I want the computations to run faster. Another way of doing that is probably combining the whole two datasets, defining 3 clusters: two groups I am interested in, and all other cells, and then running the analysis. Would it differ significantly? Am I on the right track at all?
  I have another idea: to use Seurat package. There, I would run CCA algorithm to align two full datasets, and then run FindMarkers function between the two clusters. I feel like it may be wrong, because the two datasets may need to be re-normalized together but Seurat does not seem to be doing that:
  https://satijalab.org/seurat/Seurat_AlignmentTutorial.html
  Any suggestions would be greatly appreciated.
  
  user181: I've been working with the multi-CCA alignment workflow in the Seurat package and am very impressed with functionality. As usual, the CCA tutorial is excellent for an alignment workflow and will get you off the ground quickly. You can even use the DESeq2 algorithm for determining differential expression from within Seurat.
  When you use the function RunCCA() you can pass rescale.groups=TRUE if you wish to re-scale.
  Abstracted workflow
  
  Data preprocessing and gene selection
  Define a shared correlation space with canonical correlation analysis
  Remove dataset specific cells
  Align correlated subspaces using dynamic time warping
  Integrated analysis across datasets (clustering, trajectory building, etc ...)
  
  
  Butler, A., and Satija, R. (2017). Integrated analysis of single cell transcriptomic data across conditions, technologies, and species.
  
original_text: 2005: <p>I have two <code>scRNAseq</code> datasets, and I select a cluster from one of them, and another cluster from the other. I want to find differentially expressed genes between the two clusters. What would be the right way of doing that? Right now I am using <code>DESeq2</code> in the following way. I select only the selected clusters' cells, merge them together forming a matrix and then feed them into <code>DESeq2</code>:</p>
  
  <pre><code>mtx &lt;- merge(data_1,data_2,by="row.names",all=TRUE)
  mtx[is.na(mtx)] &lt;- 0
  mtx_conv &lt;- matrix(as.numeric(unlist(mtx[,2:ncol(mtx)])),nrow=nrow(mtx))
  mtx_int &lt;- round(mtx_conv, 0)
  rownames(mtx_int) &lt;- as.character(mtx$Row.names)
  
  cluster &lt;- as.factor(c(rep(0, dim(data_1)[2]), rep(1, dim(data_2)[2])))
  colData &lt;- data.frame(
    Cluster = cluster
  )
  
  dds &lt;- DESeqDataSetFromMatrix(countData = mtx_int,
                            colData = colData,
                            design = ~ Cluster)
  dds &lt;- DESeq(dds)
  </code></pre>
  
  <p>I am not sure though that it is the correct way to go because I am not using the full original datasets. The reason is that I want the computations to run faster. Another way of doing that is probably combining the whole two datasets, defining 3 clusters: two groups I am interested in, and all other cells, and then running the analysis. Would it differ significantly? Am I on the right track at all?</p>
  
  <p>I have another idea: to use <code>Seurat</code> package. There, I would run <code>CCA</code> algorithm to align two full datasets, and then run <code>FindMarkers</code> function between the two clusters. I feel like it may be wrong, because the two datasets may need to be re-normalized together but Seurat does not seem to be doing that:</p>
  
  <p><a href="https://satijalab.org/seurat/Seurat_AlignmentTutorial.html" rel="nofollow noreferrer">https://satijalab.org/seurat/Seurat_AlignmentTutorial.html</a></p>
  
  <p>Any suggestions would be greatly appreciated.</p>
   181: <p>I've been working with the multi-CCA alignment workflow in the Seurat package and am very impressed with functionality. As usual, the CCA tutorial is excellent for an alignment workflow and will get you off the ground quickly. You can even use the DESeq2 algorithm for determining differential expression from within Seurat.</p>
  
  <p>When you use the function <code>RunCCA()</code> you can pass <code>rescale.groups=TRUE</code> if you wish to re-scale.</p>
  
  <p><strong>Abstracted workflow</strong></p>
  
  <ol>
  <li>Data preprocessing and gene selection</li>
  <li>Define a shared correlation space with canonical correlation analysis</li>
  <li>Remove dataset specific cells</li>
  <li>Align correlated subspaces using dynamic time warping</li>
  <li>Integrated analysis across datasets (clustering, trajectory building, etc ...)</li>
  </ol>
  
  <hr>
  
  <p>Butler, A., and Satija, R. (2017). Integrated analysis of single cell transcriptomic data across conditions, technologies, and species.</p>
  