Flexible function for fetching partner data across datasets
Usage
cf_partners(
ids,
threshold = 1L,
partners = c("inputs", "outputs"),
bind.rows = TRUE,
MoreArgs = list(),
keep.all = FALSE,
details = c("partner", "query", "both", "neither"),
use_superclass = getOption("coconatfly.use_superclass", FALSE),
harmonise_class = getOption("coconatfly.harmonise_class", FALSE)
)Arguments
- ids
A list of ids named by the relevant datasets (see examples) or any other input that can be processed by the
keysfunction (including ahclustdendrogram object.)- threshold
return only edges with at least this many matches. 0 is an option since neuprint sometimes returns 0 weight edges.
- partners
Whether to return inputs or outputs
- bind.rows
Whether to bind data.frames for each dataset together, keeping only the common columns (default
TRUEfor convenience but note that some columns will be dropped by unlesskeep.all=TRUE).- MoreArgs
Additional arguments in the form of a hierarchical list (expert use; see details and examples).
- keep.all
Whether to keep all columns when processing multiple datasets rather than just those in common (default=
FALSEonly keeps shared columns).- details
Which neurons to enrich with metadata. Options:
"partner"(default): Add metadata for partner neurons only"query": Add metadata for query neurons only"both": Add metadata for both with.pre/.postsuffixes"neither": No metadata, return minimal columns for speed
Metadata can also be added later via
cf_add_meta.- use_superclass
If
TRUE, rename class/subclass/subsubclass columns to superclass/class/subclass. Can also be set via thecoconatfly.use_superclassoption.- harmonise_class
If
TRUE, harmonise class values to malecns style across all datasets. Can also be set via thecoconatfly.harmonise_classoption.
Details
fancr and fafbseg functions have usually used a >
relationship for the threshold, but here (as of May 2024) it is uniformly a
>= relationship.
MoreArgs is structured as a list with a top layer naming datasets
(using the same long names as cf_datasets. The second (lower)
layer names the arguments that will be passed to dataset-specific functions
such as fafbseg::flywire_partner_summary2 and
malevnc::manc_connection_table.