stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
330 stars 88 forks source link

CoveragePlot function: Unable to subset cells #1724

Closed wenweixiong closed 5 months ago

wenweixiong commented 5 months ago

Hi, I hope to plot the coverage track for just a subset cell of cells. I have specified the vector of cell ids to the cells argument but the following error was returned:

plot <- CoveragePlot(object=object,
                     cells=cell.ids,
                     region="chr3-111540300-111544300",
                     ranges=StringToGRanges("chr3-111540300-111544300"),
                     group.by="cell_type"
                     ) &
                     scale_fill_manual(values=levels.cell_type_color)

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'colSums': subscript out of bounds

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_3.4.4      Signac_1.13.9002   Seurat_5.0.1       SeuratObject_5.0.2
[5] sp_2.1-2           data.table_1.14.10
timoast commented 5 months ago

Hi @wenweixiong, this should now be fixed on the develop branch