Skip to content

Longitudinal data GridLMM_GWAS error #12

@ryshi06

Description

@ryshi06

Hi @deruncie,

I have a dataset with 400+ subjects, and each of them have several outcome measures, ranging from 2 to 21 measures per subject unequally. I want to run a random intercept model with all possible outcome measures and covariates. The model run in lmer should be simply y~SNP + covariates + (1|subject). Since the outcome measures are rates, which includes time, so I do not want to add time in the model. I tried the manual script for the larger GWAS, and build the kinship matrix using GEMMA software. I have checked the number of rows of the matrix is the same as the dataset and the genotype file. But I have an error saying task 1 failed - 'names' attribute [1] must be the same length as the vector [0]

The code I used is:
full_results=foreach(chunk=chunks,i=1:2,.combine = 'rbind') %do% { # length(chunks) print(sprintf('Running chunk %d',i)) X_chunk = snpStats::read.plink('plinkfile', select.snps = chunk) X_chunk = as(X_chunk$genotypes,'numeric') # convert to numeric matrix # Run the GWAS for the chunk results_chunk = GridLMM_GWAS(formula=y~1+ covariates + (1|id), test_formula = ~1, reduced_formula = ~0, data = data, X = X_chunk, X_ID = 'sample.id', fillNAX = TRUE, relmat = list(sample.id = mtx), V_setup = V_setup, # This tells the function to reuse existing matrices h2_start = null_model$results[,c('id.REML')], method = 'REML', verbose = F) results_chunk$results }
Thanks,
Ruyu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions