Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Adam Gayoso
    @adamgayoso
    Hi all, please feel free to ask quick questions about running scvi-tools models!
    Eduardo Beltrame
    @Munfred

    How do I access the scale_sampler method? For a given cell type, I would like to compute the scale1 value (the normalized expression) that is reported from model.differential_expression.

    For example, let's say I want to get the normalized expression of all genes on the ASK neurons. Right now, I can do that by doing:

    de = model.differential_expression(group1='ASK',group2='ASJ',groupby='cell_type')
    ASK_normalized_expression= de['scale1']

    However this takes ~10s and is computing a bunch of other things that I don't need. I want to build a matrix of the normalized expression for all cell types (150 cell types x 11k genes) so doing this 150 times takes ~25 min and I'd want to make it quicker if possible..

    The scale_sampler is described here:
    https://docs.scvi-tools.org/en/stable/_modules/scvi/core/utils/differential.html#DifferentialComputation

    3 replies
    munfred
    @munfred:munfred.com
    [m]
    Ahh ok that will do it. When runnung on colab with 100k cells and 11k genes I was running out of memory when doing just get_normalized_expression, didnt realize I could pass the indices,thanks!
    I see that the default is n_samples=1, should I perhaps multiply that by some value to get a minimum number of samples per cell type? Eg if I want at least 5000 samples and a cell type only has 200 representatives, then I'd use n_samples=25
    3 replies
    munfred
    @munfred:munfred.com
    [m]
    Ah great, thanks!
    zmokhtari
    @zmokhtari
    Hi, I have a question regarding totalVI. I was wondering on eliminating some proteins from CIT- seq data for downstream analysis. Do you guys have any recommendations?
    7 replies
    Valentine Svensson
    @vals
    In the newer versions the history from training doesn't have _test versions of the losses. I've never seen overfitting happen in these models so they might not be so useful. But is there a way to get the history to record the test errors too?
    4 replies
    Eduardo Beltrame
    @Munfred
    I'm trying to get the normalized expression matrix on Colab but it keeps crashing due to lack of RAM..I tried setting up a batch size like normalized_expression_matrix = model.get_normalized_expression(batch_size=1000) but still crashes... the adata is n_obs × n_vars = 100955 × 11569, other than getting more RAM is there something I could do to get this to run on colab?
    3 replies