r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
300 stars 125 forks source link

plotFeatureSingle quantile error: missing value #116

Closed yeswzc closed 4 years ago

yeswzc commented 4 years ago

Hi, I met an error with my own data in Step 14 Identify differentially accessible regions (10X Adult Mouse Brain). Do you know how to solve this?

Thank you!


Epoch: reading cell-peak count matrix session ...
number of barcodes: 7764
number of bins: 271960
number of genes: 0
number of peaks: 182681
number of motifs: 0
Epoch: checking inputs ...
Epoch: identifying DARs for positive cluster ...
Error in quantile.default(feature.value, quantiles[1]) :
  missing values and NaN's not allowed if 'na.rm' is FALSE
Calls: plotFeatureSingle ... plotFeatureSingle.default -> quantile -> quantile.default
Execution halted
yeswzc commented 4 years ago

I found the reason: After findDAR, there is no significant DARs identified, so the vector idy is empty. It is weird that no significant DARs were found. I will keep on look into this issue.

yeswzc commented 4 years ago

Hi, It turns out when using findDAR on my data. cluster.neg.method = "knn" can not find significant DARs. However, when I try cluster.neg.method="random" or cluster.neg.method="other" (I "hacked" into the code :) ), the output plot is weird. The cluster with the highest z-scored read count (I guess) is not the cluster as we expected. For example, when I sought for DARs in cluster 10, the output showed cluster 9 had the highest (yellow points in figure) but cluster 10 were totally dark, when I sought for DARs in cluster 11, the output showed cluster 2 had the highest.

Except for tested test.method = "exactTest" I also tested "LRT", similar results.

Maybe my data is not applicable?