You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Reference Expression Matrices (exprmat): Used to estimate marginal distributions.
40
+
***Subject-level (sbj): For subject-level expression counts.
41
+
***Cell-level (cel): For individual cell expression counts.
42
+
***Cell Type Expression Profiles (cteprf): Defines mean expression per gene across cell types.
43
+
***Co-expression Programs (coexPrograms): Specifies gene groups that co-express and their correlation.
44
+
***Subject-level (sbj): For co-expression across subjects. Cell types sharing a program synchronize at the subject level.
45
+
***Cell-level (cel): For co-expression within individual cells.
46
+
47
+
### 3. Fit Marginal Distribution Models
47
48
This step fits Gamma distribution models for each gene. A third-degree polynomial model (lm(variance ~ poly(mean, 3, raw = TRUE))) predicts variance from mean; residuals add variability.
5.SimulateSubject-Level Means (Subject-LevelVariability)
56
+
### 5. Simulate Subject-Level Means (Subject-Level Variability)
56
57
This generates subject-level mean expression for each gene and cell type, including subject-level co-expression patterns. Internal private$utils$generateVals is used for sampling.
Subject-level means adjust cell-level distribution models, creating unique cell-level Gamma distribution parameters for each gene, cell type, and subject. The original cell-level distribution's mean is adjusted while maintaining the relative variance (coefficient of variation, variance / mean) for each gene.
7. Convert Cell-Level Distributions to Final Expressions
65
+
### 7. Convert Cell-Level Distributions to Final Expressions
65
66
Baseline cells are transformed to reflect subject-level variability. This involves converting baseline cell expressions to p-values using their original Gamma distribution parameters, then transforming these p-values back into new expression values using the subject-specific cell-level parameters.
•api$GENERATE_CC_SPECS(nBkSamples, nTotalCells, baselineProps, sdFrac): Generates cellular composition specifications. It produces a matrix specifying cell counts per cell type for subjects, using baselineProps (proportion of each cell type) and sdFrac (standard deviation fraction) for sampling from a normal distribution.
74
+
***api$GENERATE_CC_SPECS(nBkSamples, nTotalCells, baselineProps, sdFrac): Generates cellular composition specifications. It produces a matrix specifying cell counts per cell type for subjects, using baselineProps (proportion of each cell type) and sdFrac (standard deviation fraction) for sampling from a normal distribution.
74
75
# Example: Generate specs for 5 subjects, 1000 total cells, with baseline proportions
0 commit comments