Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels Key in totalVI #1549

Open
StefanMDPhD opened this issue Jun 1, 2022 · 7 comments
Open

Labels Key in totalVI #1549

StefanMDPhD opened this issue Jun 1, 2022 · 7 comments

Comments

@StefanMDPhD
Copy link

I've written this a few times in the past, but I can't say this often enough: Thank you for sharing your excellent analysis software with the community!

I'm writing to inquire about the possibility of exposing the labels_key in the totalVI model.

My reason for coveting this feature is the following: I have CITE-seq data from cells for which I have some a priori information on coarse cell type, i.e. my libraries consist of two different cell types that I've sorted (via FACS) and labeled with hash tag olives before multiplexing them into a single library.

[Perhaps anecdotally] I notice that when I integrate several of these libraries via scVI, using batch and label keys, the boundary between the two cell types remain crisp. When I try this with totalVI, using batch key [and the additional CITE-seq data] there is more mixing between the [closely related] cell types.

Thanks in advance for considering this request.

@adamgayoso
Copy link
Member

Sorry I missed this, indeed this is something we would like to add but haven't gotten to yet.

@lior-ness
Copy link

I second @StefanMDPhD! Thank you for the effort you put in this excellent package.

Exposing labels_key in totalVI is a highly desired feature on my end as well. I hope it's a simple enough addition.
I too noticed that cell-type-aware-embedding clusters much better compared with using batch keys alone.

@ChrisMBrooks
Copy link

This would be a highly advantageous feature for my team as well.

@canergen, I've noticed this enhancement was assigned to yourself recently. Does this mean the feature is actively in development and can be expected in an upcoming release?

Thanks for the great software and for all the hard work that goes into it.

@canergen
Copy link
Member

canergen commented Sep 6, 2024

Yes, the branch can_totalanvi pretty much contains the full model. However, I have currently a bit of backlog on other projects and won’t create a tutorial in the near future.

@ChrisMBrooks
Copy link

@canergen,

Again, thank you kindly for the hard work on this and my apologies for the delayed response. Had to step away from work for personal reasons, but am now back to investigating the fitness of TOTALANVI for my team's needs. I've had success in installing from the can_totalanvi branch and performing a test run, but I had one quick follow-up question. How straight forward would it be, within this branch, to also wire up / expose the n_layers and n_hidden parameters so that they can be configured when instantiating the scvi.external.TOTALANVI model? This added flexibility would mean my team has everything we need to meet out needs.

Cheers,
Chris

@ori-kron-wis
Copy link
Collaborator

Hey Chris,

Those parameters are actually exposed using the kwargs parameter of the model.
So you can technically init the model with something like:
TOTALANVI(adata, n_hidden=512, n_latent=30, n_layers_encoder=3, n_layers_decoder=2)
To bypass the default values of n_layers and n_hidden, or any other default parameter

Good luck!

@ChrisMBrooks
Copy link

Hi @ori-kron-wis,

Ah, okay this is clear now. I had of course tried this, as I assumed the kwargs would handle the extra params but got an error, but it looks like I was tripped up by using the "n_layers" keyword instead of "n_layers_encoder" and "n_layers_decoder". A quick test and it all seems to be working accordingly. Great!

Thanks Again,
Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants