map_data | R Documentation |
Convert a single-cell data object across-species (gene orthologs) or within-species (gene synonyms).
map_data(
obj,
gene_map = NULL,
input_col = "input_gene",
output_col = "ortholog_gene",
standardise_genes = FALSE,
input_species = NULL,
output_species = input_species,
method = c("homologene", "gprofiler", "babelgene"),
drop_nonorths = TRUE,
non121_strategy = "drop_both_species",
agg_fun = "sum",
mthreshold = Inf,
as_sparse = TRUE,
as_delayedarray = FALSE,
sort_rows = FALSE,
test_species = NULL,
chunk_size = NULL,
verbose = TRUE,
...
)
obj |
A single-cell data object belonging to one of the following classes:
|
gene_map |
A data.frame that maps the current gene names to new gene names. This function's behaviour will adapt to different situations as follows:
|
input_col |
Column name within |
output_col |
Column name within |
standardise_genes |
If |
input_species |
Name of the input species (e.g., "mouse","fly"). Use map_species to return a full list of available species. |
output_species |
Name of the output species (e.g. "human","chicken"). Use map_species to return a full list of available species. |
method |
R package to use for gene mapping:
|
drop_nonorths |
Drop genes that don't have an ortholog
in the |
non121_strategy |
How to handle genes that don't have
1:1 mappings between
|
agg_fun |
Aggregation function passed to
aggregate_mapped_genes.
Set to |
mthreshold |
Maximum number of ortholog names per gene to show.
Passed to gorth.
Only used when |
as_sparse |
Convert
If |
as_delayedarray |
Convert aggregated matrix to DelayedArray. |
sort_rows |
Sort |
test_species |
Which species to test for matches with.
If set to
|
chunk_size |
An integer indicating number of cells to include per chunk.
This can be a more memory efficient and scalable way of aggregating on-disk
data formats like AnnData,
rather than reading in the entire matrix into memory at once
(default: |
verbose |
Print messages. |
... |
Additional arguments to be passed to
gorth or homologene. |
An aggregated/expanded version of the input single-cell data object.
obj <- example_obj("ad")
obj2 <- map_data(obj = obj,
input_species = "human",
output_species = "mouse")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.