dmgatti / DOQTL

QTL mapping for Diversity Outbred mice (and other multi-founder advanced intercrosses)
14 stars 14 forks source link

scanone.perm used to fail on >1 "sex" columns #1

Closed simecek closed 5 years ago

simecek commented 9 years ago

scanone.perm fails on my data giving me error

  Error in probs[females, , X.snps] : subscript out of bounds

I believe the problem occurs when there is more that one column incl. "sex" (like "Age:SexM"). I suggest to replace line 86

sex.col = grep("sex", colnames(addcovar), ignore.case = TRUE)

by

sex.col = grep("^sex", colnames(addcovar), ignore.case = TRUE)

as in scanone or even better

sex.col = grep("sex", colnames(addcovar), ignore.case = TRUE)[1]