Description Usage Arguments Details Examples
plotChordDiagram Generate a chord diagram from a flowReMix fit.
1 2 3 4 5 6 7 8 | plotChordDiagram(x, threshold = 0.6, varnames = c("stim", "parent",
"functions"), separator = "/", function.separator = "\\+",
track.order = c("functions", "parent", "stim"),
sort.order = c("functions", "parent", "stim"), inner.track = "parent",
track.height = 2, track.margin = c(0, 0), functions.name = "functions",
wrap.at = c("\\+", "", ""), label.cex = c(0.5, 0.5, 0.5),
facing = "clockwise", parsefun = NULL, functionality.filter = NULL,
auc.filter = NULL, auc.outcome = NULL, response.filter = NULL)
|
x |
|
threshold |
|
varnames |
|
separator |
|
function.separator |
|
track.order |
|
sort.order |
|
inner.track |
|
track.height |
|
track.margin |
|
functions.name |
|
wrap.at |
|
label.cex |
|
facing |
|
parsefun |
|
functionality.filter |
|
auc.filter |
|
auc.outcome |
|
response.filter |
|
Parses the subsets
labels into factors that can be used to annotate tracks on a chord diagram.
Connections correspond to edges in the ising stability graph with a minumum threshold
propensity.
A label such as "env/8+/IL2+" with an argument of separator="/"
and varnames=c("stim","parent","functions")
would
cause the cell subset label to be parsed into three variables corresponding to the stimulation, the
parent cell population, and the cytokine function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | data(fit505)
#also defined in the package namespace
parser = function(x,separator,functions){
functions=enquo(functions)
dat = x%>% mutate(func = strsplit(!!functions, split = separator)) %>%
unnest()%>%tidyr::spread(func,func)
dat[is.na(dat)]=""
dat
}
plotChordDiagram(fit505,
threshold = 0.8,
varnames=c("stim","parent","functions"),
track.order = c("stim","parent","functions"),
sort.order=c("parent","stim","degree"),
functions.name="functions",
track.height = 2.5,
track.margin = c(0,0),
label.cex=0.6,
wrap.at = " ",
functionality.filter=1,
auc.filter = 0,
auc.outcome = hiv,
response.filter = 0.05,
facing=c("inside","inside","inside"),parsefun=parser)
## Not run:
plotChordDiagram(
rv144_aggregate,
threshold = 0.8,
varnames = c("functions"),
separator = " ",
function.separator = ",",
track.order = "functions",
sort.order = c("degree", "functions"),
inner.track = "functions",
parsefun = parser,
track.height = 2,
track.margin = c(0, 0),
functions.name = c("functions"),
facing = "inside",
wrap.at = " ",
label.cex = 0.6,
functionality.filter=1
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.