davismcc / archive-scater

An archived version of the scater repository, see https://github.com/davismcc/scater for the active version.
64 stars 18 forks source link

Violin plots interact weirdly with shape_by in plotExpression #93

Closed LTLA closed 7 years ago

LTLA commented 7 years ago

Separate violin plots are formed for each set of points with different shapes - surely this is not intended.

data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data = sc_example_cell_info)
example_sceset <- newSCESet(countData = sc_example_counts, phenoData = pd)
example_sceset <- calculateQCMetrics(example_sceset)
plotExpression(example_sceset, 1:6, "Mutation_Status", shape_by="Cell_Cycle")

In contrast, the following behaves properly, with one violin plot for all colours in each facet.

plotExpression(example_sceset, 1:6, "Mutation_Status", colour_by="Cell_Cycle")
davismcc commented 7 years ago

Thanks, Aaron. In the latest commit the code is a bit smarter/more careful with the group aesthetic, so this issue should now be fixed. Just let me know if not, or you see any unexpected side effects.