"Filter plotted cells" allows the subsetting of visualized cells using multiple variables of interest to leverage rich metadata annotations provided by the study owner.
In addition to this written help, you can also find a video demo at the bottom of this article.
Many single cell studies have several variables of interest (e.g. treatment conditions, treatment dose, tissue of origin) in addition to cell type. Visualizing differential expression between non-cell type variables on a plot of cell type clustering is difficult because cells from each non-cell type annotation are often intermingled in a clustered embedding plot. "Cells" in this article generalizes to plotted points which may represent nuclei, spatial beads, etc. in addition to actual cells.
How does "Filter plotted cells" work?
Select from the Annotation menu to color the chosen clustering plot while in the Options panel. If desired, enter a gene of interest in the search bar and hit Enter (or click the magnifying glass icon).
When you visit a study where "Filter plotted cells" is available, you’ll see a Filter plotted cells button on the right-hand panel of the study’s Explore tab.
After clicking Filter plotted cells , the Options panel is replaced by the Filter plotted cells panel which displays the annotation groups and the filters that can be used for filtering the plot(s) shown to the left of the panel. In the Filter plotted cells panel, you can change the annotation used to color the selected clustering with the Color by menu.
The Filter plotted cells panel provides a rich set of features to subset the cells visualized in the plot(s) on the left.
Toggle sets of filters off and on
Turn off all filters in an annotation group by clicking the checkbox for the annotation group (purple box). If an annotation group has been toggled off, the checkbox for the deactivated annotation group will be empty and, in most cases, the plot(s) will be blank. This allows easy viewing of individual filters using the checkboxes under the annotation group (e.g. to compare B cell treated with B cell vehicle). A checkbox with a line through it 🈩 indicates the set of filters is in an intermediate state (i.e. neither fully on nor fully off).
Sorting and viewing filter options
By default, up to five filters per annotation group are shown, sorted by the number of cells per filter in the plot (see Dose annotation group filters), Toggle the sort type between alphabetical sort and cell count by clicking the sort icon, see tooltip (black box). The Cell type treatment annotation group shows an example of alphabetical sorting, which facilitates the search for specific filters by name. The filter options can be collapsed using the caret icon (circled in red) so more annotation groups options can be seen in the panel, or expanded by clicking more so all filter options in the group can be seen.
Filter membership counts using sparkbars
Under the numeric cell counts, a tiny bar chart (aka. sparkbar) is displayed to visualize the proportion of cells that have been filtered (see colored arrows). Filters displaying all cells will show a cyan sparkbar. Filters with all cells filtered will have a grey sparkbar. Blue sparkbars signals that only a subset of the cells in the filter are displayed in the plot. The sparkbar shows the relative proportion of cells in the filter which are plotted and hovering over on the sparkbar will show additional cell count details, see tooltip (black box).
Visualizing differential expression of two overlapping subsets of cells (in this case, Cyp1a1 gene expression in centrilobular region hepatocytes, either treated with TCDD or vehicle-only control) can be captured or shared by simply copying the URL.
Cyp1a1 gene expression in centrilobular region hepatocytes treated with TCDD (URL for plot shown above)
Cyp1a1 gene expression in centrilobular region hepatocytes treated with vehicle-only control (URL)
Note that cells that are filtered are accounted for in the --Filtered-- category in the plot legend (filtered cells are plotted with very low opacity). If hover-over to visualize gene expression for a specific colored cell is hindered by filtered cells, click on --Filtered-- in the legend to remove the filtered cells from the plot.
Tips and tricks
- Always check the scale of the gene expression legend, coloration will vary depending on the min and max of the subset shown for visualization.
- Changes made while in the Filter plotted cells panel are reflected in the URL, to reset the study to its default state, click Reset view in the Options panel (use the arrow in the upper right corner of the Filter plotted cells panel to navigate back to Options )
Video demo
Known issues
- For annotations with incomplete metadata (i.e. the study owner only supplied values for a subset of cells), the cells lacking values are plotted in black. (This is an unfortunate default of the plotting software that is difficult to change.)
- Please report any issues to scp-support@broadinstitute.zendesk.com
Comments
0 comments
Article is closed for comments.