Programatically upload/map my local files to cloud-based MapMyCells portal

Hi,

Can I use the cell type mapper cli to programatically upload my local files (ex anndata/csv format) to run on the cloud-based MapMyCells tool?

I would prefer to use the existing MapMyCells backend and taxonomies for reproducibility purposes. So, I would normally upload my files to the main MapMyCells portal:

But I have numerous input files. I am concerned about human copy/paste errors and would prefer to point to the MapMyCells portal, point to my local data, and execute the algorithm via cli.

Is this possible?

I opened an issue on Github (#44) but wasn’t sure if I should ask here instead too.

Thanks,
Chris

Hi @crhodes

Unfortunately, there is no way to programmatically upload data to the web app in bulk.

However, if your primary concern is being able to use the exact same taxonomies and marker genes as are used in the web app form of MapMyCells, you can use the abc_atlas_access Python library to download the necessary files.

This Jupyter notebook shows how to get MapMyCells artifacts using abc_atlas_access.

Once you have those assets for the taxonomy in which you are interested, you can skip to Section 4 of this Jupyter notebook, which actually runs the mapping.

I guess the only subtlety is that, if you are mapping to the Whole Mouse Brain taxonomy, you need to run with the

"drop_level": "CCN20230722_SUPT"

configuration parameter. Every other taxonomy should just work with the default configuration parameters set in cell_type_mapper (provided you use the precomputed_stats file and marker gene lookup table downloaded from abc_atlas_access).

Please follow up here if anything is unclear or if I haven’t addressed your actual concern.

Just a final note: if anyone is ever wondering what configuration parameters the web app is running with, you can submit a small job to the web app and download the results. The .json file in the output package will contain the configuration parameters, which you could access in Python with something like

import json
blob = json.load(open('/path/to/my_mapping_job_output.json', 'rb'))
blob['config']