I did the column subsetting as follows and checked str() of layers ;
nt<-intersect(selected.genes, colnames(ann))
ann.mini<-ann[, int]
str(ann.mini)
str(ann.mini$layers)
List of 2
$ spliced :Formal class 'dgRMatrix' [package "Matrix"] with 6 slots
.. ..@ p : int [1:9083] 0 2487 2815 4760 5115 6431 9226 10608 12898 13826 ...
.. ..@ j : int [1:13011806] 11 19 20 34 43 44 47 50 71 78 ...
.. ..@ Dim : int [1:2] 9082 18775
.. ..@ Dimnames:List of 2
.. .. ..$ : NULL
.. .. ..$ : NULL
.. ..@ x : num [1:13011806] 1 1 1 2 4 1 5 1 5 3 ...
.. ..@ factors : list()
$ unspliced:Formal class 'dgRMatrix' [package "Matrix"] with 6 slots
.. ..@ p : int [1:9083] 0 1508 1614 2739 3136 4047 5677 6279 7397 8016 ...
.. ..@ j : int [1:6962033] 2 9 15 20 24 27 33 34 46 50 ...
.. ..@ Dim : int [1:2] 9082 18775
.. ..@ Dimnames:List of 2
.. .. ..$ : NULL
.. .. ..$ : NULL
.. ..@ x : num [1:6962033] 1 1 1 1 1 1 2 2 1 2 ...
.. ..@ factors : list()
This is not a major problem since I can easily restore dimnames of the layers but is this a bug or normal behavior of the ann obj subsetting ?
I did the column subsetting as follows and checked str() of layers ;
This is not a major problem since I can easily restore dimnames of the layers but is this a bug or normal behavior of the ann obj subsetting ?