abelson-lab / scATOMIC

Pan-Cancer Single Cell Classifier
MIT License
57 stars 5 forks source link

undefined columns selected #12

Closed Gaodelike closed 11 months ago

Gaodelike commented 11 months ago

Hello!

Super nice tool! I am trying to apply it to my dataset but I am encountering the next error:

[1] "Starting Layer 1"
/usr/local/miniconda/envs/r-reticulate/lib/python3.9/site-packages/graphtools/graphs.py:290: RuntimeWarning: Detected zero distance between 125027 pairs of samples. Consider removing duplicates to avoid errors in downstream processing.
  warnings.warn(
/usr/local/miniconda/envs/r-reticulate/lib/python3.9/site-packages/graphtools/base.py:554: RuntimeWarning: K should have a non-zero diagonal
  warnings.warn("K should have a non-zero diagonal", RuntimeWarning)
[1] "Done Layer 1"
[1] "Starting Layer 2 Blood"
/usr/local/miniconda/envs/r-reticulate/lib/python3.9/site-packages/graphtools/graphs.py:290: RuntimeWarning: Detected zero distance between 79240 pairs of samples. Consider removing duplicates to avoid errors in downstream processing.
  warnings.warn(
/usr/local/miniconda/envs/r-reticulate/lib/python3.9/site-packages/graphtools/base.py:554: RuntimeWarning: K should have a non-zero diagonal
  warnings.warn("K should have a non-zero diagonal", RuntimeWarning)
[1] "Done Layer 2 Blood"
[1] "Starting Layer 3 TNK"
Error in `[.data.frame`(predictions, , scores_to_get_threshold[i]) : 
  undefined columns selected
Calls: run_scATOMIC ... <Anonymous> -> get_auto_threshold -> [ -> [.data.frame
In addition: Warning message:
In asMethod(object) :
  sparse->dense coercion: allocating vector of size 3.7 GiB
Execution halted

I want to know if this error is related to the previous warning? such as

Detected zero distance between 125027 pairs of samples. Consider removing duplicates to avoid errors in downstream processing

and

K should have a non-zero diagonal

Looking forward to your reply

inofechm commented 11 months ago

This warning should not be the issue. could I ask what the tissue you are using is? Could you also please provide your session info? Just looking at the error itself this might be a bug related to only 1 T/NK cell being present, potentially converting the object from a dataframe. I will look for any issues with the code that might be causing this

inofechm commented 11 months ago

Can you please also try running with the confidence_cutoff parameter set to FALSE in both run_scATOMIC() and create_summary_matrix() and let me know if that code worked?

Gaodelike commented 11 months ago

Thank you for your reply. I think I have found the problem. The gene name of the expression matrix I entered is lowercase. After I changed it to uppercase, there was no problem