labsyspharm / scimap

Spatial Single-Cell Analysis Toolkit
https://scimap.xyz/
MIT License
71 stars 24 forks source link

adata.raw.X vs. adata.X #83

Closed josenimo closed 4 months ago

josenimo commented 9 months ago

Dear @ajitjohnson,

I am running through a couple of datasets, and just realized that some functions obtain their data from the adata.raw.X. Since I performed a couple of filtering steps, to both cells and channels, the matrix does not match.

Right now I am trying to sm.pp.rescale.

What would be the most scimapy way of running through it?

  1. Shall I filter out channels and cells in the matrix form, and then transform to anndata?
  2. Shall I run all the filtering steps on the adata and the adata.raw?
  3. Shall I just replace the adata.raw.X with adata.X after the filtering steps?

Happy to discuss :)

ajitjohnson commented 8 months ago

Dear @josenimo,

If you are certain that specific channels, such as background information, will not be utilized in your analysis, it is advisable to exclude them during import into scimap. This can be achieved by employing the drop_markers parameter within the mcmicro_to_scimap function. Additionally, this function is designed to automatically eliminate DNA channels, provided that these are discernible with pattern matching.

In instances where the data has already been imported with these columns, you have the option to use https://scimap.xyz/Functions/hl/dropFeatures/ to exclude these features at a subsequent stage in your analysis workflow.