Answers.Body: <p>I just added URD clustering labels for each cel to seurat object and then I did DoHeatmap by using group.by="URD clustering labels"</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-30T11:18:34.387Z
Answers.LastActivityDate: 2018-09-30T11:18:34.387Z
Answers.UserDisplayName: Zizogolu
Body: <p>Seurat R package has some functions like <strong>FeaturePlot</strong>, <strong>DimPlot</strong> and <strong>DoHeatmap</strong> by which we can plot the expression of a list of genes on cell clusters. I am working with <strong>URD</strong> that likely does not have such options or I can not find that. URD has plotDot but would be clear only for a few number of genes (please look at the picture). Could somebody please help me in plotting the expression pattern of a list of genes in URD? As I am not good in R at all to write my own function or adopt Seurat functions to URD</p>
  
  <p><a href="https://i.sstatic.net/R7MRf.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/R7MRf.jpg" alt="enter image description here"></a></p>
  
  <p>For example Seurat DoHeatmap gives such a picture by which we can see these set of genes are being expressed on which group of cells</p>
  
  <pre><code>DoHeatmap(object ,genes.use=a vector of genes)
  </code></pre>
  
  <p><a href="https://i.sstatic.net/j0ACP.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/j0ACP.jpg" alt="enter image description here"></a></p>
  
  <p>Or we can plot a set of genes on seurat feature lot to they are being expressed more on which cluster</p>
  
  <pre><code>FeaturePlot(object = pbmc_small, features.plot = 'PC1')
  </code></pre>
  
  <p><a href="https://i.sstatic.net/jX0Ij.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jX0Ij.png" alt="enter image description here"></a></p>
  
  <p>In URD only by </p>
  
  <pre><code>plotDot(object.6s.mnn, genes = a vector of genes, clustering="Infomap-60")
  </code></pre>
  
  <p>We can plot a set of genes but as you are being in the first picture that would not be clear much</p>
  
  <p>My question is how I can plot a vector of genes on URD object</p>
  
  <p>for example Seurat DimPlot function can visualise the expression pattern of a group of genes on cell clusters but when I am trying to do the same with URD, returns this error</p>
  
  <pre><code>&gt; plotDim(axial.6somite, c("DDB_G0291149","DDB_G0291029"), plot.title="SHHA (Notochord marker)")
  Error in names(data) &lt;- cells.use : 
    invalid to use names()&lt;- on an S4 object of class 'dgCMatrix'
  In addition: Warning messages:
  1: In if (label.type == "meta" | (label.type == "search" &amp; label %in%  :
    the condition has length &gt; 1 and only the first element will be used
  2: In if (label.type == "group" | (label.type == "search" &amp; label %in%  :
    the condition has length &gt; 1 and only the first element will be used
  3: In if (label.type == "sig" | (label.type == "search" &amp; label %in%  :
    the condition has length &gt; 1 and only the first element will be used
  4: In if (label.type == "gene" | (label.type == "search" &amp; label %in%  :
    the condition has length &gt; 1 and only the first element will be used
  &gt; 
  &gt;
  </code></pre>
  
  <p>Actually only one gene can be visualised by this function on URD</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-28T08:26:54.427Z
Comments.Text: Which plot do you want? Could you post an example from the similar function from Seurat? You say you are not good at R, did you try learning with a bootcamp or with online books (such as [this one](http://r4ds.had.co.nz/)?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-28T09:33:08.607Z
Comments.Text: Please [edit] your question and give us a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve) that we can use on our machines to reproduce your code. Those users who can answer will need to have access to a test dataset they can use to test their answers. Not your entire data, just a small part of it, or a similar dataset that we can play with.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-28T09:50:13.633Z
Comments.Text: Sorry, I know something in R but not as good as to be able write a function in a deadline
Comments.UserDisplayName: Zizogolu
Tags: <r><scrnaseq><seurat>
Title: The visualisation of a list of genes on URD object
ThreadText: # The visualisation of a list of genes on URD object
  
  (Asked by: username_0 on 2018-09-27)
  
  Seurat R package has some functions like **FeaturePlot**, **DimPlot** and **DoHeatmap** by which we can plot the expression of a list of genes on cell clusters. I am working with **URD** that likely does not have such options or I can not find that. URD has plotDot but would be clear only for a few number of genes (please look at the picture). Could somebody please help me in plotting the expression pattern of a list of genes in URD? As I am not good in R at all to write my own function or adopt Seurat functions to URD
  
  [![enter image description here](https://i.sstatic.net/R7MRf.jpg)](https://i.sstatic.net/R7MRf.jpg)
  
  For example Seurat DoHeatmap gives such a picture by which we can see these set of genes are being expressed on which group of cells
  
  ```
  DoHeatmap(object ,genes.use=a vector of genes)
  
  ```
  
  [![enter image description here](https://i.sstatic.net/j0ACP.jpg)](https://i.sstatic.net/j0ACP.jpg)
  
  Or we can plot a set of genes on seurat feature lot to they are being expressed more on which cluster
  
  ```
  FeaturePlot(object = pbmc_small, features.plot = 'PC1')
  
  ```
  
  [![enter image description here](https://i.sstatic.net/jX0Ij.png)](https://i.sstatic.net/jX0Ij.png)
  
  In URD only by
  
  ```
  plotDot(object.6s.mnn, genes = a vector of genes, clustering="Infomap-60")
  
  ```
  
  We can plot a set of genes but as you are being in the first picture that would not be clear much
  
  My question is how I can plot a vector of genes on URD object
  
  for example Seurat DimPlot function can visualise the expression pattern of a group of genes on cell clusters but when I am trying to do the same with URD, returns this error
  
  ```
  > plotDim(axial.6somite, c("DDB_G0291149","DDB_G0291029"), plot.title="SHHA (Notochord marker)")
  Error in names(data) <- cells.use : 
    invalid to use names()<- on an S4 object of class 'dgCMatrix'
  In addition: Warning messages:
  1: In if (label.type == "meta" | (label.type == "search" & label %in%  :
    the condition has length > 1 and only the first element will be used
  2: In if (label.type == "group" | (label.type == "search" & label %in%  :
    the condition has length > 1 and only the first element will be used
  3: In if (label.type == "sig" | (label.type == "search" & label %in%  :
    the condition has length > 1 and only the first element will be used
  4: In if (label.type == "gene" | (label.type == "search" & label %in%  :
    the condition has length > 1 and only the first element will be used
  > 
  >
  
  ```
  
  Actually only one gene can be visualised by this function on URD
  
  **Tags:** r, scrnaseq, seurat
  
  > **Comments:**
  > **username_1**: Which plot do you want? Could you post an example from the similar function from Seurat? You say you are not good at R, did you try learning with a bootcamp or with online books (such as [this one](http://r4ds.had.co.nz/)?  
  > **username_2**: Please [edit] your question and give us a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve) that we can use on our machines to reproduce your code. Those users who can answer will need to have access to a test dataset they can use to test their answers. Not your entire data, just a small part of it, or a similar dataset that we can play with.  
  > **username_0**: Sorry, I know something in R but not as good as to be able write a function in a deadline  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-09-30. Score: 1 | Accepted answer
  
  I just added URD clustering labels for each cel to seurat object and then I did DoHeatmap by using group.by="URD clustering labels"
  
  
  ---
  
  