carmonalab / ProjecTILs

Interpretation of cell states using reference single-cell maps
GNU General Public License v3.0
246 stars 28 forks source link

human.ortho argument should be re-enabled #19

Closed skafdasschaf closed 2 years ago

skafdasschaf commented 3 years ago

Hi,

it might be worth to re-enable the human.ortho argument of make.projection(). Currently, the value of this argument is ignored, since projection.helper() automatically detects whether it should convert human to murine gene names.

However, I am using a custom reference atlas with human gene names and want to project datasets with human gene names onto that. Currently, this is only possible by hacking the package code (see below), since ProjecTILs converts gene names of the query dataset to their murine orthologs and then is (obviously) unable to find these genes in the reference.

My current workaround:

convert.orthologs.id <- function(x, ...) x
environment(convert.orthologs.id) <- asNamespace("ProjecTILs")
assignInNamespace("convert.orthologs", convert.orthologs.id, ns = "ProjecTILs")

kind regards, Wolfgang

mass-a commented 3 years ago

Hello Wolfgang, you are absolutely right, the current version of ProjecTILs assumes a mouse reference atlas. The development version (remotes::install_github("carmonalab/ProjecTILs", ref="dev") should resolve this limitation, and lets you specify a human reference. Gene names are only converted if the species of the query and the reference are different. Good hack though :)

Best, -m