text: user12039: My data consists of two groups control and stim. I'm concerned that my clustering in the stim group is dominated by the unregulated genes. I can remove these genes and recluster but is there a way to then project the removed genes onto the new umap space so see if they are indeed all clustered together. They are no longer in the seurat object so I can't think of how to do this. I hope this makes sense.
  
  user73: Yes, this can be done, particularly if your concern is with the clustering / UMAP rather than the transformation process; I've done this recently with some Rhapsody single cell data that we generated. The main trick is adding 'return.only.var.genes = FALSE', as well as calculating a variable set that is a bit larger than the desired set. Depending on the number of cells, this will balloon the size of the resulting Seurat object pretty significantly.
  Note that UMAP is a technique to place cells, rather than genes. If you have the information on where the cells should go, then plotting gene expression on top of that via FeaturePlot should work without any reprojection needed.
  Here's what I did (with experiment-specific variables excluded):
  sct.data <- SCTransform(sct.data, vars.to.regress="percent.mt",
                          variable.features.n = 3000 + length(genesToExclude),
                          return.only.var.genes = FALSE);
  
  
  sct.data <- RunPCA(sct.data, verbose = TRUE,
                     features=setdiff(VariableFeatures(sct.data), genesToExclude));
  sct.data <- RunUMAP(sct.data);
  sct.data <- FindNeighbors(sct.data);
  sct.data <- FindClusters(sct.data);
  
  All transformed genes should be available for querying in the results.
  
original_text: 12039: <p>My data consists of two groups control and stim. I'm concerned that my clustering in the stim group is dominated by the unregulated genes. I can remove these genes and recluster but is there a way to then project the removed genes onto the new umap space so see if they are indeed all clustered together. They are no longer in the seurat object so I can't think of how to do this. I hope this makes sense.</p>
   73: <p>Yes, this can be done, particularly if your concern is with the clustering / UMAP rather than the transformation process; I've done this recently with some Rhapsody single cell data that we generated. The main trick is adding <em>'return.only.var.genes = FALSE'</em>, as well as calculating a variable set that is a bit larger than the desired set. Depending on the number of cells, this will balloon the size of the resulting Seurat object pretty significantly.</p>
  <p>Note that UMAP is a technique to place <em>cells</em>, rather than genes. If you have the information on where the cells should go, then plotting gene expression on top of that via FeaturePlot should work without any reprojection needed.</p>
  <p>Here's what I did (with experiment-specific variables excluded):</p>
  <pre><code>sct.data &lt;- SCTransform(sct.data, vars.to.regress=&quot;percent.mt&quot;,
                          variable.features.n = 3000 + length(genesToExclude),
                          return.only.var.genes = FALSE);
  
  
  sct.data &lt;- RunPCA(sct.data, verbose = TRUE,
                     features=setdiff(VariableFeatures(sct.data), genesToExclude));
  sct.data &lt;- RunUMAP(sct.data);
  sct.data &lt;- FindNeighbors(sct.data);
  sct.data &lt;- FindClusters(sct.data);
  </code></pre>
  <p>All transformed genes should be available for querying in the results.</p>
  