out_snps <- scan1(snpprobs,pheno=obj$pheno[,measure_name,drop=F], kinship_loco, Xcovar=Xcovar, addcovar=addcovar,intcovar=intcovar, cores=4)
rint.RetroFat
EE3B9ACF78 1.4351520
EE3B9ACF79 -0.8117843
EE3B9ACF7C -1.1212322
EE3B9ACF7E 0.7566598
EE3B9ACF7F -1.9093349
EE3B9ACF86 -0.1584156
> head(Xcovar)
sex
EE3B9ACF78 1
EE3B9ACF79 0
EE3B9ACF7C 0
EE3B9ACF7E 1
EE3B9ACF7F 0
EE3B9ACF86 1
> head(intcovar)
(Intercept) SexM DietLOW.FAT
EE3B9ACF78 1 1 0
EE3B9ACF79 1 0 0
EE3B9ACF7C 1 0 1
EE3B9ACF7E 1 1 0
EE3B9ACF7F 1 0 1
EE3B9ACF86 1 1 1
> head(addcovar)
(Intercept) Litter.Size PrimaryGMG PrimaryOYKS PrimaryTVB
EE3B9ACF78 1 7 0 1 0
EE3B9ACF79 1 9 0 1 0
EE3B9ACF7C 1 9 0 1 0
EE3B9ACF7E 1 9 0 1 0
EE3B9ACF7F 1 9 0 1 0
EE3B9ACF86 1 13 0 1 0
I would like to ask:
1. For the interpretation, I cannot say these QTLs are the ones interacted with Diet (and Sex) and affecting the trait, is it correct?
Is simple anova trait~QTL*Diet*Sex good enough to test for the interaction between QTL and Diet/Sex?
2. For significant threshold, can I just use function? apr = allele probability
operm <- scan1perm(apr, pheno=obj$pheno[,measure_name,drop=F], kinship_loco,addcovar=addcovar, intcovar=intcovar, Xcovar=Xcovar, n_perm=1000, cores=4)
Thank you!
Thu
> head(out_snps)
rint.fat.dif
chr1_290509 0.6144129
chr1_842375 0.2042367
chr1_1113500 0.6651967
chr1_1421425 0.2553162
chr1_1780364 1.7111909
chr1_1891852 0.7033188
> head(out_snps_intD)
rint.fat.dif
chr1_290509 1.2329448
chr1_842375 0.9172207
chr1_1113500 1.3402388
chr1_1421425 0.9308256
chr1_1780364 2.6829722
chr1_1891852 1.0829739
> head(out_com)
add intD dif
chr1_290509 0.6144129 1.2329448 0.6185319
chr1_842375 0.2042367 0.9172207 0.7129840
chr1_1113500 0.6651967 1.3402388 0.6750421
chr1_1421425 0.2553162 0.9308256 0.6755094
chr1_1780364 1.7111909 2.6829722 0.9717813
chr1_1891852 0.7033188 1.0829739 0.3796552
> class(out_snps)
[1] "scan1" "matrix"
> class(out_com)
[1] "data.frame"
Many thanks,
Thu
Karl answered your question about scan1_blup().
eQTL mapping is largely the same as mapping a few phenotypes, with at least two differences: compute time and multiple testing. You can’t easily run 1000 permutations on 20,000 genes. So we transform the data to make all of the gene have the same distribution and then split the mapping up on a computing cluster. And we use a p-value adjustment to set the significance threshold.
We transform all of the expression values y ranking them and then taking quantiles from the normal distribution. We call this “RankZ” transforming the data.
rankZ = function(x) {
x = rank(x, na.last = "keep", ties.method = "average") / (sum(!is.na(x)) + 1)
return(qnorm(x))
}
This makes the distribution of each phenotype the same and allows you to run permutations on one gene to get thresholds for all of the genes. I usually break the job up into batches of 100 genes and kick off each set on the cluster as a separate job. Then harvest QTL above your significance threshold. We will then get p-values for each LOD score from the permutation LOD scores to get and FDR for each gene. There is a package called “qvalue” that I’ve used. Or sometimes, we’ll select a LOD threshold and plot QTL vs gene positions. This adjustment is a bit tricky because, if gene A has a QTL at a given position, then if gene B has a QTL in the exact same location, you might relax the significance threshold. But you can make plots at different FDR values.
That’s a very rough overview with lots of details left out.
Dan
--
You received this message because you are subscribed to the Google Groups "R/qtl2 discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
rqtl2-disc+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rqtl2-disc/1a9059fb-c639-40c6-b62e-41968fa238bdn%40googlegroups.com.