Dear all,
this is maybe a trivial question but how can I provide the exact sample order in VlnPlots?
Thanks and sorry, Christian
Hi,
You can simply set an order of cluster identities as follows:
# Define an order of cluster identities
my_levels <- c(4,3,2,1)
# Relevel object@ident
object@ident <- factor(x = object@ident, levels = my_levels)
Best,
Leon
Thanks, Leon!
Dr. med Dipl.-Math. Christian Hinze
AG Schmidt-Ott
Max-Delbrück-Centrum
für Molekulare Medizin (MDC) Berlin-Buch
Robert-Rössle-Str. 10
13125 Berlin
Tel.: +49 30 9406 3240
christian.[email protected]
Medizinische Klinik mit Schwerpunkt Nephrologie
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30
12203 Berlin
Tel. +49 30 8445 2441
christian.[email protected]kai.schmidt-ott@charite.de
Von: Leon Fodoulian [[email protected]]
Gesendet: Mittwoch, 2. Mai 2018 19:55
An: satijalab/seurat
Cc: balthasar0810; Author
Betreff: [ext] Re: [satijalab/seurat] Plot order VlnPlot (#454)
Hi,
You can simply set an order of cluster identities as follows:
my_levels <- c(4,3,2,1)
object@ident <- factor(x = object@ident, levels = my_levels)
Best,
Leon
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/satijalab/seurat/issues/454#issuecomment-386065176, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJwpDB_rc2gx1PBdV95MPfz91sk3Qyd7ks5tufMHgaJpZM4Tvyn0.
Could you please close this issue?
Thank you!
Leon
Hello: I am new to Seurat. How do I do this in Seurat 3? The method described above does work.
Thanks
Frank
Hello everyone, I am struggling to change the order of my clusters in the graphs using seurat v3.0.
I ordered them using the ClusterTree function but they came out in descending way to what I want for my graphs. I.e (*4,3,2,1) instead of (1,2,3,4). How can use the version3 to reorder the clusters list?
I have been trying the suggestions above and they are not working. Thank you so much. Victor
I am also wondering how to apply this to version 3.
Thanks!
This works for me in S v3.
object_copy <- object
my_levels <- c(set_custom_order_of_clusters)
Idents(object_copy) <- factor(Idents(object_copy), levels= my_levels)
VlnPlot(object_copy, features = c("some_gene"))
study the command changes here [under tab S v2.x vs S v3.X] to transition from v2 to v3
https://satijalab.org/seurat/essential_commands.html
Most helpful comment
This works for me in S v3.
object_copy <- object
my_levels <- c(set_custom_order_of_clusters)
Idents(object_copy) <- factor(Idents(object_copy), levels= my_levels)
VlnPlot(object_copy, features = c("some_gene"))
study the command changes here [under tab S v2.x vs S v3.X] to transition from v2 to v3
https://satijalab.org/seurat/essential_commands.html