broadinstitute / Tangram

Spatial alignment of single cell transcriptomic data.
BSD 3-Clause "New" or "Revised" License
249 stars 50 forks source link

why enforce lowercase? #71

Open giovp opened 2 years ago

giovp commented 2 years ago

https://github.com/broadinstitute/Tangram/blob/3c87a25d49ad50b7f85ba68c67d31b46e38c3847/tangram/mapping_utils.py#L40-L41

think it'd be useful if this operation is optional.

Hejin0701 commented 2 years ago

Hi @giovp ,

Thanks for your suggestion! The initial purpose of these two lines of commands are to get rid of the inconsistent capitalization of gene name. You are right, it is not always needed and thus it is better to make it optional.

I have just updated Tangram function pp_adatas with an additional parameter _gene_tolowercase. The default value is set as True. If not needed, people can alway set it as False to prevent conversion of the genes names to lower cases. One additional line of instructions is added before the pp_adatas function in tutorial.

giovp commented 2 years ago

thank you!

yinan-wan0 commented 7 months ago

Hi,

It looks like this enforcing lower case was not only in pp_adatas, but also in tg.project_genes. After running it my sc_adata genes become all lower case. Can you please also provide an option to disable it there?

Thanks a lot!

giovp commented 6 months ago

Indeed! that's really problematic and give rise to all sorts of issues, am reopening this cause the issue is not resolved

The initial purpose of these two lines of commands are to get rid of the inconsistent capitalization of gene name

I would also like to mention that there is no reason that such inconsistency should be resolved inside the method call, especially without throwing any warning.