4 FeatureCornerAxes
FeatureCornerAxes is used to add corner axis on the left-bottom UMAP/tSNE Featureplot function from seurat plot to view gene expressions.
4.1 examples
See the default plot:
# default
FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = 'orig.ident',
relLength = 0.5,
relDist = 0.2,
features = c("Actb","Ythdc1", "Ythdf2"))
![](local_images/13.png)
# remove legend
FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = 'orig.ident',
relLength = 0.5,
relDist = 0.2,
features = c("Actb","Ythdc1", "Ythdf2"),
show.legend = F)
![](local_images/14.png)
If we do not split the plot by group, we can set groupFacet = NULL:
# no facet group
FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = NULL,
relLength = 0.5,
relDist = 0.2,
features = c("Actb","Ythdc1", "Ythdf2"),
aspect.ratio = 1)
![](local_images/15.png)
# specify corner position
p1 <- FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = 'orig.ident',
relLength = 0.5,
relDist = 0.2,
aspect.ratio = 1,
features = c("Actb","Ythdc1", "Ythdf2"),
axes = 'one')
p2 <- FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = 'orig.ident',
relLength = 0.5,
relDist = 0.2,
aspect.ratio = 1,
features = c("Actb","Ythdc1", "Ythdf2"),
axes = 'one',
cornerVariable = 'ST4')
# combine
cowplot::plot_grid(p1,p2,ncol = 2,align = 'hv')
![](local_images/16.png)
Besides, we can set the color bar value range:
# given a range to plot
p1 <- FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = NULL,
relLength = 0.5,
relDist = 0.2,
features = c("Actb","Ythdc1", "Ythdf2"),
aspect.ratio = 1,
themebg = 'bwCorner')
p2 <- FeatureCornerAxes(object = tmp,reduction = 'umap',
groupFacet = NULL,
relLength = 0.5,
relDist = 0.2,
features = c("Actb","Ythdc1", "Ythdf2"),
aspect.ratio = 1,
themebg = 'bwCorner',
minExp = 0,maxExp = 2)
# combine
cowplot::plot_grid(p1,p2,ncol = 1,align = 'hv')
![](local_images/17.png)