Hello!
I have been using A Guide to QTL mapping to help me run sex as an additive and interactive covariate, and I had a couple questions relating to the code and the output.
In the book, sex and cross are used as covariates, but for my data, I only have sex as a covariate. I modified the code as seen below, but I wasn't sure if I handled the interactive covariate correctly. When I run the interactive covariate code to determine LOD significance, the LOD score is 151 for the 5% threshold. I'm not sure if that is the correct score and I'm overthinking it, or if I handled the code incorrectly leading to an inflated LOD threshold.
Here is the code I used:
#addcovar
#use mydataf1 for step.genoprob
sex<-mydataf1$pheno$sex
out.0<-scanone(mydataf1, method="hk")
out.a<-scanone(mydataf1, addcovar=sex, method="hk")
plot(out.a,out.0, ylab="LOD score", col=c("red","black"),alternate.chrid=TRUE,bandcol="gray87")
operm.0<-scanone(mydataf1, n.perm=1000, perm.Xsp=TRUE)
operm.a<-scanone(mydataf1, addcovar=sex, n.perm=1000, perm.Xsp=TRUE)
out.both<-c(out.0,out.a, labels=c("nocovar","covar"))
operm.both<-cbind(operm.0, operm.a, labels=c("nocovar","covar"))
summary(out.both, perms=operm.both, format="allpeaks", alpha=0.5, pvalues=TRUE)
out.i<-scanone(mydataf1, addcovar=sex, intcovar=sex, method="hk")
plot(out.i, out.i-out.a, ylab="LOD Score", col=c("blue", "red"), alternate.chrid=TRUE)
set.seed(54955149)
operm.a<-scanone(mydataf1, addcovar=sex, n.perm=1000, perm.Xsp=TRUE, verbose=FALSE)
set.seed(54955149)
operm.i<-scanone(mydataf1, addcovar=sex, intcovar=sex, n.perm=1000, perm.Xsp=TRUE, verbose=FALSE)
out.ia<-c(out.i, out.i-out.a, labels=c("f", "i"))
operm.ia<-cbind(operm.i, operm.i-operm.a, labels=c("f", "i"))
summary(out.ia, perms=operm.ia, alpha=0.05, pvalues=TRUE, lodcolumn=2)
Output for last line of code:
Autosome LOD thresholds (1000 permutations)
lod.f lod.i
5% 151 148
X chromosome LOD thresholds (14561 permutations)
lod.f lod.i
5% 3.84 2.77
There is a clear sex difference in the data, but I want to make sure I am running and interpreting the results from the addcovar and intcovar runs correctly.
Thank you for your time!
Adrianna