add_celltype_info | R Documentation |
add_celltype_info
will add information to an existing
dataframe.
flytable_meta
will fetch a data.frame of metadata from
flytable for a given set of identifiers.
add_celltype_info(
x,
idcol = NULL,
version = NULL,
suffix = NULL,
table = c("both", "info", "optic"),
...
)
flytable_meta(
ids = NULL,
version = NULL,
table = c("both", "info", "optic"),
unique = FALSE,
...
)
x |
a data.frame containing root ids or a |
idcol |
Optional character vector specifying the column containing ids of the neurons for which cell type information should be provided. |
version |
Optional numeric CAVE version (see |
suffix |
A character suffix for the new columns (default value of
|
table |
Which cell type information tables to use ( |
... |
additional arguments passed to |
ids |
Flywire identifiers/query in any form understood by
|
unique |
Whether to ensure that rows contain only unique identifiers.
Default |
the root ids must be in a column called one of "pre_id",
"post_id", "root_id", "post_pt_root_id", "pre_pt_root_id"
. If you do not
have exactly one of these columns present then you must specify your
preferred column with the idcol
argument.
a data.frame with extra columns
flytable_cell_types
kcin=flywire_partner_summary("720575940626474889", partners = 'in',
cleft.threshold = 50)
kcin
kcin2=add_celltype_info(kcin)
kcin2
library(dplyr)
kcin2 %>%
group_by(cell_type) %>%
summarise(wt = sum(weight),n=n()) %>%
arrange(desc(wt))
kcin2 %>%
count(cell_class, wt = weight)
## Not run:
# read neuronlist containing "dotprops" for some olfactory projection neurons
da2=read_l2dps('DA2')
# add cell type details to that
da2=add_celltype_info(da2)
## End(Not run)
flytable_meta("class:MBON")
flytable_meta("type:MBON2%")
# the / introduces a regex query (small performance penalty, more flexible)
flytable_meta("/type:MBON2[0-5]")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.