call_natmi | R Documentation |
Call NATMI Pipeline from R with Resources Querried from OmniPath [[DEPRECATED]]
call_natmi(
sce,
op_resource,
expr_file = "em.csv",
meta_file = "metadata.csv",
output_dir = "NATMI_test",
reso_name = "placeholder",
assay = "RNA",
num_cor = 4,
conda_env = NULL,
assay.type = "logcounts",
.format = TRUE,
.overwrite_data = TRUE,
.seed = 1004,
.natmi_path = NULL,
.delete_input_output = FALSE
)
sce |
Seurat or SingleCellExperiment object |
op_resource |
List of OmniPath resources |
expr_file |
expression matrix file name |
meta_file |
annotations (i.e. clusters) file name |
output_dir |
NATMI output directory |
reso_name |
name of the resource usually in the format list(name = op_resource) |
assay |
Seurat assay to be used |
num_cor |
number of cores to be used |
conda_env |
name of the conda environment via which NATMI is called |
assay.type |
logcounts by default, but it's converted back into counts as suggested by the authors |
.format |
bool whether to format output |
.overwrite_data |
bool whether Extract and overwrite csv with data from Seurat Object |
.seed |
random seed |
.natmi_path |
path of NATMI code and dbs (by default set to liana path) |
.delete_input_output |
logical whether to delete input and output after run. |
This function will save NATMI dbs folder, then it will call the NATMI Python from the NATMI dir and save the output into a specified directory in NATMI's path. It will then load the csvs and format the output to a list of lists.
By default, NATMI's path is set to that of LIANA, but any alternative path can be passed
============================================================================== NATMI Arguments: –interDB INTERDB lrc2p (default) has literature supported ligand-receptor pairs | lrc2a has putative and literature supported ligand-receptor pairs | the user-supplied interaction database can also be used by calling the name of database file without extension –interSpecies INTERSPECIES human (default) | mouse | expandp | expanda –emFile EMFILE the path to the normalised expression matrix file with row names (gene identifiers) and column names (cell-type/single-cell identifiers) –annFile ANNFILE the path to the metafile in which column one has single-cell identifiers and column two has corresponding cluster IDs (see file 'toy.sc.ann.txt' as an example) –species SPECIES human (default) | mouse | rat | zebrafish | fruitfly | chimpanzee | dog | monkey | cattle | chicken | frog | mosquito | nematode | thalecress | rice | riceblastfungus | bakeryeast | neurosporacrassa | fissionyeast | eremotheciumgossypii | kluyveromyceslactis, 21 species are supported –idType IDTYPE symbol (default) | entrez(https://www.ncbi.nlm.nih.gov/gene) | ensembl(https://www.ensembl.org/) | uniprot(https://www.uniprot.org/) | hgnc(https://www.genenames.org/) | mgi(http://www.informatics.jax.org/mgihome/nomen/index.shtml) | custom(gene identifier used in the expression matrix) –coreNum CORENUM the number of CPU cores used, default is one –out OUT the path to save the analysis results (Taken From NATMI's GitHub Page)
Stats: 1) The mean-expression edge weights 2) The specificity-based edge weights * a weight of 1 means both the ligand and receptor are only expressed in one cell type
Note that 'call_natmi' will write the expression matrix to CSV each time its called, unless .overwrite_data is set to FALSE! This can be an extremely time consuming step when working with large datasets
Also, NATMI will sometimes create duplicate files, so please consider saving each run in a new folder. An easy fix would be to simply delete the output, but I am reluctant to automatically delete files via an R script.
DF with NATMI results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.