55# scores, distance matrices, and anything else, is computed
66# on the different types of data.
77
8- setClassUnion(' numericORNULL' , members = c(' numeric' , ' NULL' ))
9- setClassUnion(' matrixORSparse' , members = c(" matrix" , " dgeMatrix" , " dgCMatrix" , " dgTMatrix" ))
8+ setClassUnion(" numericORNULL" , members = c(" numeric" , " NULL" ))
9+ setClassUnion(" matrixORSparse" , members = c(" matrix" , " dgCMatrix" ))
10+ setClassUnion(" matrixORNULL" , members = c(" matrix" , " NULL" ))
11+ setClassUnion(" dataframeORNULL" , members = c(" data.frame" , " NULL" ))
1012
1113Cluster <- setClass ("Cluster ",
1214 slots = c(
@@ -17,16 +19,35 @@ Cluster <- setClass("Cluster",
1719 )
1820)
1921
20- ProjectionData <- setClass ("ProjectionData ",
22+ NormData <- setClass ("NormData ",
2123 slots = c(
22- Consistency = " matrix" ,
23- pValue = " matrix" ,
24- FDR = " matrix" ,
25- sigClusters = " list"
26- ))
24+ colOffsets = " numeric" ,
25+ colScaleFactors = " numeric" ,
26+ rowOffsets = " numeric" ,
27+ rowScaleFactors = " numeric" ,
28+ data = " Matrix"
29+ ),
30+ validity = function (object ){
31+ isValid <- nrow(object @ data ) == length(object @ rowOffsets )
32+
33+ isValid <- isValid && (
34+ nrow(object @ data ) == length(object @ rowScaleFactors ))
35+
36+ isValid <- isValid && (
37+ ncol(object @ data ) == length(object @ colOffsets ))
38+
39+ isValid <- isValid && (
40+ ncol(object @ data ) == length(object @ colScaleFactors ))
2741
28- PCAnnotatorData <- setClass ("PCAnnotatorData ",
29- slots = c(pearsonCorr = " matrix" )
42+ return (isValid )
43+ },
44+ )
45+
46+ LCAnnotatorData <- setClass ("LCAnnotatorData ",
47+ slots = c(
48+ pearsonCorr = " matrix" ,
49+ pearsonCorrProteins = " matrixORNULL"
50+ )
3051)
3152
3253Trajectory <- setClass ("Trajectory ",
@@ -71,72 +92,48 @@ Signature <- setClass("Signature",
7192 metaData = " "
7293))
7394
74- setClassUnion(" ProjectionDataOrNULL" , members = c(" ProjectionData" , " NULL" ))
75- setClassUnion(" PCAnnotatorDataOrNULL" , members = c(" PCAnnotatorData" , " NULL" ))
95+ setClassUnion(" LCAnnotatorDataOrNULL" , members = c(" LCAnnotatorData" , " NULL" ))
7696
7797Vision <- setClass ("Vision ",
7898 slots = c(
79- nomodel = " logical" ,
80- projection_genes = " character" ,
81- weights = " matrix" ,
82- threshold = " numeric" ,
83- sig_norm_method = " character" ,
84- sig_score_method = " character" ,
8599 exprData = " matrixORSparse" ,
100+ proteinData = " matrixORSparse" ,
86101 unnormalizedData = " matrixORSparse" ,
87- housekeepingData = " character" ,
88102 sigData = " list" ,
89103 metaData = " data.frame" ,
90- perm_wPCA = " logical" ,
91- pool = " logical" ,
92- sigScores = " matrix" ,
93- cellsPerPartition = " numeric" ,
94- SigConsistencyScores = " ProjectionDataOrNULL" ,
95- ClusterSigScores = " list" ,
96- TrajectoryConsistencyScores = " ProjectionDataOrNULL" ,
97- PCAnnotatorData = " PCAnnotatorDataOrNULL" ,
98- projection_methods = " character" ,
104+ SigScores = " matrix" ,
105+ LocalAutocorrelation = " list" ,
106+ TrajectoryAutocorrelation = " list" ,
107+ ClusterComparisons = " list" ,
108+ LCAnnotatorData = " LCAnnotatorDataOrNULL" ,
99109 Projections = " list" ,
100110 TrajectoryProjections = " list" , # list of TrajectoryProjection
101111 SigGeneImportance = " list" ,
102- pools = " list" ,
103- inputProjections = " list" ,
104- name = " character" ,
105- num_neighbors = " numericORNULL" ,
106- latentSpace = " matrix" ,
107- latentTrajectory = " Trajectory" ,
108- version = " numeric" ,
109- selections = " list" ,
110- params = " list" ),
112+ Pools = " list" ,
113+ LatentSpace = " matrix" ,
114+ LatentTrajectory = " Trajectory" ,
115+ Viewer = " list" ,
116+ params = " list" ,
117+ version = " numeric"
118+ ),
111119 prototype = list (
112- nomodel = FALSE ,
113- weights = matrix (NA , 1 , 1 ),
114- threshold = 0 ,
115- sig_norm_method = " znorm_rows" ,
116120 exprData = matrix (NA , 1 , 1 ),
121+ proteinData = matrix (NA , 1 , 1 ),
117122 unnormalizedData = matrix (NA , 1 , 1 ),
118- housekeepingData = character (),
119123 sigData = list (),
120124 metaData = data.frame (),
121- perm_wPCA = FALSE ,
122- pool = FALSE ,
123- sigScores = matrix (NA , 1 , 1 ),
124- cellsPerPartition = 100 ,
125- SigConsistencyScores = NULL ,
126- ClusterSigScores = list (),
127- TrajectoryConsistencyScores = NULL ,
128- PCAnnotatorData = NULL ,
129- projection_methods = character (),
125+ SigScores = matrix (NA , 1 , 1 ),
126+ LocalAutocorrelation = list (),
127+ TrajectoryAutocorrelation = list (),
128+ ClusterComparisons = list (),
129+ LCAnnotatorData = NULL ,
130130 Projections = list (),
131131 TrajectoryProjections = list (),
132132 SigGeneImportance = list (),
133- pools = list (),
134- inputProjections = list (),
135- name = " " ,
136- num_neighbors = NULL ,
137- latentSpace = matrix (NA , 1 , 1 ),
138- latentTrajectory = NULL ,
139- version = 1.11 ,
140- selections = list (),
141- params = list ()
133+ Pools = list (),
134+ LatentSpace = matrix (NA , 1 , 1 ),
135+ LatentTrajectory = NULL ,
136+ Viewer = list (),
137+ params = list (),
138+ version = 1.2
142139))
0 commit comments