calico / solo

software to detect doublets
MIT License
85 stars 13 forks source link

Problem with hashsolo #74

Open Kani0n opened 2 years ago

Kani0n commented 2 years ago

Hi, I just ran my solo analysis and now i need the information a bout which of my cells was predicted to be a doublet and so forth. If i understood correctly i have to use hashsolo for this, but that just runs with no logger or information about progress and i dont seem to get anything... I only have an h5ad file with ~800 cells does this just take over a day or am i getting something wrong? Thank you

davek44 commented 2 years ago

HashSolo is meant for working with hashing data. Are you simply attempting to call doublets? We haven’t worked with a data set with only 800 cells before. Solo benefits from larger data sets, so you might do fine with some of the linear methods like scrublet or doublet finder.

Kani0n commented 2 years ago

Yes, I just want to know which on my cells are predicted to be what (doublet, singlet).

Where in the output do I see this information?

davek44 commented 2 years ago

The output file is_doublets.npy contains binary doublet calls. You can see that and all of the other output files in the lines of code after this one: https://github.com/calico/solo/blob/master/solo/solo.py#L394

Kani0n commented 2 years ago

is_doublets.npy contains over 10k values, how do i know which of these are the predictions for my cells?

davek44 commented 2 years ago

If you think your data has 800 cells, but is_doublets.npy has 10k values, then it's likely the input data isn't formatted according to Solo's assumptions. Could you send me more information about how you're running Solo and the format of your input data? Is it possible the gene expression matrix is transposed relative to the typical Cell x Gene format?

Kani0n commented 2 years ago

I actually misspoke earlier, I have an h5ad file of 12013 cells 816 of them predicted to be doublets by AMULET. In my output folder there is for example the is_doublets.npy vector, but tthis one as well as all the other outputs are 10992 long. What i now want to know is which of my cells Solo predicted to be a doublet (True inside the vector).

davek44 commented 2 years ago

Are you saying that you don’t understand how to read the vector stored in is_doublets.npy? Or are you saying that you don’t understand how your 12,013 cells was filtered down to 10,992?

Kani0n commented 2 years ago

I am interested in what cells are labelled "True" and what cells are "False". e.g: cell1: False cell2: True ...

davek44 commented 2 years ago

OK, you'll want to read the is_doublets.npy file using a command like the following in a python terminal, notebook, script.

cell_doublets = np.load('is_doublets.npy')

cell_doublets will contain a numpy array with type boolean. To determine whether Solo predicts cell 1 to be a doublet, check cell_doublets[0] in the array. To determine whether Solo predicts cell 2 to be a doublet, check cell_doublets[1] in the array. And so on.

njbernstein commented 1 year ago

@davek44 seems like we can close this out