Closed kbroman closed 5 years ago
I'm having trouble reproducing this problem.
Okay now I've got it, for the case of an intercross, and doesn't seem to need covariates to be a problem.
data(fake.f2)
fake.f2 <- calc.genoprob(fake.f2)
fake.f2$pheno[5,1] <- NA
# this gives an error:
out1 <- stepwiseqtl(fake.f2, method="hk", max.qtl=4, additive.only=TRUE)
# this works:
qtl <- makeqtl(fake.f2, chr=c(1,4), pos=c(67.8, 29.5), what="prob")
out2 <- stepwiseqtl(fake.f2, qtl=qtl, method="hk", max.qtl=4, additive.only=TRUE)
Okay I see the problem. If there are X-chromosome-specific covariates, need to subset those.
If there are missing phenotypes,
stepwiseqtl()
seems to subset the phenotypes but not the covariates so you get an error like this: