Hello,
We are interested in this tool, but got frustrated when running it.
Platform: Windows 11, R 4.2.0
STAAR Version: 0.9.8
Data: 1,225 samples, 561,187 variants (binary phenotype)
The Problem
When running STAAR analysis, I get this error:
Error: matrix multiplication: incompatible matrix dimensions: 1x1225 and 1000x859
My code:
library(STAAR)
Fit null model
null_model <- fit_null_glmmkin(
fixed = phenotype ~ Age + Menopause + HRT + PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8 + PC9 + PC10,
data = analysis_data_complete,
id = "id",
kins = kins,
family = binomial(link="logit")
)
Run STAAR
result <- STAAR(
genotype = geno_filtered[1:1000, ],
obj_nullmodel = null_model,
annotation_phred = NULL,
rare_maf_cutoff = 0.01,
rv_num_cutoff = 2,
rv_num_cutoff_max = 1e+09
)
Diagnostics (All Pass)
✓ Genotype dimensions: 561,187 variants × 1,225 samples
✓ Null model samples: 1,225
✓ Sample IDs match between genotype and null model
✓ Missing values: <10%
✓ Null model converged: TRUE
Question
What does the "859" dimension represent in the error, and how can I resolve this?
Is this a known issue with STAAR on Windows/R 4.2.0?
Hello,
We are interested in this tool, but got frustrated when running it.
Platform: Windows 11, R 4.2.0
STAAR Version: 0.9.8
Data: 1,225 samples, 561,187 variants (binary phenotype)
The Problem
When running STAAR analysis, I get this error:
Error: matrix multiplication: incompatible matrix dimensions: 1x1225 and 1000x859
My code:
library(STAAR)
Fit null model
null_model <- fit_null_glmmkin(
fixed = phenotype ~ Age + Menopause + HRT + PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8 + PC9 + PC10,
data = analysis_data_complete,
id = "id",
kins = kins,
family = binomial(link="logit")
)
Run STAAR
result <- STAAR(
genotype = geno_filtered[1:1000, ],
obj_nullmodel = null_model,
annotation_phred = NULL,
rare_maf_cutoff = 0.01,
rv_num_cutoff = 2,
rv_num_cutoff_max = 1e+09
)
Diagnostics (All Pass)
✓ Genotype dimensions: 561,187 variants × 1,225 samples
✓ Null model samples: 1,225
✓ Sample IDs match between genotype and null model
✓ Missing values: <10%
✓ Null model converged: TRUE
Question
What does the "859" dimension represent in the error, and how can I resolve this?
Is this a known issue with STAAR on Windows/R 4.2.0?