plotGeneExpression,scRNAseq-method {conclus} | R Documentation

## plotGeneExpression

### Description

The function saves a t-SNE plot colored by expression of a given gene.

### Usage

    plotGeneExpression(theObject, geneName,
    palette=c("grey","red", "#7a0f09", "black"), returnPlot=FALSE,
                tSNEpicture=1, savePlot=FALSE, alpha=1, limits=NA,
                pointSize=1, width=6, height=5, plotPDF=TRUE, silentPlot=FALSE)

### Arguments

`theObject` | A scRNAseq object with the top markers retrieved. See ?retrieveTopClustersMarkers.
`geneName` | Name of the gene to highlight on the t-SNE plot.
`palette` | Color palette for the expression levels.
`returnPlot` | If TRUE, returns a ggplot object of the tSNE. Default = FALSE.
`tSNEpicture` | Number of the tSNE picture that you want to use for plotting the gene expression. Default = 1.
`savePlot` | If TRUE, save the tSNE in pdf or png format. Default=FALSE.
`alpha` | Opacity of the points of the plot. Default = 1.
`limits` | Range of the gene expression shown in the legend. Default = NA. See details.
`pointSize` | Size of the points on the tSNE. Default = 1.
`width` | Width of the plot. Default = 6.
`height` | Height of the plot. Default = 5.
`plotPDF` | If TRUE export tSNE in pdf format, if FALSE export it in png format. Default=TRUE.
`silentPlot` | If TRUE, the plots are not displayed on the current device. Default=FALSE. This is useful if one wants to only retrieve the object to insert the figure in a grid for instance.

### Details

limits – This option allows generating t-SNE plots with equal color scale to compare the expression of different genes. By default, limits are the range of expression of a selected gene.

### Value

A ggplot object of the gene expression colored tSNE.

### Author(s)

Ilyess RACHEDI, based on code by Polina PAVLOVICH and Nicolas DESCOSTES.

### See Also

retrieveTopClustersMarkers plotCellSimilarity plotCellHeatmap plotClusteredTSNE plotClustersSimilarity

### Examples

    ## Object scr containing the results of previous steps
    load(system.file("extdata/scrFull.Rdat", package="conclus"))

    ## t-SNE plot colored by expression of a  given gene.
    plotGeneExpression(scr, getTopMarkers(scr)[1,1])

[Package conclus version 1.2.4 Index]