qtl/0000755000176200001440000000000013615575545011072 5ustar liggesusersqtl/NAMESPACE0000644000176200001440000002310713576462636012316 0ustar liggesusersuseDynLib(qtl, .registration=TRUE) # Import package dependencies importFrom(graphics,plot) importFrom(graphics,par) importFrom(graphics,abline) importFrom(graphics,points) importFrom(graphics,lines) importFrom(graphics,text) importFrom(graphics,mtext) importFrom(graphics,axis) importFrom(graphics,title) importFrom(graphics,arrows) importFrom(graphics,barplot) importFrom(graphics,contour) importFrom(graphics,grid) importFrom(graphics,hist) importFrom(graphics,image) importFrom(graphics,layout) importFrom(graphics,legend) importFrom(graphics,persp) importFrom(graphics,plot.new) importFrom(graphics,plot.window) importFrom(graphics,polygon) importFrom(graphics,rect) importFrom(graphics,rug) importFrom(graphics,segments) importFrom(graphics,xspline) importFrom(stats,Gamma) importFrom(stats,as.formula) importFrom(stats,binomial) importFrom(stats,chisq.test) importFrom(stats,dnorm) importFrom(stats,fitted) importFrom(stats,glm) importFrom(stats,hatvalues) importFrom(stats,heatmap) importFrom(stats,kruskal.test) importFrom(stats,lm) importFrom(stats,median) importFrom(stats,model.matrix) importFrom(stats,optim) importFrom(stats,optimize) importFrom(stats,pchisq) importFrom(stats,pf) importFrom(stats,printCoefmat) importFrom(stats,qnorm) importFrom(stats,quantile) importFrom(stats,resid) importFrom(stats,rnorm) importFrom(stats,runif) importFrom(stats,sd) importFrom(stats,shapiro.test) importFrom(stats,terms) importFrom(stats,uniroot) importFrom(stats,var) importFrom(stats,weighted.mean) importFrom(utils,read.table) importFrom(utils,write.table) importFrom(utils,packageVersion) importFrom(utils,packageDescription) importFrom(parallel,makeCluster) importFrom(parallel,stopCluster) importFrom(parallel,clusterApply) importFrom(parallel,mclapply) importFrom(parallel,clusterApplyLB) importFrom(parallel,clusterEvalQ) importFrom(parallel,nextRNGStream) importFrom(parallel,parLapply) importFrom(grDevices,topo.colors) importFrom(grDevices,terrain.colors) importFrom(grDevices,heat.colors) importFrom(grDevices,cm.colors) importFrom(grDevices,gray) importFrom(grDevices,rgb) importFrom(grDevices,rainbow) importFrom(grDevices,col2rgb) importFrom(grDevices,dev.off) importFrom(grDevices,png) # export functions for users export(table2map) export(flip.order) export(map2table) export(scanonevar) export(scanonevar.meanperm) export(scanonevar.varperm) export(reduce2grid) export(formMarkerCovar) export(nqtl) export(addmarker) export(inferFounderHap) export(pull.genoprob, pull.argmaxgeno, pull.draws) export(nullmarkers) export(scantwopermhk) export(convert2bcsft) export(add.cim.covar, add.threshold, addcovarint, addint) export(addloctocross, addmarkerstointervalmap, addpair, addqtl) export(addtoqtl, allchrsplits, argmax.geno, bayesint) export(calc.errorlod, calc.genoprob, calc.penalties, calc.plod) export(checkAlleles, checkcovar, chrlen, chrnames) export(cim, cleanGeno, comparecrosses, comparegeno) export(compareorder, convert2riself, convert2risib, convert2sa) export(countXO, create.map, drop.dupmarkers, drop.markers) export(drop.nullmarkers, dropfromqtl, droponemarker) export(effectplot, effectscan, est.map, est.rf) export(fill.geno, find.flanking, find.marker, find.markerindex) export(find.markerpos, find.pheno, find.pseudomarker, find.pseudomarkerpos) export(findDupMarkers, fitqtl, fitstahl, flipcross, formLinkageGroups) export(genAllPartitions, geno.crosstab, geno.image, geno.table) export(getgenonames, getid, getsex, groupclusteredheatmap) export(imf.cf, imf.h, imf.k, imf.m, imf.stahl) export(inferredpartitions, interpPositions, jittermap, locatemarker, locateXO) export(lodint, makeqtl, markerlrt, markernames) export(mf.cf, mf.h, mf.k, mf.m, mf.stahl) export(movemarker, mqm_version, mqmaugment) export(mqmautocofactors, mqmextractmarkers) export(mqmfind.marker, mqmgetmodel, mqmpermutation) export(mqmplot.circle, mqmplot.cistrans, mqmplot.clusteredheatmap, mqmplot.cofactors) export(mqmplot.directedqtl, mqmplot.heatmap, mqmplot.multitrait, mqmplot.permutations) export(mqmplot.singletrait, mqmprocesspermutation, mqmscan, mqmscanall) export(mqmscanfdr, mqmsetcofactors, mqmtestnormal) export(nchr, nind, nmar, nmissing, nphe, nqrank, ntyped, orderMarkers) export(phenames, pickMarkerSubset, plotErrorlod, plotGeno, plotInfo, plot.map, plotMap) export(plotMissing, plotPheno, plotPXG, plotRF, plotLodProfile) export(plotModel, polyplot, pull.geno, pull.map, pull.markers, pull.pheno, pull.rf) export(qtlversion, read.cross, readMWril, refineqtl, reorderqtl, replace.map) export(replacemap, replaceqtl, rescalemap, ripple) export(scanall, scanone, scanoneboot, scanPhyloQTL, scanqtl, scantwo) export(shiftmap, sim.cross, sim.geno, sim.map, simFounderSnps, simPhyloQTL) export(simulatemissingdata, stepwiseqtl, strip.partials, subrousummaryscantwo) export(summaryMap, summary.map, switch.order, switchAlleles, top.errorlod) export(totmar, transformPheno, tryallpositions, typingGap, write.cross, xaxisloc.scanone) export(clean, condense, convert) export(summaryScantwoOld) export(reviseXdata) # used by funqtl export(checkStepwiseqtlStart) export(checkformula) export(countqtlterms) export(deparseQTLformula) export(fitqtlengine) export(matchchr) export(parseformula) export(reviseqtlnuminformula) # S3 methods S3method("-", scanone) S3method("-", scanoneperm) S3method("-", scantwo) S3method("-", scantwoperm) S3method("+", scanone) S3method("+", scanoneperm) S3method("+", scantwo) S3method("+", scantwoperm) S3method("[", cross) S3method("[", map) S3method("[", scanoneperm) S3method("[", scantwoperm) S3method(c, cross) S3method(c, scanone) S3method(c, scanoneperm) S3method(c, scantwo) S3method(c, scantwoperm) S3method(cbind, scanone) S3method(cbind, scanoneperm) S3method(cbind, scantwo) S3method(cbind, scantwoperm) S3method(clean, cross) S3method(clean, scantwo) S3method(condense, scantwo) S3method(convert, scanone) S3method(convert, scantwo) S3method(convert, map) S3method(max, scanone) S3method(max, scanPhyloQTL) S3method(max, scantwo) S3method(max, scantwocondensed) S3method(plot, cross) S3method(plot, map) S3method(plot, qtl) S3method(plot, rfmatrix) S3method(plot, scanone) S3method(plot, scanoneboot) S3method(plot, scanoneperm) S3method(plot, scanPhyloQTL) S3method(plot, scantwo) S3method(plot, scantwoperm) S3method(print, addcovarint) S3method(print, addint) S3method(print, compactqtl) S3method(print, cross) S3method(print, map) S3method(print, qtl) S3method(print, scanoneboot) S3method(print, scantwo) S3method(print, summary.addpair) S3method(print, summary.compactqtl) S3method(print, summary.cross) S3method(print, summary.fitqtl) S3method(print, summary.map) S3method(print, summary.qtl) S3method(print, summary.ripple) S3method(print, summary.scanone) S3method(print, summary.scanoneperm) S3method(print, summary.scantwo) S3method(print, summary.scantwo.old) S3method(print, summary.scantwoperm) S3method(rbind, scanoneperm) S3method(rbind, scantwoperm) S3method(replacemap, cross) S3method(replacemap, scanone) S3method(replacemap, scantwo) S3method(subset, cross) S3method(subset, map) S3method(subset, scanone) S3method(subset, scanoneperm) S3method(subset, scantwo) S3method(subset, scantwoperm) S3method(summary, addcovarint) S3method(summary, addint) S3method(summary, compactqtl) S3method(summary, cross) S3method(summary, fitqtl) S3method(summary, map) S3method(summary, qtl) S3method(summary, ripple) S3method(summary, scanone) S3method(summary, scanoneboot) S3method(summary, scanoneperm) S3method(summary, scanPhyloQTL) S3method(summary, scantwo) S3method(summary, scantwocondensed) S3method(summary, scantwoperm) S3method(plot, comparegeno) S3method(summary, comparegeno) S3method(print, summary.comparegeno) # Hidden functions # asnumericwithdec # adjust.rf.ri # calc.genoprob.special # calc.pairprob # calcPermPval # calculatedensity # charround # checkdistances # checkformula # checkPhyloCrosses # checkPhyloPartition # checkStepwiseqtlStart # circlelocations # convertMWril # countqtlterms # deparseQTLformula # discan # drawcirculargenome # drawspline # dropfromqtlformula # dropXcol # effectplot.calmeanse # effectplot.getmark # estimatemarkerlod # expandf2covar # fitqtlengine # fitstahl.este # fitstahl.este.sub # fitstahl.estp # fitstahl.estp.sub # fitstahl.estpe # fitstahl.estpe.sub # fixX4write # fixXgeno.bc # fixXgeno.f2 # getChr # getchromosomelength # getgenomelength # getThird # grab.arg.names # interpmap # interpmap4scantwo # genotab.em # LikePheVector # locationtocircle # loopthroughmulti # makeSSmap # markerforwsel # markerforwself2 # markerloglik # matchchr # mqmaugment_on_cofactors # mqmextractpseudomarkers # orderMarkers.sub # ourline # ourstop # parseformula # mybinaryrep # plot.effectscan # printQTLformulanicely # qtlByPartition # qtlformulasymmetric # read.cro.qtlcart # read.cross.csv # read.cross.csvs # read.cross.gary # read.cross.karl # read.cross.mm # read.cross.qtlcart # read.cross.qtx # read.map.qtlcart # read.maps.mm # reorgRIargmax # reorgRIdraws # reorgRIgenoprob # reorgRIpairprob # revisecovar # reviseqtlnuminformula # revisescantwodf # reviseXdata # ripple.perm.sub # ripple.perm1 # ripple.perm2 # rippleSnowCountxo # rippleSnowLik # roundqtlpos # scanone.perm # scanone.perm.engine # scanoneXnull # scantwo.perm # scantwo.perm.engine # scantwoperm2scanoneperm # scoremissingmarkers # sim.cross.4way # sim.cross.bc # sim.cross.f2 # sim.ril # snowCoreALL # snowCoreBOOT # sortPhyloPartitions # sim.bcg # stepsize # stringPhenoToInt # testchr # vbscan # write.cross.csv # write.cross.gary # write.cross.mm # write.cross.qtlcart qtl/README.md0000644000176200001440000000503313526005456012340 0ustar liggesusers## R/qtl: A QTL mapping environment [![Build Status](https://travis-ci.org/kbroman/qtl.svg?branch=master)](https://travis-ci.org/kbroman/qtl) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/qtl)](https://cran.r-project.org/package=qtl) **Authors**: Karl W Broman and Hao Wu, with ideas from Gary Churchill and Śaunak Sen and contributions from Danny Arends, Robert Corty, Timothée Flutre, Ritsert Jansen, Pjotr Prins, Lars Rönnegård, Rohan Shah, Laura Shannon, Quoc Tran, Aaron Wolen, and Brian Yandell [R/qtl](https://rqtl.org) is an extensible, interactive environment for mapping quantitative trait loci (QTL) in experimental crosses. It is implemented as an add-on package for the freely available and widely used statistical language/software [R](https://www.r-project.org). The development of this software as an add-on to R allows us to take advantage of the basic mathematical and statistical functions, and powerful graphics capabilities, that are provided with R. Further, the user will benefit by the seamless integration of the QTL mapping software into a general statistical analysis program. Our goal is to make complex QTL mapping methods widely accessible and allow users to focus on modeling rather than computing. A key component of computational methods for QTL mapping is the hidden Markov model (HMM) technology for dealing with missing genotype data. We have implemented the main HMM algorithms, with allowance for the presence of genotyping errors, for backcrosses, intercrosses, and phase-known four-way crosses. The current version of R/qtl includes facilities for estimating genetic maps, identifying genotyping errors, and performing single-QTL genome scans and two-QTL, two-dimensional genome scans, by interval mapping (with the EM algorithm), Haley-Knott regression, and multiple imputation. All of this may be done in the presence of covariates (such as sex, age or treatment). One may also fit higher-order QTL models by multiple imputation and Haley-Knott regression. ### License The R/qtl package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details. A copy of the GNU General Public License, version 3, is available at qtl/data/0000755000176200001440000000000012770016226011766 5ustar liggesusersqtl/data/bristleX.RData0000644000176200001440000000474113615343520014504 0ustar liggesusersBZh91AY&SY0Z?B0 @X! {>>YDv:FíIRj' SM#'xO)&FM 42= TiF2m%h=H ##M#dɐ  h4d hdцJ44! 4z@d@!R*OʃAh4@hM?Tz 4 Ɠ5SCh b4##!EjM6 jOj 4ڍ=6h=@=@=OSDHUQUI&o~ ?u^S_t\+Vá2}b;20+-Z΂Qcdd3Nm=MV <{ش a$K$QDL3!I0HK50L4SBLDEDK3A A @4,420JE010,2  ]ڐނ$m3&$Z&bB&X(Za(& &%I$ H`b ! z032HM4+ L4A0$12ALC02DK%T@А04kqitPITlT9GؐX*:1A9C*@LmCʱB@HLȀ6BcF -9s7I$I$I$I$I$I$I$I$I&0>v Ab@+\/t{KkpUb@]2Y1?ULҗŮbv7ħ"]f8ؠUUMֲƫd\.L+/Ia6J:Ƨ%sr 6ևdIY*]/6su=0mfOG5_,,+~zZ[,ɖvaSg ])I[2CW,e*̘-˫U2(Y;u0Vv 'M:۩-[Om{_}vEiuЀ)-P qa"Pn4c+p[b`2΁@4-B֩+It.4mlle%iR6Z餡.Ub\ۥW! *X#H,n%(I@It"IKfe 0J)iNN`}1$&K$VRr c$rF%gbo;5Ȉ A+p*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b6ik,@mDz9ܔFc#f8L< Ϊ1^HEG_ [7:G,ܠkjMY5wV^Nb}$4/+ )aY/,ɶQ;kn%ugeM2|;e Xv KKP +< _󦨕@F uvٳϥ2&XG{^?R? C6(," <`ghu6*$N%QtwZ^;DŽ8B>Uǘ_@t=+i`79X1tin¤e~$Pɹ{pIxÃ;4*VgAf.b + ;$$nA+1fQ%2 gLlRBN`",,6^A*ٽ#)˾sn883mţs BVdI'SC=MmX*Pbo!9trh \FUL_'08H0N Ŷ))mF,/8 2"(So(!ȟxq+`Qytd>(+? :E(csXA~ 32_e-0:9ʿshRCI+2`^вcU@k%c~FӤΗxd}N476@'}K'zu Q;/GZ1+ '\S WQe6!VoT‚^ǰ>ASRiϦq\#cOxrIOSȝ>0 YZqtl/data/map10.RData0000644000176200001440000000223313615343521013621 0ustar liggesusersBZh91AY&SYM5l^l@903\qE"kHFH = ɪ6Ii=G<IOQ=M@mOP C@h4"??UP@@{ڔi3Qb` &bMM `&z*0ǩ#@&0F02d=@d2@3P4=MzFoz:"3VJuZ-*xs3M"cV MTrA4$DF^" $I.v(r| qUM58DD2eU$^Փ0Ք `惟ofj Yuv1<w$S Q0qtl/data/fake.4way.RData0000644000176200001440000003740413615343520014503 0ustar liggesusers7zXZi"6!X>])TW"nRʟxq5(7.Db eOLV<3¸|kX;@3A9αɱUi SdsLAQbj\rD~DmnQΎ>Vhd1Z#EՔKJT(+{4X=/H坙P%f7 RV%xO/]6L+s4nd+J =٢}.Ljz6>l#Zaboa̲F-F[Ne lE{5tD3XJ8᜻ :^>ohGAݏS<5@+<%mK`IKq;^D,vmX5|*O|7,Dû, օšd(ѕ=5z(. 돹eA,74(gWaeY 5EokZkNP"`XbnRvm@zL*eV9,5; tJ|Gj$Vxͩ]hnVMPgpQߢ2?Le:HH%x*>]qJ~ Tegl'KMf{5T`|pǸD byYB=4Ƴk0pE&]pî\DJЪɽdEDCV)ҷe\ a -W7"AbE{5cM7]uuGMWo-4GluS ׃6̱X77Ƣ;tU|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'D.yKfNH pGGvr"ƚEKOő\D9ZC2c0°j+|(*X mVx$B(wYф/J^zTFLdP@\CVSO!Nv!67ZdGylΣի$-ip:(k K tONX{Eҡ(y3a'ղeehfk| [\Ƽ!VSz SIOaɀ9ւ#eUoVUVX]cGgЂ6Gxb2@,azrQC*3sR>( c`TDQzW̰c T'';.n.mU>) P E:L^ H,Erͪ3MjwH8Gd;߰(Zk'BozN:9 0 a1 ͲRLt-1>-ΨQ5@38nX([v̀6Xs.u<(O:J'u0Os^7fpI (/i<ъeiT߰ ç}5~j; %֚ṋ 2[!cA'mPT*A :H#j8ڸ9q~S̑,@@dD s|{-xa .ͼ7~Hmg-H7Bc0t"۰}rX oHw(.| Ogr΁# @mt]Q^ C,4 2M\H&nv C 냒dW<0j=BBFE}3ǵZ|C$40yH(ؘ$YRFBJ, #XAy~|=|}=]n^B/dCu/)2EٙlsDcnG)XUa*潴%\!T.E?F)D C&T#6*`_G$u1o L!c(?guQR縻@~o N5 =A/cەDzt_a@)0&;jU@yF m[YL.-&`2QkW97_E}7*3q;o4~pl-~ܙTZJ#aMKӖ? *SvE-D7ezzq&&eeA~!''TR }#*~zkqۆ2*OR86rnNjNY'؃ˁQ;z("#gĪaMǍA.c) UVbSMBcX2)0 YZqtl/man/0000755000176200001440000000000013576462636011647 5ustar liggesusersqtl/man/scanonevar.Rd0000644000176200001440000000513412770016226014261 0ustar liggesusers\name{scanonevar} \alias{scanonevar} \title{Genome scan for QTL affecting mean and/or variance} \description{Genome scan with a single QTL model for loci that can affect the variance as well as the mean.} \usage{ scanonevar(cross, pheno.col=1, mean_covar=NULL, var_covar=NULL, maxit=25, tol=1e-6, quiet=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This must be a single value (integer index or phenotype name) or a numeric vector of phenotype values, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{mean_covar}{Numeric matrix with covariates affecting the mean.} \item{var_covar}{Numeric matrix with covariates affecting the variances.} \item{maxit}{Maximum number of iterations in the algorithm to fit the model at a given position.} \item{tol}{Tolerance for convergence.} \item{quiet}{If \code{FALSE}, print some information about the course of the calculations.} } \value{ A data frame (with class \code{"scanone"}, in the form output by \code{\link{scanone}}), with four columns: chromosome, position, the -log P-value for the mean effect, and the -log P-value for the effect on the variance. The result is given class \code{"scanone"} } \references{ Ronnegard, L. and Valdar W. (2011) Detecting major genetic loci controlling phenotypic variability in experimental crosses. Genetics 188:435-447 Ronnegard, L. and Valdar W. (2012) Recent developments in statistical methods for detecting genetic loci affecting phenotypic variability. BMC Genetics 13:63 } \author{Lars Ronnegard and Karl Broman} \examples{ data(fake.bc) \dontshow{fake.bc <- fake.bc[18:19,]} fake.bc <- calc.genoprob(fake.bc, step=2.5) out <- scanonevar(fake.bc) color <- c("slateblue", "violetred") plot(out, lod=1:2, col=color, bandcol="gray80") legend("topright", lwd=2, c("mean", "variance"), col=color) # use format="allpeaks" to get summary for each of mean and variance # also consider format="tabByCol" or format="tabByChr" summary(out, format="allpeaks") # with sex and age as covariates covar <- fake.bc$pheno[,c("sex", "age")] out.cov <- scanonevar(fake.bc, mean_covar=covar, var_covar=covar) } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanone}}, \code{\link{calc.genoprob}}, \code{\link{summary.scanoneperm}} } \keyword{models} qtl/man/mqmprocesspermutation.Rd0000644000176200001440000000416713526005076016611 0ustar liggesusers\name{mqmprocesspermutation} \alias{mqmprocesspermutation} \title{Convert mqmmulti objects into a scanoneperm object} \description{ Function to convert \code{mqmmulti} objects into a \code{scanoneperm} object, this allows the use of R/qtl methods for permutation analysis that do not support the output of a multiple QTL scan using mqm's outputstructure. } \usage{ mqmprocesspermutation(mqmpermutationresult = NULL) } \arguments{ \item{mqmpermutationresult}{ \code{mqmmulti} object obtained after performing permutations on a single trait.using the function \code{\link{mqmpermutation}} } } \value{ Output of the algorithm is a \code{scanoneperm} object. See also: \code{\link{summary.scanoneperm}} } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ # QTL at chromosome 3 f2qtl <- c(3,15,1,0) # Mouse genetic map data(map10) \dontshow{map10 <- map10[1:3]} # Simulate a F2 Cross f2cross <- sim.cross(map10,f2qtl,n=100,type="f2") \dontrun{# Bootstrap MQM mapping on the f2cross f2result <- mqmpermutation(f2cross,scanfunction=mqmscan) }\dontshow{f2result <- mqmpermutation(f2cross,scanfunction=mqmscan, n.perm=2, batchsize=2)} # Create a permutation object f2perm <- mqmprocesspermutation(f2result) # What LOD score is considered significant? summary(f2perm) } \keyword{ models } qtl/man/comparecrosses.Rd0000644000176200001440000000146113355127045015153 0ustar liggesusers\name{comparecrosses} \alias{comparecrosses} \title{Compare two cross objects} \description{ Verify that two objects of class \code{cross} have identical classes, chromosomes, markers, genotypes, genetic maps, and phenotypes. } \usage{comparecrosses(cross1, cross2, tol=1e-5)} \arguments{ \item{cross1}{An object of class \code{cross} (must be an intercross). See \code{\link{read.cross}} for details.} \item{cross2}{An object of class \code{cross} (must be an intercross). See \code{\link{read.cross}} for details.} \item{tol}{Tolerance value for comparing genetic map positions and numeric phenotypes.} } \value{None.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) comparecrosses(listeria, listeria) } \seealso{ \code{\link{summary.cross}} } \keyword{utilities} qtl/man/arithscanperm.Rd0000644000176200001440000000362313355127045014765 0ustar liggesusers\name{arithscanperm} \alias{+.scanoneperm} \alias{-.scanoneperm} \alias{+.scantwoperm} \alias{-.scantwoperm} \title{Arithmetic Operators for permutation results} \description{ Add or subtract LOD scores in permutation results from \code{\link{scanone}} or \code{\link{scantwo}}. } \usage{ \special{perm1+perm2} \special{perm1-perm2} } \arguments{ \item{perm1, perm2}{Permutation results from \code{\link{scanone}} or \code{\link{scantwo}}, on the same set of chromosomes and markers.} } \details{ This is used to calculate the sum or difference of LOD scores of two sets of permutation results from \code{\link{scanone}} or \code{\link{scantwo}}. One must be careful to ensure that the permutations are perfectly linked, which will require the use of \code{\link[base:Random]{set.seed}}. } \value{ The same data structure as the input objects, with LOD scores added or subtracted. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=1:2)} fake.bc <- calc.genoprob(fake.bc, step=2.5) # covariates ac <- pull.pheno(fake.bc, c("sex","age")) ic <- pull.pheno(fake.bc, "sex") # set seed theseed <- round(runif(1, 1, 10^8)) set.seed(theseed) # permutations with additive but not the interactive covariate \dontrun{operm.acovar <- scanone(fake.bc, addcovar=ac, n.perm=1000) }\dontshow{operm.acovar <- scanone(fake.bc, pheno.col=1, method="hk", addcovar=ac, n.perm=100) } # re-set the seed set.seed(theseed) # permutations with interactive covariate \dontrun{operm.icovar <- scanone(fake.bc, addcovar=ac, intcovar=ic, n.perm=1000) }\dontshow{operm.icovar <- scanone(fake.bc, pheno.col=1, addcovar=ac, intcovar=ic, method="hk", n.perm=100) } # permutation results for the QTL x covariate interaction operm.gxc <- operm.icovar - operm.acovar # LOD thresholds summary(operm.gxc) } \keyword{arith} qtl/man/pull.draws.Rd0000644000176200001440000000225413355127045014217 0ustar liggesusers\name{pull.draws} \alias{pull.draws} \title{Pull out the genotype imputations from a cross} \description{ Pull out the results of \code{\link{sim.geno}} from a cross as an array. } \usage{pull.draws(cross, chr)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} } \value{ An array containing numeric indicators of the imputed genotypes. Multiple chromosomes are pasted together. The dimensions are individuals by positions by imputations } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) listeria <- sim.geno(listeria, step=5, stepwidth="max", n.draws=8) dr <- pull.draws(listeria, chr=c(5,13)) dr[1:20,1:10,1] } \seealso{ \code{\link{pull.geno}}, \code{\link{pull.genoprob}}, \code{\link{pull.argmaxgeno}}, \code{\link{sim.geno}} } \keyword{utilities} qtl/man/scanonevar.meanperm.Rd0000644000176200001440000000312412770016226016061 0ustar liggesusers\name{scanonevar.meanperm} \alias{scanonevar.meanperm} \title{Permutation test for mean effect in scanonevar} \description{Executes permutations of the genotypes in the mean-effect part of scanonevar} \usage{ scanonevar.meanperm(cross, pheno.col=1, mean_covar=NULL, var_covar=NULL, maxit=25, tol=1e-6, n.mean.perm = 2, seed = 27517, quiet=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This must be a single value (integer index or phenotype name) or a numeric vector of phenotype values, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{mean_covar}{Numeric matrix with covariates affecting the mean.} \item{var_covar}{Numeric matrix with covariates affecting the variances.} \item{maxit}{Maximum number of iterations in the algorithm to fit the model at a given position.} \item{tol}{Tolerance for convergence.} \item{n.mean.perm}{Numeric vector of length one indicates the number of permutations to execute.} \item{seed}{Numeric vector of length one indicates the random seed to start the permutations.} \item{quiet}{If \code{FALSE}, print some information about the course of the calculations.} } \value{ A vector of length \code{n.mean.perm} of the maximum negative log10 p-value that resulted from each permutation. } qtl/man/refineqtl.Rd0000644000176200001440000001226213355127045014115 0ustar liggesusers\name{refineqtl} \alias{refineqtl} \title{Refine the positions of QTL} \description{ Iteratively scan the positions for QTL in the context of a multiple QTL model, to try to identify the positions with maximum likelihood, for a fixed QTL model. } \usage{ refineqtl(cross, pheno.col=1, qtl, chr, pos, qtl.name, covar=NULL, formula, method=c("imp","hk"), model=c("normal", "binary"), verbose=TRUE, maxit=10, incl.markers=TRUE, keeplodprofile=TRUE, tol=1e-4, maxit.fitqtl=1000, forceXcovar=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix to be used as the phenotype. One may also give a character string matching the phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{A QTL object, as produced by \code{\link{makeqtl}}, containing the positions of the QTL. Provide either \code{qtl} or the pair \code{chr} and \code{pos}.} \item{chr}{Vector indicating the chromosome for each QTL; if \code{qtl} is provided, this should not be.} \item{pos}{Vector indicating the positions for each QTL; if \code{qtl} is provided, this should not be.} \item{qtl.name}{Optional user-specified name for each QTL. If \code{qtl} is provided, this should not be.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are indicated as \code{Q1}, \code{Q2}, etc. Covariates are indicated by their names in \code{covar}.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{verbose}{If TRUE, give feedback about progress. If \code{verbose} is an integer > 1, further messages from \code{\link{scanqtl}} are also displayed.} \item{maxit}{Maximum number of iterations.} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid.} \item{keeplodprofile}{If TRUE, keep the LOD profiles from the last iteration as attributes to the output.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit.fitqtl}{Maximum number of iterations for fitting the binary trait model.} \item{forceXcovar}{If TRUE, force inclusion of X-chr-related covariates (like sex and cross direction).} } \details{ QTL positions are optimized, within the context of a fixed QTL model, by a scheme described in Zeng et al. (1999). Each QTL is considered one at a time (in a random order), and a scan is performed, allowing the QTL to vary across its chromosome, keeping the positions of all other QTL fixed. If there is another QTL on the chromosome, the position of the floating QTL is scanned from the end of the chromosome to the position of the flanking QTL. If the floating QTL is between two QTL on a chromosome, its position is scanned between those two QTL positions. Each QTL is moved to the position giving the highest likelihood, and the entire process is repeated until no further improvement in likelihood can be obtained. One may provide either a \code{qtl} object (as produced by \code{\link{makeqtl}}), or vectors \code{chr} and \code{pos} (and, optionally, \code{qtl.name}) indicating the positions of the QTL. If a \code{qtl} object is provided, QTL that do not appear in the model \code{formula} are ignored, but they remain part of the QTL object that is output. } \value{ An object of class \code{qtl}, with QTL placed in their new positions. If \code{keeplodprofile=TRUE}, LOD profiles from the last pass through the refinement algorithm are retained as an attribute, \code{"lodprofile"}, to the object. These may be plotted with \code{\link{plotLodProfile}}. } \references{ Zeng, Z.-B., Kao, C.-H., and Basten, C. J. (1999) Estimating the genetic architecture of quantitative traits. \emph{Genet. Res.} \bold{74}, 279--289. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(2,5))} fake.bc <- calc.genoprob(fake.bc, step=2) qtl <- makeqtl(fake.bc, chr=c(2,5), pos=c(32.5, 17.5), what="prob") rqtl <- refineqtl(fake.bc, qtl=qtl, method="hk") } \seealso{ \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}}, \code{\link{addtoqtl}}, \code{\link{dropfromqtl}}, \code{\link{replaceqtl}}, \code{\link{plotLodProfile}} } \keyword{utilities} qtl/man/sim.geno.Rd0000644000176200001440000000540313615343453013644 0ustar liggesusers\name{sim.geno} \alias{sim.geno} \title{Simulate genotypes given observed marker data} \description{ Uses the hidden Markov model technology to simulate from the joint distribution Pr(g | O) where g is the underlying genotype vector and O is the observed multipoint marker data, with possible allowance for genotyping errors. } \usage{ sim.geno(cross, n.draws=16, step=0, off.end=0, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), stepwidth=c("fixed", "variable", "max")) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{n.draws}{Number of simulation replicates to perform.} \item{step}{Maximum distance (in cM) between positions at which the simulated genotypes will be drawn, though for \code{step=0}, genotypes are drawn only at the marker locations.} \item{off.end}{Distance (in cM) past the terminal markers on each chromosome to which the genotype simulations will be carried.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} \item{stepwidth}{Indicates whether the intermediate points should with fixed or variable step sizes. We recommend using \code{"fixed"}; \code{"variable"} was included for the qtlbim package (\url{https://cran.r-project.org/src/contrib/Archive/qtlbim}). The \code{"max"} option inserts the minimal number of intermediate points so that the maximum distance between points is \code{step}.} } \details{ After performing the forward-backward equations, we draw from \eqn{Pr(g_1 = v | O)}{Pr(g[1] = v | O)} and then \eqn{Pr(g_{k+1} = v | O, g_k = u)}{Pr(g[k+1] = v | O, g[k] = u)}. In the case of the 4-way cross, with a sex-specific map, we assume a constant ratio of female:male recombination rates within the inter-marker intervals. } \value{ The input \code{cross} object is returned with a component, \code{draws}, added to each component of \code{cross$geno}. This is an array of size [n.ind x n.pos x n.draws] where n.pos is the number of positions at which the simulations were performed and n.draws is the number of replicates. Attributes \code{"error.prob"}, \code{"step"}, and \code{"off.end"} are set to the values of the corresponding arguments, for later reference. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- sim.geno(fake.f2, step=2, n.draws=8) } \seealso{ \code{\link{calc.genoprob}}, \code{\link{argmax.geno}} } \keyword{utilities} qtl/man/inferFounderHap.Rd0000644000176200001440000000334613355127045015206 0ustar liggesusers\name{inferFounderHap} \alias{inferFounderHap} \title{Crude reconstruction of founder haplotypes in multi-parent RIL} \description{ Uses groups of adjacent markers to infer the founder haplotypes in SNP data on multi-parent recombinant inbred lines. } \usage{ inferFounderHap(cross, chr, max.n.markers=15) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Indicator of chromosome to consider. If multiple chromosomes are selected, only the first is used.} \item{max.n.markers}{Maximum number of adjacent markers to consider.} } \details{ We omit SNPs for which any of the founders are missing. We then consider groups of adjacent SNPs, looking for founder haplotypes that are unique; RIL sharing such a unique haplotype are then inferred to have that founder's DNA. We consider each marker as the center of a haplotype, and consider haplotypes of size 1, 3, 5, \dots, \code{max.n.markers}. We end the extension of the haplotypes when all founders have a unique haplotype. } \value{ A matrix of dimension \code{nind(cross)} \eqn{\times}{x} no. markers, with the inferred founder origin for each line at each marker. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ map <- sim.map(100, n.mar=101, include.x=FALSE, eq.spacing=TRUE) founderGeno <- simFounderSnps(map, "8") ril <- sim.cross(map, n.ind=10, type="ri8sib", founderGeno=founderGeno) h <- inferFounderHap(ril, max.n.markers=11) mean(!is.na(h)) # proportion inferred plot(map[[1]], h[1,], ylim=c(0.5, 8.5), xlab="Position", ylab="Genotype") } \seealso{ \code{\link{sim.geno}}, \code{\link{calc.genoprob}}, \code{\link{fill.geno}}, \code{\link{argmax.geno}} } \keyword{utilities} qtl/man/allchrsplits.Rd0000644000176200001440000000542213355127045014630 0ustar liggesusers\name{allchrsplits} \alias{allchrsplits} \title{Test all possible splits of a chromosome into two pieces} \description{ In order to assess the support for a linkage group, this function splits the linkage groups into two pieces at each interval and in each case calculates a LOD score comparing the combined linkage group to the two pieces. } \usage{ allchrsplits(cross, chr, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), m=0, p=0, maxit=4000, tol=1e-6, sex.sp=TRUE, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{A vector specifying which chromosomes to study. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions. (Ignored if m > 0.)} \item{m}{Interference parameter for the chi-square model for interference; a non-negative integer, with m=0 corresponding to no interference. This may be used only for a backcross or intercross.} \item{p}{Proportion of chiasmata from the NI mechanism, in the Stahl model; p=0 gives a pure chi-square model. This may be used only for a backcross or intercross.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} \item{verbose}{If TRUE, print information on progress.} } \value{ A data frame (actually, an object of class \code{"scanone"}, so that one may use \code{\link{plot.scanone}}, \code{\link{summary.scanone}}, etc.) with each row being an interval at which a split is made. The first two columns are the chromosome ID and midpoint of the interval. The third column is a LOD score comparing the combined linkage group to the split into two linkage groups. A fourth column (\code{gap}) indicates the length of each interval. The row names indicate the flanking markers for each interval. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) allchrsplits(fake.bc, 7, error.prob=0, verbose=FALSE) } \seealso{ \code{\link{est.map}}, \code{\link{ripple}}, \code{\link{est.rf}}, \code{\link{switch.order}}, \code{\link{movemarker}} } \keyword{utilities} qtl/man/fake.f2.Rd0000644000176200001440000000271013355127045013335 0ustar liggesusers\name{fake.f2} \alias{fake.f2} \docType{data} \title{Simulated data for an F2 intercross} \description{ Simulated data for an F2 intercross, obtained using \code{\link{sim.cross}}. } \usage{data(fake.f2)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 200 F2 individuals typed at 94 markers, including 3 on the X chromosome. There is one quantitative phenotype, along with an indication of sex (0=female, 1=male) and the direction of the cross (pgm = paternal grandmother, 0=A, meaning the cross was (AxB)x(AxB), and 1=B, meaning the cross was (AxB)x(BxA)). Note that the X chromosome genotypes are coded in a special way (see \code{\link{read.cross}}). For the individuals with pgm=0, sex=0, 1=AA and 2=AB; for individuals with pgm=0, sex=1, 1=A and 2=B (hemizygous); for individuals with pgm=1, sex=0, 1=BB and 2=AB; for individuals with pgm=1, sex=1, 1=A and 2=B. \bold{This requires special care!} The data were simulated using an additive model with three QTLs on chromosome 1 (at 30, 50 and 70 cM), one QTL on chromosome 13 (at 30 cM), and one QTL on the X chromosome (at 10 cM). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) summary(fake.f2) plot(fake.f2) } \seealso{ \code{\link{sim.cross}}, \code{\link{fake.bc}}, \code{\link{fake.4way}}, \code{\link{listeria}}, \code{\link{hyper}}, \code{\link{bristle3}}, \code{\link{bristleX}} } \keyword{datasets} qtl/man/inferredpartitions.Rd0000644000176200001440000000511113355127045016032 0ustar liggesusers\name{inferredpartitions} \alias{inferredpartitions} \title{Identify inferred partitions in mapping QTL to a phylogenetic tree} \description{ Identify the inferred partitions for a chromosome from the results of scanPhyloQTL. } \usage{ inferredpartitions(output, chr, lodthreshold, probthreshold=0.9) } \arguments{ \item{output}{An object output by the function \code{\link{scanPhyloQTL}}.} \item{chr}{A character string indicating the chromosome to consider. (It can also be a number, but it's then converted to a character string.)} \item{lodthreshold}{LOD threshold; if maximum LOD score is less than this, the null model is considered.} \item{probthreshold}{Threshold on posterior probabilities. See Details below.} } \details{ We consider a single chromosome, and take the maximum LOD score for each partition on that chromosome. The presence of a QTL is inferred if at least one partition has LOD score greater than \code{lodthreshold}. In this case, we then convert the LOD scores for the partitions to approximate posterior probabilities by taking \eqn{10^{LOD}}{10^LOD} and then rescaling them to sum to 1. These are sorted from largest to smallest, and we then take as the inferred partitions the smallest set whose posterior probabilities cumulatively add up to at least \code{probthreshold}. } \value{ A vector of character strings. If the null model (no QTL) is inferred, the output is \code{"null"}. Otherwise, it is the set of inferred partitions. } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontshow{set.seed(66787403)} # example map; drop X chromosome data(map10) map10 <- map10[1:19] \dontshow{map10 <- map10[1:4]} # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross \dontrun{x <- lapply(x, calc.genoprob, step=2) }\dontshow{x <- lapply(x, calc.genoprob, step=0)} # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # inferred partitions inferredpartitions(out, chr=3, lodthreshold=3) # inferred partitions with prob'y threshold = 0.95 inferredpartitions(out, chr=3, lodthreshold=3, probthreshold=0.95) } \seealso{ \code{\link{scanPhyloQTL}}, \code{\link{plot.scanPhyloQTL}}, \code{\link{summary.scanPhyloQTL}}, \code{\link{max.scanPhyloQTL}}, \code{\link{simPhyloQTL}} } \keyword{print} qtl/man/formMarkerCovar.Rd0000644000176200001440000000261213355127045015222 0ustar liggesusers\name{formMarkerCovar} \alias{formMarkerCovar} \title{Create matrix of marker covariates for QTL analysis} \description{ Pull out a matrix of genotypes or genotype probabilities to use markers as covariates in QTL analysis. } \usage{formMarkerCovar(cross, markers, method=c("prob", "imp", "argmax"), \dots)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{markers}{A vector of character strings of marker or pseudomarker names. Pseudomarker names may be of the form \code{"5@21.5"} (for chr 5 at 21.5 cM), but then all names must be of this form.} \item{method}{If \code{method="prob"}, the genotype probabilities from \code{\link{calc.genoprob}} are used; otherwise we use \code{\link{fill.geno}} to impute missing data, with this method.} \item{\dots}{Passed to \code{\link{fill.geno}}, if necessary.} } \value{ A matrix containing genotype probabilities or genotype indicators, suitable for use as covariates in \code{\link{scanone}}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) hyper <- calc.genoprob(hyper, step=0) peakMarker <- "D4Mit164" X <- formMarkerCovar(hyper, peakMarker) \dontshow{hyper <- hyper[c(1,4),]} out <- scanone(hyper, addcovar=X) } \seealso{ \code{\link{pull.geno}}, \code{\link{pull.genoprob}}, \code{\link{fill.geno}}, \code{\link{scanone}} } \keyword{utilities} qtl/man/pull.markers.Rd0000644000176200001440000000174713355127045014551 0ustar liggesusers\name{pull.markers} \alias{pull.markers} \title{Drop all but a selected set of markers} \description{ Drop all but a selected set of markers from the data matrices and genetic maps. } \usage{ pull.markers(cross, markers) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{markers}{A character vector of marker names.} } \value{ The input object, with any markers not specified in the vector \code{markers} removed from the genotype data matrices, genetic maps, and, if applicable, any derived data (such as produced by \code{\link{calc.genoprob}}). (It might be a good idea to re-derive such things after using this function.) } \examples{ data(listeria) listeria2 <- pull.markers(listeria, c("D10M44","D1M3","D1M75")) } \seealso{ \code{\link{drop.nullmarkers}}, \code{\link{drop.markers}}, \code{\link{geno.table}}, \code{\link{clean.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/plot.missing.Rd0000644000176200001440000000323413355127045014551 0ustar liggesusers\name{plotMissing} \alias{plotMissing} \title{Plot grid of missing genotypes} \description{ Plot a grid showing which genotypes are missing. } \usage{ plotMissing(x, chr, reorder=FALSE, main="Missing genotypes", alternate.chrid=FALSE, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details. } \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{reorder}{Specify whether to reorder individuals according to their phenotypes. \tabular{ll}{ FALSE \tab Don't reorder \cr TRUE \tab Reorder according to the sum of the phenotypes \cr n \tab Reorder according to phenotype n}} \item{main}{Title to place on plot.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Ignored at this point.} } \details{ Uses \code{\link[graphics]{image}} to plot a grid with black pixels where the genotypes are missing. For intercross and 4-way cross data, gray pixels are plotted for the partially missing genotypes (for example, "not AA"). } \value{None.} \examples{ data(fake.f2) plotMissing(fake.f2) } \seealso{ \code{\link{plot.cross}}, \code{\link{geno.image}}, \code{\link[graphics]{image}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/totmar.Rd0000644000176200001440000000134213355127045013427 0ustar liggesusers\name{totmar} \alias{totmar} \title{Determine the total number of markers} \description{ Determine the total number of markers in a cross or map object. } \usage{ totmar(object) } \arguments{ \item{object}{An object of class \code{cross} (see \code{\link{read.cross}} for details) or \code{map} (see \code{\link{sim.map}} for details).} } \value{ The total number of markers in the input. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) totmar(fake.f2) map <- pull.map(fake.f2) totmar(map) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{summary.cross}}, \code{\link{nind}}, \code{\link{nchr}}, \code{\link{nmar}}, \code{\link{nphe}} } \keyword{print} qtl/man/subset.map.Rd0000644000176200001440000000126213355127045014203 0ustar liggesusers\name{subset.map} \alias{subset.map} \alias{[.map} \title{Subsetting chromosomes for a genetic map} \description{ Pull out a specified set of chromosomes from a \code{map} object. } \usage{ \method{subset}{map}(x, \dots) \method{[}{map}(x, \dots) } \arguments{ \item{x}{A list whose components are vectors of marker locations.} \item{\dots}{Vector of chromosome indices.} } \value{The input \code{map} object, but with only the specified subset of chromosomes.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(map10) map10 <- subset(map10, chr=1:5) # you can also use brackets map10 <- map10[2:3] } \seealso{ \code{\link{subset.cross}} } \keyword{manip} qtl/man/phenames.Rd0000644000176200001440000000104513355127045013721 0ustar liggesusers\name{phenames} \alias{phenames} \title{Pull out the phenotypes names from a cross} \description{ Pull out the phenotype names from a cross object as a vector. } \usage{phenames(cross)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ A vector of character strings (the phenotype names). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) phenames(listeria) } \seealso{ \code{\link{markernames}}, \code{\link{chrnames}} } \keyword{utilities} qtl/man/mqmfind.marker.Rd0000644000176200001440000000550613526005035015034 0ustar liggesusers\name{mqmfind.marker} \alias{mqmfind.marker} \title{ Fetch significant markers after permutation analysis } \description{ Fetch significant makers after permutation analysis. These markers can be used as cofactors for model selection in a forward stepwise approach. } \usage{ mqmfind.marker(cross, mqmscan = NULL, perm = NULL, alpha = 0.05, verbose=FALSE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{mqmscan}{ Results from either \code{\link{scanone}} or \code{\link{mqmscan}} } \item{perm}{ a \code{scanoneperm} object } \item{alpha}{ Threshold value, everything with significance < alpha is reported } \item{verbose}{ Display more output on verbose=TRUE % \verbose } } \value{ returns a matrix with at each row a significant marker (determined from the \code{scanoneperm} object) and with columns: markername, chr and pos (cM) } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ \item \code{\link{mqmprocesspermutation}} - Function called to convert results from an mqmpermutation into an scanoneperm object % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ # Use the multitrait dataset data(multitrait) # Set cofactors at each 3th marker cof <- mqmsetcofactors(multitrait,3) # impute missing genotypes multitrait <- fill.geno(multitrait) # log transform the 7th phenotype multitrait <- transformPheno(multitrait, 7) # Bootstrap 50 runs in batches of 10 \dontrun{result <- mqmpermutation(multitrait,scanfunction=mqmscan,cofactors=cof, pheno.col=7,n.perm=50,batchsize=10) }\dontshow{result <- mqmpermutation(multitrait,scanfunction=mqmscan,cofactors=cof, pheno.col=7,n.perm=2,batchsize=2)} # Create a permutation object f2perm <- mqmprocesspermutation(result) # What LOD score is considered significant ? summary(f2perm) # Find markers with a significant QTL effect (First run is original phenotype data) marker <- mqmfind.marker(multitrait,result[[1]],f2perm) # Print it to the screen marker } \keyword{ models } qtl/man/plot.geno.Rd0000644000176200001440000000536013355127045014032 0ustar liggesusers\name{plotGeno} \alias{plotGeno} \title{Plot observed genotypes, flagging likely errors} \description{ Plot the genotypes on a particular chromosome for a set of individuals, flagging likely errors. } \usage{ plotGeno(x, chr, ind, include.xo=TRUE, horizontal=TRUE, cutoff=4, min.sep=2, cex=1.2, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details. } \item{chr}{The chromosome to plot. Only one chromosome is allowed. (This should be a character string referring to the chromosomes by name.)} \item{ind}{Vector of individuals to plot (passed to \code{\link{subset.cross}}). If missing, all individuals are plotted.} \item{include.xo}{If TRUE, plot X's in intervals having a crossover. Not available for a 4-way cross.} \item{horizontal}{If TRUE, chromosomes are plotted horizontally.} \item{cutoff}{Genotypes with error LOD scores above this value are flagged as possible errors.} \item{min.sep}{Markers separated by less than this value (as a percent of the chromosome length) are pulled apart, so that they may be distinguished in the picture.} \item{cex}{Character expansion for the size of points in the plot. Larger numbers give larger points; see \code{\link[graphics]{par}}.} \item{\dots}{Ignored at this point.} } \details{ Plots the genotypes for a set of individuals. Likely errors are indicated by red squares. In a backcross, genotypes AA and AB are indicated by white and black circles, respectively. In an intercross, genotypes AA, AB and BB are indicated by white, gray, and black circles, respectively, and the partially missing genotypes "not BB" (D in mapmaker) and "not AA" (C in mapmaker) are indicated by green and orange circles, respectively. For the X chromosome in a backcross or intercross, hemizygous males are plotted as if they were homozygous (that is, with white and black circles). For a 4-way cross, two lines are plotted for each individual. The left or upper line indicates the allele A (white) or B (black); the right or lower line indicates the allele C (white) or D (black). For the case that genotype is known to be only AC/BD or AD/BC, we use green and orange, respectively. } \value{None.} \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=c(1,19))} # Calculate error LOD scores hyper <- calc.errorlod(hyper,error.prob=0.01) # print those above a specified cutoff top.errorlod(hyper,cutoff=4) # plot genotype data, flagging genotypes with error LOD > cutoff plotGeno(hyper, chr=1, ind=160:200, cutoff=7, min.sep=2) } \seealso{ \code{\link{calc.errorlod}}, \code{\link{top.errorlod}}, \code{\link{subset.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/add.cim.covar.Rd0000644000176200001440000000335413355127045014536 0ustar liggesusers\name{add.cim.covar} \alias{add.cim.covar} \title{Indicate marker covariates from composite interval mapping} \description{ Add dots at the locations of the selected marker covariates, for a plot of composite interval mapping results. } \usage{ add.cim.covar(cimresult, chr, gap=25, \dots) } \arguments{ \item{cimresult}{Composite interval mapping results, as output from \code{\link{cim}}.} \item{chr}{Optional vector specifying which chromosomes to plot. (The chromosomes must be specified by name.) This should be identical to that used in the call to \code{\link{plot.scanone}}.} \item{gap}{Gap separating chromosomes (in cM). This should be identical to that used in the call to \code{\link{plot.scanone}}.} \item{\dots}{Additional plot arguments, passed to the function \code{\link[graphics]{points}}.} } \details{ One must first have used the function \code{\link{plot.scanone}} to plot the composite interval mapping results. The arguments \code{chr} and \code{gap} must be identical to the values used in the call to \code{\link{plot.scanone}}. Dots indicating the locations of the selected marker covariates are displayed on the x-axis. (By default, solid red circles are plotted; this may be modified by specifying the graphics parameters \code{pch} and \code{col}.) } \value{ A data frame indicating the marker covariates that were plotted. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontrun{data(hyper) hyper <- calc.genoprob(hyper, step=2.5) out <- scanone(hyper) out.cim <- cim(hyper, n.marcovar=3) plot(out, out.cim, chr=c(1,4,6,15), col=c("blue", "red")) add.cim.covar(out.cim, chr=c(1,4,6,15))} } \seealso{ \code{\link{cim}}, \code{\link{plot.scanone}} } \keyword{hplot} qtl/man/reduce2grid.Rd0000644000176200001440000000320613355127045014321 0ustar liggesusers\name{reduce2grid} \alias{reduce2grid} \title{Reduce to a grid of pseudomarkers.} \description{ For high-density marker data, rather than run \code{\link{scanone}} at both the markers and at a set of pseudomarkers, we reduce to just a set of evenly-spaced pseudomarkers } \usage{ reduce2grid(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \details{ Genotype probabilities (from \code{\link{calc.genoprob}}) and/or imputations (from \code{\link{sim.geno}}) are subset to a grid of pseudomarkers. This is so that, in the case of high-density markers, we can do the genome scan calculations at a smaller set of points (on an evenly-spaced grid, but not at the markers) to save computation time. You need to first have run \code{\link{calc.genoprob}} and/or \code{\link{sim.geno}}, and you must use \code{stepwidth="fixed"}. When plotting results with \code{\link{plot.scanone}}, use \code{incl.markers=FALSE}, as the output of \code{\link{scanone}} won't include information about the marker locations and so will plot tick marks only at the first marker on each chromosome. } \value{ The input \code{cross} object with included genotype probabilities or imputations subset to an evenly-spaced grid. } \examples{ data(hyper) hyper <- calc.genoprob(hyper, step=2) hypersub <- reduce2grid(hyper) \dontrun{out <- scanone(hypersub) plot(out, incl.markers=FALSE)} } \seealso{ \code{\link{calc.genoprob}}, \code{\link{sim.geno}}, \code{\link{scanone}}, \code{\link{plot.scanone}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/mqmplotheatmap.Rd0000644000176200001440000000430313526005064015146 0ustar liggesusers\name{mqmplot.heatmap} \alias{mqmplot.heatmap} \title{Heatmap of a genome of MQM scan on multiple phenotypes} \description{ Plotting routine to display a heatmap of results obtained from a multiple-QTL model on multiple phenotypes (the output of \code{\link{mqmscanall}}) } \usage{ mqmplot.heatmap(cross, result, directed=TRUE, legend=FALSE, breaks = c(-100,-10,-3,0,3,10,100), col = c("darkblue","blue","lightblue","yellow","orange","red"), \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{result}{ Result object from mqmscanall, the object needs to be of class \code{mqmmulti} } \item{directed}{ Take direction of QTLs into account (takes more time because of QTL direction calculations } \item{legend}{ If TRUE, add a legend to the plot } \item{breaks}{ Color break points for the LOD scores } \item{col}{ Colors used between breaks } \item{\dots}{Additional arguments passed to the \code{\link{image}} function } } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3]} multitrait <- fill.geno(multitrait) # impute missing genotype data result <- mqmscanall(multitrait, logtransform=TRUE) mqmplot.heatmap(multitrait,result) } \keyword{ hplot } qtl/man/mqmscanall.Rd0000644000176200001440000000655513526005105014254 0ustar liggesusers\name{mqmscanall} \alias{mqmscanall} \title{Parallelized MQM on multiple phenotypes in a cross object} \description{ Parallelized QTL analysis using MQM on multiple phenotypes in a cross object (uses SNOW) } \usage{ mqmscanall(cross, multicore=TRUE, n.clusters = 1,batchsize=10,cofactors=NULL, \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{multicore}{ Use multiple cores (only if the package SNOW is available, otherwise this setting will be ignored) } \item{n.clusters}{ Number of parallel processes to spawn, recommended is setting this lower than the number of cores in the computer } \item{batchsize}{ Batch size. The entire set is split in jobs to reduce memory load per core. Each job contains batchsize number of traits per job. } \item{cofactors}{cofactors, only used when scanfunction is mqmscan. List of cofactors to be analysed in the QTL model. To set cofactors use \code{\link{mqmautocofactors}} or \code{mqmsetcofactors}}. % \mqmcofactors \item{\dots}{ Parameters passed through to the \code{\link{mqmscan}} function used in scanning for QTLs } } \details{ Uses \code{mqmscan} to scan for QTL's for each phenotype in the cross object. It is recomended that the package SNOW is installed before using this function on large numbers of phenotypes. } \value{ Returns a MQMmulti object. This object is a list of \code{\link{scanone}} objects that can be plotted using \code{plot.scanone(result[[trait]])} or using \code{mqmplot.multitrait(result)} } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ #Doing a multitrait analysis data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3]} multitrait <- calc.genoprob(multitrait) cof <- mqmsetcofactors(multitrait,3) multitrait <- fill.geno(multitrait) result <- mqmscanall(multitrait,cofactors=cof,batchsize=5) mqmplot.multitrait(result,"lines") } \references{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/parallelisation_references.txt"} \item Rossini, A., Tierney, L., and Li, N. (2003), Simple parallel statistical computing. \emph{R. UW Biostatistics working paper series} University of Washington. \bold{193} \item Tierney, L., Rossini, A., Li, N., and Sevcikova, H. (2004), The snow Package: Simple Network of Workstations. Version 0.2-1. % -----^^ inst/doc/Sources/MQM/mqm/parallelisation_references.txt ^^----- } } \keyword{ models } qtl/man/scanoneboot.Rd0000644000176200001440000001311513355127045014434 0ustar liggesusers\name{scanoneboot} \alias{scanoneboot} \title{Bootstrap to get interval estimate of QTL location} \description{ Nonparametric bootstrap to get an estimated confidence interval for the location of a QTL, in the context of a single-QTL model. } \usage{ scanoneboot(cross, chr, pheno.col=1, model=c("normal","binary","2part","np"), method=c("em","imp","hk","ehk","mr","mr-imp","mr-argmax"), addcovar=NULL, intcovar=NULL, weights=NULL, use=c("all.obs", "complete.obs"), upper=FALSE, ties.random=FALSE, start=NULL, maxit=4000, tol=1e-4, n.boot=1000, verbose=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{The chromosome to investigate. Only one chromosome is allowed. (This should be a character string referring to the chromosomes by name.)} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{model}{The phenotypic model: the usual normal model, a model for binary traits, a two-part model or non-parametric analysis} \item{method}{Indicates whether to use the EM algorithm, imputation, Haley-Knott regression, the extended Haley-Knott method, or marker regression. Not all methods are available for all models. Marker regression is performed either by dropping individuals with missing genotypes (\code{"mr"}), or by first filling in missing data using a single imputation (\code{"mr-imp"}) or by the Viterbi algorithm (\code{"mr-argmax"}).} \item{addcovar}{Additive covariates; allowed only for the normal and binary models.} \item{intcovar}{Interactive covariates (interact with QTL genotype); allowed only for the normal and binary models.} \item{weights}{Optional weights of individuals. Should be either NULL or a vector of length n.ind containing positive weights. Used only in the case \code{model="normal"}.} \item{use}{In the case that multiple phenotypes are selected to be scanned, this argument indicates whether to use all individuals, including those missing some phenotypes, or just those individuals that have data on all selected phenotypes.} \item{upper}{Used only for the two-part model; if true, the "undefined" phenotype is the maximum observed phenotype; otherwise, it is the smallest observed phenotype.} \item{ties.random}{Used only for the non-parametric "model"; if TRUE, ties in the phenotypes are ranked at random. If FALSE, average ranks are used and a corrected LOD score is calculated.} \item{start}{Used only for the EM algorithm with the normal model and no covariates. If \code{NULL}, use the usual starting values; if length 1, use random initial weights for EM; otherwise, this should be a vector of length n+1 (where n is the number of possible genotypes for the cross), giving the initial values for EM.} \item{maxit}{Maximum number of iterations for methods \code{"em"} and \code{"ehk"}.} \item{tol}{Tolerance value for determining convergence for methods \code{"em"} and \code{"ehk"}.} \item{n.boot}{Number of bootstrap replicates.} \item{verbose}{If TRUE, display information about the progress of the bootstrap.} } \details{ We recommend against the use of the bootstrap to derive a confidence interval for the location of a QTL; see Manichaikul et al. (2006). Use \code{\link{lodint}} or \code{\link{bayesint}} instead. The bulk of the arguments are the same as for the \code{\link{scanone}} function. A single chromosome should be indicated with the \code{chr} argument; otherwise, we focus on the first chromosome in the input \code{cross} object. A single-dimensional scan on the relevant chromosome is performed. We further perform a nonparametric bootstrap (sampling individuals \emph{with replacement} from the available data, to create a new data set with the same size as the input cross; some individuals with be duplicated and some omitted). The same scan is performed with the resampled data; for each bootstrap replicate, we store only the location with maximum LOD score. Use \code{\link{summary.scanoneboot}} to obtain the desired confidence interval. } \value{ A vector of length \code{n.boot}, giving the estimated QTL locations in the bootstrap replicates. The results for the original data are included as an attribute, \code{"results"}. } \references{ Manichaikul, A., Dupuis, J., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S} and Broman, K. W. (2006) Poor performance of bootstrap confidence intervals for the location of a quantitative trait locus. \emph{Genetics} \bold{174}, 481--489. Visscher, P. M., Thompson, R. and Haley, C. S. (1996) Confidence intervals in QTL mapping by bootstrap. \emph{Genetics} \bold{143}, 1013--1020. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) fake.f2 <- calc.genoprob(fake.f2, step=1, err=0.001) \dontrun{bootoutput <- scanoneboot(fake.f2, chr=13, method="hk")} \dontshow{bootoutput <- scanoneboot(fake.f2, chr=13, method="hk", n.boot=50)} plot(bootoutput) summary(bootoutput) } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanoneboot}}, \code{\link{plot.scanoneboot}}, \code{\link{lodint}}, \code{\link{bayesint}} } \keyword{utilities} qtl/man/reorderqtl.Rd0000644000176200001440000000242313355127045014305 0ustar liggesusers\name{reorderqtl} \alias{reorderqtl} \title{Reorder the QTL in a qtl object} \description{ This function changes the order of the QTL in a QTL object. } \usage{ reorderqtl(qtl, neworder) } \arguments{ \item{qtl}{A qtl object, as created by \code{\link{makeqtl}}.} \item{neworder}{A vector containing the positive integers up to the number of QTL in \code{qtl}, indicating the new order for the QTL. If missing, the QTL are ordered by chromosome and then by their position within a chromosome.} } \value{ The input \code{qtl} object, with the loci reordered. } \details{ Everything in the input \code{qtl} is reordered except the \code{altname} component, which contains names of the form \code{Q1}, \code{Q2}, etc. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 6, 13) qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2) qtl <- makeqtl(fake.f2, qc, qp, what="prob") qtl <- reorderqtl(qtl, c(2,3,1)) qtl qtl <- reorderqtl(qtl) qtl } \seealso{ \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{dropfromqtl}}, \code{\link{addtoqtl}}, \code{\link{replaceqtl}} } \keyword{utilities} qtl/man/subset.scantwo.Rd0000644000176200001440000000250113355127045015101 0ustar liggesusers\name{subset.scantwo} \alias{subset.scantwo} \title{Subsetting the results of a 2-d genome scan} \description{ Pull out a specified set of chromosomes and/or LOD columns from \code{\link{scantwo}} output. } \usage{ \method{subset}{scantwo}(x, chr, lodcolumn, \dots) } \arguments{ \item{x}{An object of class \code{scantwo}, output from \code{\link{scantwo}}.} \item{chr}{Optional vector specifying which chromosomes to keep. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{lodcolumn}{A vector specifying which LOD columns to keep (or, if negative), omit. These should be between 1 and the number of LOD columns in the input \code{x}.} \item{\dots}{Ignored at this point.} } \value{The input \code{scantwo} object, but with only the specified subset of the data.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=16:19)} fake.bc <- calc.genoprob(fake.bc) out <- scantwo(fake.bc, method="hk", pheno.col=1:2) summary(subset(out, chr=18:19)) } \seealso{ \code{\link{summary.scantwo}}, \code{\link{scantwo}} } \keyword{manip} qtl/man/effectplot.Rd0000644000176200001440000001260113355127045014254 0ustar liggesusers\name{effectplot} \alias{effectplot} \title{Plot phenotype means against genotypes at one or two markers} \description{ Plot the phenotype means for each group defined by the genotypes at one or two markers (or the values at a discrete covariate). } \usage{ effectplot(cross, pheno.col=1, mname1, mark1, geno1, mname2, mark2, geno2, main, ylim, xlab, ylab, col, add.legend=TRUE, legend.lab, draw=TRUE, var.flag=c("pooled","group")) } \arguments{ \item{cross}{An object of class \code{cross}.} \item{pheno.col}{Column number in the phenotype matrix to be drawn in the plot. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{mname1}{Name for the first marker or pseudomarker. Pseudomarkers (that is, non-marker positions on the imputation grid) may be referred to in a form like \code{"5@30.3"}, for position 30.3 on chromosome 5.} \item{mark1}{Genotype data for the first marker. If unspecified, genotypes will be taken from the data in the input cross object, using the name specified in \code{mname1}.} \item{geno1}{Optional labels for the genotypes (or classes in a covariate).} \item{mname2}{Name for the second marker or pseudomarker (optional).} \item{mark2}{Like \code{mark1} (optional).} \item{geno2}{Optional labels for the genotypes (or classes in a covariate).} \item{main}{Optional figure title.} \item{ylim}{Optional y-axis limits.} \item{xlab}{Optional x-axis label.} \item{ylab}{Optional y-axis label.} \item{col}{Optional vector of colors for the different line segments.} \item{add.legend}{A logical value to indicate whether to add a legend.} \item{legend.lab}{Optional title for the legend.} \item{draw}{A logical value to indicate generate the plot or not. If FALSE, no figure will be plotted and this function can be used to calculate the group means and standard errors.} \item{var.flag}{The method to calculate the group variance. "pooled" means to use the pooled variance and "group" means to calculate from individual group.} } \value{ A data.frame containing the phenotype means and standard errors for each group. } \details{ In the plot, the y-axis is the phenotype. In the case of one marker, the x-axis is the genotype for that marker. In the case of two markers, the x-axis is for different genotypes of the second marker, and the genotypes of first marker are represented by lines in different colors. Error bars are plotted at \eqn{\pm}{+/-} 1 SE. The results of \code{sim.geno} are used; if they are not available, \code{sim.geno} is run with \code{n.draws=16}. The average phenotype for each genotype group takes account of missing genotype data by averaging across the imputations. The SEs take account of both the residual phenotype variation and the imputation error. } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(1, 13, "X"))} # impute genotype data \dontrun{fake.f2 <- sim.geno(fake.f2, step=5, n.draws=64) }\dontshow{fake.f2 <- sim.geno(fake.f2, step=5, n.draws=8) } ######################################## # one marker plots ######################################## ### plot of genotype-specific phenotype means for 1 marker mname <- find.marker(fake.f2, 1, 37) # marker D1M437 effectplot(fake.f2, pheno.col=1, mname1=mname) ### output of the function contains the means and SEs output <- effectplot(fake.f2, mname1=mname) output ### plot a phenotype # Plot of sex-specific phenotype means, # note that "sex" must be a phenotype name here effectplot(fake.f2, mname1="sex", geno1=c("F","M")) # alternatively: sex <- pull.pheno(fake.f2, "sex") effectplot(fake.f2, mname1="Sex", mark1=sex, geno1=c("F","M")) ######################################## # two markers plots ######################################## ### plot two markers # plot of genotype-specific phenotype means for 2 markers mname1 <- find.marker(fake.f2, 1, 37) # marker D1M437 mname2 <- find.marker(fake.f2, 13, 24) # marker D13M254 effectplot(fake.f2, mname1=mname1, mname2=mname2) ### plot two pseudomarkers ##### refer to pseudomarkers by their positions effectplot(fake.f2, mname1="1@35", mname2="13@25") ##### alternatively, find their names via find.pseudomarker pmnames <- find.pseudomarker(fake.f2, chr=c(1, 13), c(35, 25)) effectplot(fake.f2, mname1=pmnames[1], mname2=pmnames[2]) ### Plot of sex- and genotype-specific phenotype means mname <- find.marker(fake.f2, 13, 24) # marker D13M254 # sex and a marker effectplot(fake.f2, mname1=mname, mname2="Sex", mark2=sex, geno2=c("F","M")) # Same as above, switch role of sex and the marker # sex and marker effectplot(fake.f2, mname1="Sex", mark1=sex, geno1=c("F","M"), mname2=mname) # X chromosome marker mname <- find.marker(fake.f2, "X", 14) # marker DXM66 effectplot(fake.f2, mname1=mname) # Two markers, including one on the X mnames <- find.marker(fake.f2, c(13, "X"), c(24, 14)) effectplot(fake.f2, mname1=mnames[1], mname2=mnames[2]) } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu} } \seealso{ \code{\link{plotPXG}}, \code{\link{find.marker}}, \code{\link{effectscan}}, \code{\link{find.pseudomarker}} } \keyword{hplot} qtl/man/find.flanking.Rd0000644000176200001440000000207412770016226014632 0ustar liggesusers\name{find.flanking} \alias{find.flanking} \title{Find flanking markers for a specified position} \description{ Find the genetic markers flanking a specified position on a chromosome, as well as the marker that is closest to the specified position. } \usage{find.flanking(cross, chr, pos)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{A vector of chromosome identifiers, or a single such.} \item{pos}{A vector of cM positions.} } \value{ A data.frame, each row corresponding to one of the input positions. The first column contains the left-flanking markers, the second column contains the right-flanking markers, and the third column contains the markers closest to the specified positions. } %\details{ %} \author{Brian Yandell} \examples{ data(listeria) find.flanking(listeria, 5, 28) find.flanking(listeria, c(1, 5, 13), c(81, 28, 26)) } \seealso{ \code{\link{find.marker}}, \code{\link{plotPXG}}, \code{\link{find.markerpos}}, \code{\link{find.pseudomarker}} } \keyword{utilities} qtl/man/comparegeno.Rd0000644000176200001440000000244313576462636014440 0ustar liggesusers\name{comparegeno} \alias{comparegeno} \title{Compare individuals' genotype data} \description{ Count proportion of matching genotypes between all pairs of individuals, to look for unusually closely related individuals. } \usage{comparegeno(cross, what=c("proportion","number","both"))} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{what}{Indicates whether to return the proportion or number of matching genotypes (or both).} } \value{ A matrix whose (i,j)th element is the proportion or number of matching genotypes for individuals i and j. If called with \code{what="both"}, the lower triangle contains the proportion and the upper triangle contains the number. If called with \code{what="proportion"}, the diagonal contains missing values. Otherwise, the diagonal contains the number of typed markers for each individual. The output is given class \code{"comparegeno"} so that appropriate \code{summary} and \code{plot} functions may be used. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) cg <- comparegeno(listeria) summary(cg, 0.7) plot(cg) } \seealso{ \code{\link{nmissing}}, \code{\link{summary.comparegeno}}, \code{\link{plot.comparegeno}} } \keyword{utilities} qtl/man/summary.scantwo.old.Rd0000644000176200001440000000673413355127045016062 0ustar liggesusers\name{summaryScantwoOld} \alias{summaryScantwoOld} \title{Summarize the results of a two-dimensional genome scan} \description{ Summarize the interesting aspects of the results of \code{\link{scantwo}}; this is the version of \code{\link{summary.scantwo}} that was included in R/qtl version 1.03 and earlier. } \usage{ summaryScantwoOld(object, thresholds = c(0, 0, 0), lodcolumn=1, type = c("joint","interaction"), \dots) } \arguments{ \item{object}{An object of class \code{scantwo}, the output of the function \code{\link{scantwo}}.} \item{thresholds}{A vector of length three, giving LOD thresholds for the joint LOD, interaction LOD and single-QTL conditional LOD. Negative threshold values are taken relative to the maximum joint, interaction, or individual QTL LOD, respectively.} \item{lodcolumn}{If the scantwo results contain LOD scores for multiple phenotypes, this argument indicates which to use in the summary.} \item{type}{Indicates whether to pick peaks with maximal joint or interaction LOD.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.scantwo.old}, to be printed by \code{print.summary.scantwo.old}. Pairs of loci meeting the specified criteria are printed, with their joint LOD, interaction LOD, and the conditional LOD for each locus, along with single-point P-values calculated by the \eqn{\chi^2}{chi-square} approximation. P-values are printed as \eqn{-\log_{10}(P)}{-log10(P)}. \cr If the input \code{scantwo} object does not include the results of \code{scanone}, the interaction and conditional LOD thresholds are ignored, and all pairs of loci for which the joint LOD exceeds its threshold are printed, though without their conditional LOD scores. } \details{ For each pair of chromosomes, the pair of loci for which the LOD score (either joint or interaction LOD, according to the argument \code{type}) is a maximum is considered. The pair is printed only if its joint LOD score exceeds the joint threshold and either (a) the interaction LOD score exceeds its threshold or (b) both of the loci have conditional LOD scores that are above the conditional LOD threshold, where the conditional LOD score for locus \eqn{q_1}{q1}, \eqn{LOD(q_1 | q_2)}{LOD(q1 | q2)}, is the \eqn{\log_{10}}{log10} likelihood ratio comparing the model with \eqn{q_1}{q1} and \eqn{q_2}{q2} acting additively to the model with \eqn{q_2}{q2} alone. In the case the results of \code{\link{scanone}} are not available, the maximum locus pair for each chromosome is printed whenever its joint LOD exceeds the joint LOD threshold. The criterion used in this summary is due to Gary Churchill and \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}aunak Sen, and deserves careful consideration and possible revision. } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu}; Brian Yandell } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(1,6,13))} fake.f2 <- calc.genoprob(fake.f2, step=5) out.2dim <- scantwo(fake.f2, method="hk") # All pairs of loci summaryScantwoOld(out.2dim) # Pairs meeting specified criteria summaryScantwoOld(out.2dim, c(7, 3, 3)) # Pairs with both conditional LODs > 2 summaryScantwoOld(out.2dim,c(0,1000,2)) # Pairs with interaction LOD is above 3 summaryScantwoOld(out.2dim,c(0,3,1000)) } \seealso{ \code{\link{summary.scantwo}}, \code{\link{scantwo}}, \code{\link{plot.scantwo}}, \code{\link{max.scantwo}} } \keyword{print} qtl/man/formLinkageGroups.Rd0000644000176200001440000000436213355127045015564 0ustar liggesusers\name{formLinkageGroups} \alias{formLinkageGroups} \title{Partition markers into linkage groups} \description{ Use pairwise linkage information between markers (as calculated by \code{\link{est.rf}} to partition markers into linkage groups. } \usage{ formLinkageGroups(cross, max.rf=0.25, min.lod=3, reorgMarkers=FALSE, verbose=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{max.rf}{Maximum recombination fraction for placing two markers in the same linkage group (see Details).} \item{min.lod}{Minimum LOD score for placing two markers in the same linkage group (see Details).} \item{reorgMarkers}{If TRUE, the output is a cross object, like the input, but with the markers organized into the inferred linkage groups. If FALSE, the output is a table indicating the initial chromosome assignments and the inferred linkage group partitions.} \item{verbose}{If TRUE, display information about the progress of the calculations.} } \value{ If \code{reorgMarkers=FALSE} (the default), the output is a data frame with rows corresponding to the markers and with two columns: the initial chromosome assignment and the inferred linkage group. Linkage groups are ordered by the number of markers they contain (from largest to smallest). If \code{reorgMarkers=TRUE}, the output is a cross object, like the input, but with the markers reorganized into the inferred linkage groups. The marker order and marker positions within the linkage groups are arbitrary. } \details{ Two markers are placed in the same linkage group if the estimated recombination fraction between them is \eqn{\le}{<=} \code{max.rf} and the LOD score (for the test of the rec. frac. = 1/2) is \eqn{\ge}{>=} \code{min.lod}. The transitive property (if A is linked to B and B is linked to C then A is linked to C) is used to close the groups. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) listeria <- est.rf(listeria) result <- formLinkageGroups(listeria) tab <- table(result[,1], result[,2]) apply(tab, 1, function(a) sum(a!=0)) apply(tab, 2, function(a) sum(a!=0)) } \seealso{ \code{\link{est.rf}}, \code{\link{orderMarkers}} } \keyword{utilities} qtl/man/max.scanone.Rd0000644000176200001440000000362113355127045014335 0ustar liggesusers\name{max.scanone} \alias{max.scanone} \title{Maximum peak in genome scan} \description{ Print the row of the output from \code{\link{scanone}} that corresponds to the maximum LOD, genome-wide. } \usage{ \method{max}{scanone}(object, chr, lodcolumn=1, na.rm=TRUE, \dots) } \arguments{ \item{object}{An object of the form output by the function \code{\link{scanone}}: a data.frame whose third column is the LOD score.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{lodcolumn}{An integer, indicating which of the LOD score columns should be considered in pulling out the peak (these are indexed 1, 2, \dots).} \item{na.rm}{A logical indicating whether missing values should be removed.} \item{\dots}{Ignored.} } \value{ An object of class \code{summary.scanone}, to be printed by \code{print.summary.scanone}. This is a data.frame with one row, corresponding to the maximum LOD peak either genome-wide or for the particular chromosome specified. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) \dontshow{listeria <- subset(listeria,chr=c(5,13),ind=!is.na(listeria$pheno[,1]))} listeria <- calc.genoprob(listeria, step=2.5) out <- scanone(listeria, model="2part", upper=TRUE) # Maximum peak for LOD(p,mu) max(out) # Maximum peak for LOD(p,mu) on chr 5 max(out,chr=5) # Maximum peak for LOD(p,mu) on chromosomes other than chr 13 max(out,chr="-13") # Maximum peak for LOD(p) max(out, lodcolumn=2) # Maximum peak for LOD(mu) max(out, lodcolumn=3) } \seealso{ \code{\link{scanone}}, \code{\link{plot.scanone}}, \code{\link{summary.scanone}} } \keyword{print} qtl/man/pull.rf.Rd0000644000176200001440000000312513355127045013504 0ustar liggesusers\name{pull.rf} \alias{pull.rf} \title{Pull out recombination fractions or LOD scores from a cross object} \description{ Pull out either the pairwise recombination fractions or the LOD scores, as calculated by \code{\link{est.rf}}, from a cross object. } \usage{pull.rf(cross, what=c("rf", "lod"), chr)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{what}{Indicates whether to pull out a matrix of estimated recombination fractions or a matrix of LOD scores.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} } \value{ An object of class \code{"rfmatrix"}, which is a matrix of either estimated recombination fractions between all marker pairs or of LOD scores (for the test of rf=1/2) for all marker pairs. The genetic map is included as an attribute. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=5)} fake.f2 <- est.rf(fake.f2) rf <- pull.rf(fake.f2) lod <- pull.rf(fake.f2, "lod") plot(rf[1,], lod[1,], xlab="rec frac", ylab="LOD score") marker <- markernames(fake.f2, chr=5)[6] par(mfrow=c(2,1)) plot(rf, marker, bandcol="gray70") plot(lod, marker, bandcol="gray70") } \seealso{ \code{\link{est.rf}}, \code{\link{plot.rfmatrix}}, \code{\link{plotRF}} } \keyword{utilities} qtl/man/fake.4way.Rd0000644000176200001440000000307713355127045013721 0ustar liggesusers\name{fake.4way} \alias{fake.4way} \docType{data} \title{Simulated data for a 4-way cross} \description{ Simulated data for a phase-known 4-way cross, obtained using \code{\link{sim.cross}}. } \usage{data(fake.4way)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 250 individuals typed at 157 markers, including 8 on the X chromosome. There are two phenotypes (including sex, for which 0=female and 1=male). The quantitative phenotype is affected by three QTLs: two on chromosome 2 at positions 10 and 25 cM on the female genetic map, and one on chromosome 7 at position 40 cM on the female map. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.4way) \dontshow{fake.4way <- subset(fake.4way,chr=c(2,7))} plot(fake.4way) summary(fake.4way) # estimate recombination fractions fake.4way <- est.rf(fake.4way) plotRF(fake.4way) # estimate genetic maps ssmap <- est.map(fake.4way, verbose=TRUE) samap <- est.map(fake.4way, sex.sp=FALSE, verbose=TRUE) plot(ssmap, samap) # error lod scores fake.4way <- calc.genoprob(fake.4way, err=0.01) fake.4way <- calc.errorlod(fake.4way, err=0.01) top.errorlod(fake.4way, cutoff=2.5) # genome scan fake.4way <- calc.genoprob(fake.4way, step=2.5) out.hk <- scanone(fake.4way, method="hk") out.em <- scanone(fake.4way, method="em") plot(out.em,out.hk,chr=c(2,7)) } \seealso{ \code{\link{sim.cross}}, \code{\link{fake.bc}}, \code{\link{fake.f2}}, \code{\link{listeria}}, \code{\link{hyper}}, \code{\link{bristle3}}, \code{\link{bristleX}} } \keyword{datasets} qtl/man/max.scanPhyloQTL.Rd0000644000176200001440000000457013355127045015234 0ustar liggesusers\name{max.scanPhyloQTL} \alias{max.scanPhyloQTL} \title{Maximum peak in genome scan to map a QTL to a phylogenetic tree} \description{ Print the chromosome with the maximum LOD score across partitions, from the results of \code{\link{scanPhyloQTL}}. } \usage{ \method{max}{scanPhyloQTL}(object, chr, format=c("postprob", "lod"), \dots) } \arguments{ \item{object}{An object output by the function \code{\link{scanPhyloQTL}}.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{format}{Indicates whether to provide LOD scores or approximate posterior probabilities; see the help file for \code{\link{summary.scanPhyloQTL}}.} \item{\dots}{Ignored at this point.} } \details{ The output, and the use of the argument \code{format}, is as in \code{\link{summary.scanPhyloQTL}}. } \value{ An object of class \code{summary.scanPhyloQTL}, to be printed by \code{print.summary.scanPhyloQTL}. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontrun{ # example map; drop X chromosome data(map10) map10 <- map10[1:19] # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross x <- lapply(x, calc.genoprob, step=2) # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # maximum peak max(out, format="lod") # approximate posterior probabilities at peak max(out, format="postprob") # all peaks above a threshold for LOD(best) - LOD(2nd best) summary(out, threshold=1, format="lod") # all peaks above a threshold for LOD(best), showing approx post'r prob summary(out, format="postprob", threshold=3) # plot of results plot(out) } } \seealso{ \code{\link{scanPhyloQTL}}, \code{\link{plot.scanPhyloQTL}}, \code{\link{summary.scanPhyloQTL}}, \code{\link{max.scanone}}, \code{\link{inferredpartitions}}, \code{\link{simPhyloQTL}} } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \keyword{print} qtl/man/plot.scantwo.Rd0000644000176200001440000001521113355127045014554 0ustar liggesusers\name{plot.scantwo} \alias{plot.scantwo} \title{Plot LOD scores for a two-dimensional genome scan} \description{ Plot the results of a two-dimensional, two-QTL genome scan. } \usage{ \method{plot}{scantwo}(x, chr, incl.markers=FALSE, zlim, lodcolumn=1, lower = c("full", "add", "cond-int", "cond-add", "int"), upper = c("int", "cond-add", "cond-int", "add", "full"), nodiag=TRUE, contours=FALSE, main, zscale=TRUE, point.at.max=FALSE, col.scheme = c("viridis", "redblue","cm","gray","heat","terrain","topo"), gamma=0.6, allow.neg=FALSE, alternate.chrid=FALSE, \dots) } \arguments{ \item{x}{An object of class \code{"scantwo"}, as output by \code{\link{scantwo}}.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{incl.markers}{If FALSE, plot LOD scores on an evenly spaced grid (not including the results at the markers).} \item{zlim}{A vector of length 2 (optional), indicating the z limits for the lower-right and upper-left triangles, respectively. If one number is given, the same limits are used for both triangles. If \code{zlim} is missing, the maximum limits are used for each.} \item{lodcolumn}{If the scantwo results contain LOD scores for multiple phenotypes, this argument indicates which to use in the plot.} \item{lower}{Indicates which LOD scores should be plotted in the lower triangle. See the details below.} \item{upper}{Indicates which LOD scores should be plotted in the upper triangle. See the details below.} \item{nodiag}{If TRUE, suppress the plot of the scanone output (which is normally along the diagonal.)} \item{contours}{If TRUE, add a contour to the plot at 1.5-LOD below its maximum, using a call to \code{\link[graphics]{contour}}. If a numeric vector, contours are drawn at these values below the maximum LOD.} \item{main}{An optional title for the plot.} \item{zscale}{If TRUE, a color scale is plotted at the right.} \item{point.at.max}{If TRUE, plot an X at the maximum LOD.} \item{col.scheme}{Name of color pallet. The default is "viridis"; see Option D at \url{https://bids.github.io/colormap}} \item{gamma}{Parameter affecting range of colors when \code{col.scheme="gray"} or \code{="redblue"}.} \item{allow.neg}{If TRUE, allow the plot of negative LOD scores; in this case, the z-limits are symmetric about 0. This option is chiefly to allow a plot of difference between LOD scores from different methods, calculated via \code{\link[=-.scantwo]{-.scantwo}}.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Ignored at this point.} } \value{None.} \details{ Uses \code{\link[graphics]{image}} to plot a grid of LOD scores. The particular LOD scores plotted in the upper-left and lower-right triangles are selected via \code{upper} and \code{lower}, respectively. By default, the upper-left triangle contains the epistasis LOD scores (\code{"int"}), and the lower-right triangle contains the LOD scores for the full model (\code{"full"}). The diagonal contains either all zeros or the main effects LOD scores (from \code{\link{scanone}}). The \code{\link{scantwo}} function calculates, for each pair of putative QTLs, \eqn{(q_1,q_2)}{(q1,q2)}, the likelihood under the null model \eqn{L_0}{L0}, the likelihood under each of the single-QTL models, \eqn{L(q_1)}{L(q1)} and \eqn{L(q_2)}{L(q2)}, the likelihood under an additive QTL model, \eqn{L_a(q_1,q_2)}{La(q1,q2)}, and the likelihood under a full QTL model (including QTL-QTL interaction), \eqn{L_f(q_1,q_2)}{Lf(q1,q2)}. The five possible LOD scores that may be plotted are the following. The epistasis LOD scores (\code{"int"}) are \eqn{LOD_i = \log_{10} L_f(q_1,q_2) - \log_{10} L_a(q_1,q_2)}{LODi = log10 Lf(q1,q2) - log10 La(q1,q2)}. The full LOD scores (\code{"full"}) are \eqn{LOD_f = \log_{10} L_f(q_1,q_2) - \log_{10} L_0}{% LODj = log10 Lf(q1,q2) - log10 L0}. The additive LOD scores (\code{"add"}) are \eqn{LOD_a = \log_{10} L_a(q_1,q_2) - \log_{10} L_0}{% LODa = log10 La(q1,q2) - log10 L0}. In addition, we may calculate, for each pair of chromosomes, the difference between the full LOD score and the maximum single-QTL LOD scores for that pair of chromosomes (\code{"cond-int"}). Finally, we may calculate, for each pair of chromosomes, the difference between the additive LOD score and the maximum single-QTL LOD scores for that pair of chromosomes (\code{"cond-add"}). If a color scale is plotted (\code{zscale=TRUE}), the axis on the left indicates the scale for the upper-left triangle, while the axis on the right indicates the scale for the lower-right triangle. Note that the axis labels can get screwed up if you change the size of the figure window; you'll need to redo the plot. } \section{Output of addpair}{ \bold{Note} that, for output from \code{\link{addpair}} in which the new loci are indicated explicitly in the formula, the summary provided by \code{plot.scantwo} is somewhat special. In particular, the \code{lower} and \code{upper} arguments are ignored. In the case that the formula used in \code{\link{addpair}} was not symmetric in the two new QTL, the x-axis in the plot corresponds to the first of the new QTL and the y-axis corresponds to the second of the new QTL. } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=c(1,4,6,15))} hyper <- calc.genoprob(hyper, step=5) \dontshow{hyper <- calc.genoprob(hyper)} # 2-d scan by EM and by Haley-Knott regression out2.em <- scantwo(hyper, method="em") out2.hk <- scantwo(hyper, method="hk") # plot epistasis and full LOD scores plot(out2.em) # plot cond-int in upper triangle and full in lower triangle # for chromosomes 1, 4, 6, 15 plot(out2.em, upper="cond-int", chr=c(1,4,6,15)) # plot cond-add in upper triangle and add in lower triangle # for chromosomes 1, 4 plot(out2.em, upper="cond-add", lower="add", chr=c(1,4)) # plot the differences between the LOD scores from Haley-Knott # regression and the EM algorithm plot(out2.hk - out2.em, allow.neg=TRUE) } \seealso{ \code{\link{scantwo}}, \code{\link{summary.scantwo}}, \code{\link{plot.scanone}}, \code{\link[=-.scantwo]{-.scantwo}} } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu}; Brian Yandell } \keyword{hplot} qtl/man/summary.scantwoperm.Rd0000644000176200001440000000334013355127045016157 0ustar liggesusers\name{summary.scantwoperm} \alias{summary.scantwoperm} \title{LOD thresholds from scantwo permutation results} \description{ Print the estimated genome-wide LOD thresholds on the basis of permutation results from \code{\link{scantwo}} (with \code{n.perm} > 0). } \usage{ \method{summary}{scantwoperm}(object, alpha=c(0.05, 0.10), \dots) } \arguments{ \item{object}{Output from the function \code{\link{scantwo}} with \code{n.perm} > 0.} \item{alpha}{Genome-wide significance levels.} \item{\dots}{Ignored at this point.} } \details{ We take the \eqn{1-\alpha}{1-alpha} quantiles of the individual LOD scores. In the case of X-chr-specific permutations, we use the combined length of the autosomes, \eqn{L_A}, and the length of the X chromosome, \eqn{L_X}, and calculate the area of the A:A, A:X, and X:X regions as \eqn{L_A^2/2}, \eqn{L_A L_X}, and \eqn{L_X^2/2}, and then use the nominal significance levels of \eqn{1 - (1-\alpha)^p}{1 - (1-alpha)^p}, where \eqn{p} is the proportional area for that region. } \value{ An object of class \code{summary.scantwoperm}, to be printed by \code{print.summary.scantwoperm}. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"), ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=0) \dontrun{operm <- scantwo(fake.f2, n.perm=100, method="hk")}\dontshow{ operm <- scantwo(fake.f2, n.perm=3, method="hk")} summary(operm) } \seealso{ \code{\link{scantwo}}, \code{\link{summary.scantwo}}, \code{\link{plot.scantwoperm}} } \references{ Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. } \keyword{print} qtl/man/clean.scantwo.Rd0000644000176200001440000000313613355127045014663 0ustar liggesusers\name{clean.scantwo} \alias{clean.scantwo} \title{Clean up scantwo output} \description{ In an object output from \code{\link{scantwo}}, replaces negative and missing LOD scores with 0, and replaces LOD scores for pairs of positions that are not separated by \code{n.mar} markers, or that are less than \code{distance} cM apart, with 0. Further, if the LOD for full model is less than the LOD for the additive model, the additive LOD is pasted over the full LOD. } \usage{ \method{clean}{scantwo}(object, n.mar=1, distance=0, \dots) } \arguments{ \item{object}{An object of class \code{scantwo}. See \code{\link{scantwo}} for details.} \item{n.mar}{Pairs of positions not separated by at least this many markers have LOD scores set to 0.} \item{distance}{Pairs of positions not separated by at least this distance have LOD scores set to 0.} \item{\dots}{Ignored at this point.} } \value{ The input scantwo object, with any negative or missing LOD scores replaced by 0, and LOD scores for pairs of positions separated by fewer than \code{n.mar} markers, or less than \code{distance} cM, are set to 0. Also, if the LOD for the full model is less than the LOD for the additive model, the additive LOD is used in place of the full LOD. } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- calc.genoprob(fake.f2, step=5) out2 <- scantwo(fake.f2, method="hk") out2 <- clean(out2) out2cl2 <- clean(out2, n.mar=2, distance=5) } \seealso{ \code{\link{scantwo}}, \code{\link{summary.scantwo}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/interpPositions.Rd0000644000176200001440000000334213355127045015334 0ustar liggesusers\name{interpPositions} \alias{interpPositions} \title{Interpolate positions from one map to another} \description{ On the basis of a pair of marker maps with common markers, take positions along one map and interpolate (or, past the terminal markers on a chromosome, extrapolate) their positions on the second map. } \usage{ interpPositions(oldpositions, oldmap, newmap) } \arguments{ \item{oldpositions}{A data frame with two columns: \code{chr} (chromosome identifiers) and \code{pos} (positions, along \code{oldmap}).} \item{oldmap}{An object of class \code{"map"}; see \code{\link{sim.map}} for details.} \item{newmap}{An object of class \code{"map"}, with the same chromosomes and markers as \code{oldmap}.} } \value{The input data frame, \code{oldpositions}, with an additional column \code{newpos} with the interpolated positions along \code{newmap}.} \details{ In this explanation, take \code{oldmap} and \code{newmap} to be the physical and genetic maps, respectively. We use linear interpolation within each interval, assuming a constant recombination rate within the interval. Past the terminal markers, we use linear extrapolation, using the chromosome-wide average recombination rate. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) # hyper genetic map gmap <- pull.map(hyper) # a fake physical map, with each chromosome starting at 0. pmap <- shiftmap(rescalemap(gmap, 2)) # positions on pmap to determine location on gmap tofind <- data.frame(chr=c(1, 5, 17, "X"), pos=c(220, 20, 105, 10)) rownames(tofind) <- paste("loc", 1:nrow(tofind), sep="") interpPositions(tofind, pmap, gmap) } \seealso{ \code{\link{shiftmap}}, \code{\link{rescalemap}}, \code{\link{pull.map}} } \keyword{manip} qtl/man/switch.order.Rd0000644000176200001440000000340413355127045014535 0ustar liggesusers\name{switch.order} \alias{switch.order} \title{Switch the order of markers on a chromosome} \description{ Switch the order of markers on a specified chromosome to a specified new order. } \usage{switch.order(cross, chr, order, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), maxit=4000, tol=1e-6, sex.sp=TRUE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{The chromosome for which the marker order is to be switched. Only one chromosome is allowed. (This should be a character string referring to the chromosomes by name.)} \item{order}{A vector of numeric indices defining the new marker order. The vector may have length two more than the number of markers, for easy in use with the output of the function \code{\link{ripple}}.} \item{error.prob}{Assumed genotyping error rate (passed to \code{\link{est.map}}).} \item{map.function}{Map function to be used (passed to \code{\link{est.map}}).} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} } \value{ The input \code{cross} object, but with the marker order on the specified chromosome updated, and with any derived data removed (except for recombination fractions, if present, which are not removed); the genetic map for the relevant chromosome is re-estimated. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) fake.f2 <- switch.order(fake.f2, 1, c(1,3,2,4:7)) } \seealso{ \code{\link{flip.order}}, \code{\link{ripple}}, \code{\link{clean.cross}} } \keyword{manip} qtl/man/replacemap.scanone.Rd0000644000176200001440000000327613355127045015667 0ustar liggesusers\name{replacemap.scanone} \alias{replacemap.scanone} \title{Replace the genetic map in QTL mapping results with an alternate map} \description{ Replace the positions of LOD scores in output from \code{\link{scanone}} with values based on an alternative map (such as a physical map), with pseudomarker locations determined by linear interpolation. } \usage{ \method{replacemap}{scanone}(object, map) } \arguments{ \item{object}{An object of class \code{"scanone"}, as output by the function \code{\link{scanone}}.} \item{map}{A list containing the alternative genetic map. All chromosomes in \code{object} should have corresponding chromosomes in \code{map}, and markers must be in the same order in the two maps. There must be at least two markers on each chromosome in \code{map} that appear in \code{object}.} } \value{The input \code{object} with the positions of LOD scores revised to match those in the input \code{map}.} \details{ The positions of pseudomarkers are determined by linear interpolation between markers. In the case of pseudomarkers beyond the ends of the terminal markers on chromosomes, we use the overall lengths of the chromosome in \code{object} and \code{map} to determine the new spacing. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} origmap <- pull.map(fake.f2) newmap <- est.map(fake.f2) fake.f2 <- replacemap(fake.f2, newmap) fake.f2 <- calc.genoprob(fake.f2, step=2.5) out <- scanone(fake.f2, method="hk") out.rev <- replacemap(out, origmap) } \seealso{ \code{\link[=replace.map]{replacemap.cross}}, \code{\link{est.map}}, \code{\link{replacemap.scantwo}} } \keyword{manip} qtl/man/scantwopermhk.Rd0000644000176200001440000001155013355127045015010 0ustar liggesusers\name{scantwopermhk} \alias{scantwopermhk} \title{Permutation test for 2d genome scan by Haley-Knott regression} \description{ Perform a permutation test with a two-dimensional genome scan with a two-QTL model, with possible allowance for additive covariates, by Haley-Knott regression. } \usage{ scantwopermhk(cross, chr, pheno.col=1, addcovar=NULL, weights=NULL, n.perm=1, batchsize=1000, perm.strata=NULL, perm.Xsp=NULL, verbose=FALSE, assumeCondIndep=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes for which LOD scores should be calculated. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This should be a single value (numeric index or character string for a phenotype name), but it may also be a vector of numeric values with length equal to the number of individuals in the cross, in which case it is taken to be a vector of individuals' phenotypes.} \item{addcovar}{Additive covariates.} \item{weights}{Optional weights of individuals. Should be either NULL or a vector of length n.ind containing positive weights. Used only in the case \code{model="normal"}.} \item{n.perm}{Number of permutation replicates.} \item{batchsize}{If \code{n.perm > batchsize}, permutations will be run in batches of no more than \code{batchsize} permutations.} \item{perm.strata}{Used to perform a stratified permutation test. This should be a vector with the same number of individuals as in the cross data. Unique values indicate the individual strata, and permutations will be performed within the strata.} \item{perm.Xsp}{If TRUE, run separate permutations for A:A, A:X, and X:X. In this case, \code{n.perm} refers to the number of permutations for the A:A part; more permutations are used for the A:X and X:X parts, as estimates of quantiles farther out into the tails are needed.} \item{verbose}{If TRUE, display information about the progress of calculations.} \item{assumeCondIndep}{If TRUE, assume conditional independence of QTL genotypes given marker genotypes. This is an approximation, but it may speed things up.} } \details{ This is a scaled-back version of the permutation test provided by \code{\link{scantwo}}: only for a normal model with Haley-Knott regression, and not allowing interactive covariates. This is an attempt to speed things up and attentuate the memory usage problems in \code{\link{scantwo}}. In the case of \code{perm.Xsp=TRUE} (X-chr-specific thresholds), we use a stratified permutation test, stratified by sex and cross-direction. } \value{ A list with six different LOD scores from each of the permutation replicates. First, the maximum LOD score for the full model (two QTLs plus an interaction). Second, for each pair of chromosomes, we take the difference between the full LOD and the maximum single-QTL LOD for those two chromosomes, and then maximize this across chromosome pairs. Third, for each pair of chromosomes we take the difference between the maximum full LOD and the maximum additive LOD, and then maximize this across chromosome pairs. Fourth, the maximum LOD score for the additive QTL model. Fifth, for each pair of chromosomes, we take the difference between the additive LOD and the maximum single-QTL LOD for those two chromosomes, and then maximize this across chromosome pairs. Finally, the maximum single-QTL LOD score (that is, from a single-QTL scan). The latter is not used in \code{\link{summary.scantwoperm}}, but does get calculated at each permutation, so we include it for the sake of completeness. If \code{perm.Xsp=TRUE}, this is a list of lists, for the A:A, A:X, and X:X sections, each being a list as described above. } \references{ Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. } \author{Karl W Broman, \email{broman@wisc.edu}; Hao Wu} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- calc.genoprob(fake.f2, step=5) operm <- scantwopermhk(fake.f2, n.perm=2) summary(operm, alpha=0.05) } \seealso{ \code{\link{scantwo}}, \code{\link{plot.scantwoperm}}, \code{\link{summary.scantwoperm}}, \code{\link{c.scantwoperm}} } \keyword{models} qtl/man/addtoqtl.Rd0000644000176200001440000000332713355127045013742 0ustar liggesusers\name{addtoqtl} \alias{addtoqtl} \title{Add to a qtl object} \description{ Add a QTL or multiple QTL to a qtl object. } \usage{ addtoqtl(cross, qtl, chr, pos, qtl.name, drop.lod.profile=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{qtl}{The qtl object to which additional QTL are to be added.} \item{chr}{Vector indicating the chromosome for each new QTL. (These should be character strings referring to the chromosomes by name.)} \item{pos}{Vector (of same length as \code{chr}) indicating the positions on the chromosome for each new QTL. If there is no marker or pseudomarker at a position, the nearest position is used.} \item{qtl.name}{Optional user-specified name for each new QTL, used in the drop-one-term ANOVA table in \code{\link{fitqtl}}. If unspecified, the names will be of the form \code{"Chr1@10"} for a QTL on Chromsome 1 at 10 cM.} \item{drop.lod.profile}{If TRUE, remove any LOD profiles from the object.} } \value{ An object of class \code{qtl}, just like the input \code{qtl} object, but with additional QTL added. See \code{\link{makeqtl}} for details. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 6, 13) qp <- c(25.8, 33.6, 18.63) \dontshow{fake.f2 <- subset(fake.f2, chr=c(qc, 14))} \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") qtl <- addtoqtl(fake.f2, qtl, 14, 35) } \seealso{ \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{dropfromqtl}}, \code{\link{replaceqtl}}, \code{\link{reorderqtl}} } \keyword{utilities} qtl/man/badorder.Rd0000644000176200001440000000205713355127045013707 0ustar liggesusers\name{badorder} \alias{badorder} \docType{data} \title{An intercross with misplaced markers} \description{ Simulated data for an intercross with some markers out of order. } \usage{data(badorder)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 250 F2 individuals typed at a total of 36 markers on four chromosomes. The data were simulated with QTLs at the center of chromosomes 1 and 3. The order of several markers on chromosome 1 is incorrect. Markers on chromosomes 2 and 3 are switched. } \examples{ data(badorder) \dontshow{badorder <- subset(badorder,chr=1) } # estimate recombination fractions badorder <- est.rf(badorder) plotRF(badorder) # re-estimate map newmap <- est.map(badorder) plotMap(badorder, newmap) # assess marker order on chr 1 rip3 <- ripple(badorder, chr=1, window=3) summary(rip3) } \seealso{ \code{\link{est.rf}}, \code{\link{ripple}}, \code{\link{est.map}}, \code{\link{sim.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{datasets} qtl/man/summary.scantwo.Rd0000644000176200001440000002063113355127045015275 0ustar liggesusers\name{summary.scantwo} \alias{summary.scantwo} \title{Summarize the results of a two-dimensional genome scan} \description{ Summarize the interesting aspects of the results of \code{\link{scantwo}}. } \usage{ \method{summary}{scantwo}(object, thresholds, what=c("best", "full", "add", "int"), perms, alphas, lodcolumn=1, pvalues=FALSE, allpairs=TRUE, \dots) } \arguments{ \item{object}{An object of class \code{scantwo}, the output of the function \code{\link{scantwo}}.} \item{thresholds}{A vector of length 5, giving LOD thresholds for the full, conditional-interactive, interaction, additive, and conditional-additive LOD scores. See Details, below.} \item{what}{Indicates for which LOD score the maximum should be reported. See Details, below.} \item{perms}{Optional permutation results used to derive thresholds or to calculate genome-scan-adjusted p-values. This must be consistent with the \code{object} input, in that it must have the same number of LOD score columns, though it can have just one column of permutation results, in which case they are assumed to apply to any chosen LOD score column.} \item{alphas}{If perms are included, these are the significance levels used to calculate thresholds for determining which peaks to pull out. It should be a vector of length 5, giving significance levels for the full, conditional-interactive, interaction, additive, and conditional-additive LOD scores. (It can also be a single number, in which case it is assumed that the same value is used for all five LOD scores.) If \code{thresholds} is specified, \code{alphas} should not be.} \item{lodcolumn}{If the scantwo results contain LOD scores for multiple phenotypes, this argument indicates which to use in the summary. Only one LOD score column may be considered at a time.} \item{pvalues}{If TRUE, include columns with genome-scan-adjusted p-values in the results. This requires that \code{perms} be provided.} \item{allpairs}{If TRUE, all pairs of chromosomes are considered. If FALSE, only self-self pairs are considered, so that one may more conveniently check for possible linked QTL.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.scantwo}, to be printed by \code{print.summary.scantwo}; } \details{ If \code{what="best"}, we calculate, for each pair of chromosomes, the maximum LOD score for the full model (two QTL plus interaction) and the maximum LOD score for the additive model. The difference between these is a LOD score for a test for interaction. We also calculate the difference between the maximum full LOD and the maximum single-QTL LOD score for the two chromosomes; this is the LOD score for a test for a second QTL, allowing for epistasis, which we call either the conditional-interactive or "fv1" LOD score. Finally, we calculate the difference between the maximum additive LOD score and the maximum single-QTL LOD score for the two chromosomes; this is the LOD score for a test for a second QTL, assuming that the two QTL act additively, which we call either the conditional-additive or "av1" LOD score. Note that the maximum full LOD and additive LOD are allowed to occur in different places. If \code{what="full"}, we find the maximum full LOD and extract the additive LOD at the corresponding pair of positions; we derive the other three LOD scores for that fixed pair of positions. If \code{what="add"}, we find the maximum additive LOD and extract the full LOD at the corresponding pair of positions; we derive the other three LOD scores for that fixed pair of positions. If \code{what="int"}, we find the pair of positions for which the difference between the full and additive LOD scores is largest, and then calculate the five LOD scores at that pair of positions. If \code{thresholds} or \code{alphas} is provided (and note that when \code{alphas} is provided, \code{perms} must also), we extract just those pairs of chromosomes for which either (a) the full LOD score exceeds its thresholds and either the conditional-interactive LOD or the interaction LOD exceed their threshold, or (b) the additive LOD score exceeds its threshold and the conditional-additive LOD exceeds its threshold. The thresholds or alphas must be given in the order full, cond-int, int, add, cond-add. Thresholds may be obtained by a permutation test with \code{\link{scantwo}}, but these are extremely time-consuming. For a mouse backcross, we suggest the thresholds (6.0, 4.7, 4.4, 4.7, 2.6) for the full, conditional-interactive, interaction, additive, and conditional-additive LOD scores, respectively. For a mouse intercross, we suggest the thresholds (9.1, 7.1, 6.3, 6.3, 3.3) for the full, conditional-interactive, interaction, additive, and conditional-additive LOD scores, respectively. These were obtained by 10,000 simulations of crosses with 250 individuals, markers at a 10 cM spacing, and analysis by Haley-Knott regression. } \section{Output of addpair}{ \bold{Note} that, for output from \code{\link{addpair}} in which the new loci are indicated explicitly in the formula, the summary provided by \code{summary.scantwo} is somewhat special. All arguments except \code{allpairs} and \code{thresholds} (and, of course, the input \code{object}) are ignored. If the formula is symmetric in the two new QTL, the output has just two LOD score columns: \code{lod.2v0} comparing the full model to the model with neither of the new QTL, and \code{lod.2v1} comparing the full model to the model with just one new QTL. If the formula is \emph{not} symmetric in the two new QTL, the output has three LOD score columns: \code{lod.2v0} comparing the full model to the model with neither of the new QTL, \code{lod.2v1b} comparing the full model to the model in which the first of the new QTL is omitted, and \code{lod.2v1a} comparing the full model to the model with the second of the new QTL omitted. The \code{thresholds} argument should have length 1 or 2, rather than the usual 5. Rows will be retained if \code{lod.2v0} is greater than \code{thresholds[1]} and \code{lod.2v1} (or either of \code{lod.2v1a} or \code{lod.2v1b}) is greater than \code{thresholds[2]}. (If a single thresholds is given, we assume that \code{thresholds[2]==0}.) } \section{The older version}{ The previous version of this function is still available, though it is now named \code{\link{summaryScantwoOld}}. We much prefer the revised function. However, while we are confident that this function (and the permutations in \code{\link{scantwo}}) are calculating the relevant statistics, the appropriate significance levels for these relatively complex series of statistical tests is not yet completely clear. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(1,8,13,"X"))} fake.f2 <- calc.genoprob(fake.f2, step=5) out.2dim <- scantwo(fake.f2, method="hk") # All pairs of chromosomes summary(out.2dim) # Chromosome pairs meeting specified criteria summary(out.2dim, thresholds=c(9.1, 7.1, 6.3, 6.3, 3.3)) # Similar, but ignoring the interaction LOD score in the rule summary(out.2dim, thresholds=c(9.1, 7.1, Inf, 6.3, 3.3)) # Pairs having largest interaction LOD score, if it's > 4 summary(out.2dim, thresholds=c(0, Inf, 4, Inf, Inf), what="int") # permutation test to get thresholds; run in two batches # and then combined with c.scantwoperm \dontrun{operm.2dimA <- scantwo(fake.f2, method="hk", n.perm=500) operm.2dimB <- scantwo(fake.f2, method="hk", n.perm=500) operm.2dim <- c(operm.2dimA, operm.2dimB)} \dontshow{strata <- pull.pheno(fake.f2, "sex") + pull.pheno(fake.f2, "pgm")*2 operm.2dim <- scantwo(fake.f2, method="hk", n.perm=100, perm.strata=strata)} # estimated LOD thresholds summary(operm.2dim) # Summary, citing significance levels and so estimating thresholds # from the permutation results summary(out.2dim, perms=operm.2dim, alpha=rep(0.05, 5)) # Similar, but ignoring the interaction LOD score in the rule summary(out.2dim, perms=operm.2dim, alpha=c(0.05, 0.05, 0, 0.05, 0.05)) # Similar, but also getting genome-scan-adjusted p-values summary(out.2dim, perms=operm.2dim, alpha=c(0.05, 0.05, 0, 0.05, 0.05), pvalues=TRUE) } \seealso{ \code{\link{scantwo}}, \code{\link{plot.scantwo}}, \code{\link{max.scantwo}}, \code{\link{condense.scantwo}} } \keyword{print} qtl/man/plot.pheno.Rd0000644000176200001440000000257313355127045014216 0ustar liggesusers\name{plotPheno} \alias{plotPheno} \title{Plot a phenotype distribution} \description{ Plots a histogram or barplot of the data for a phenotype from an experimental cross. } \usage{ plotPheno(x, pheno.col=1, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{The phenotype column to plot: a numeric index, or the phenotype name as a character string. Alternatively, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{\dots}{Passed to \code{\link[graphics]{hist}} or \code{\link[graphics]{barplot}}.} } \value{None.} \details{ Numeric phenotypes are displayed as histograms with approximately \eqn{2\sqrt{n}}{2 sqrt(n)} bins. Phenotypes that are factors or that have very few unique values are displayed as barplots. } \examples{ data(fake.bc) plotPheno(fake.bc, pheno.col=1) plotPheno(fake.bc, pheno.col=3) plotPheno(fake.bc, pheno.col="age") } \seealso{ \code{\link{plot.cross}}, \code{\link{plotMap}}, \code{\link{plotMissing}}, \code{\link[graphics]{hist}}, \code{\link[graphics]{barplot}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/geno.table.Rd0000644000176200001440000000450513355127045014143 0ustar liggesusers\name{geno.table} \alias{geno.table} \title{Create table of genotype distributions} \description{ Create table showing the observed numbers of individuals with each genotype at each marker, including P-values from chi-square tests for Mendelian segregation. } \usage{ geno.table(cross, chr, scanone.output=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{scanone.output}{If TRUE, give result in the form output by \code{\link{scanone}}, so that one may use \code{\link{plot.scanone}}, etc.} } \value{ If \code{scanone.output=FALSE}, the output is a matrix containing, for each marker, the number of individuals with each possible genotype, as well as the number that were not typed. The first column gives the chromosome ID, and the last column gives P-values from chi-square tests of Mendelian segregation. If \code{scanone.output=TRUE}, the output is of the form produced by \code{\link{scanone}}, with the first two columns being chromosome IDs and cM positions of the markers. The third column is \eqn{-\log_{10}(P)}{-log10P} from chi-square tests of Mendelian segregation. The fourth column is the proportion of missing data. The remaining columns are the proportions of the different genotypes (among typed individuals). } \details{ The P-values are obtained from chi-square tests of Mendelian segregation. In the case of the X chromosome, the sexes and cross directions are tested separately, and the chi-square statistics combined, and so the test is of whether any of the groups show deviation from Mendel's rules. } \examples{ data(listeria) geno.table(listeria) geno.table(listeria, chr=13) gt <- geno.table(listeria) gt[gt$P.value < 0.01,] out <- geno.table(listeria, scanone.output=TRUE) plot(out) plot(out, lod=2) } \seealso{ \code{\link{summary.cross}}, \code{\link{drop.markers}}, \code{\link{drop.nullmarkers}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/top.errorlod.Rd0000644000176200001440000000264513355127045014561 0ustar liggesusers\name{top.errorlod} \alias{top.errorlod} \title{List genotypes with large error LOD scores} \description{ Prints those genotypes with error LOD scores above a specified cutoff. } \usage{ top.errorlod(cross, chr, cutoff=4, msg=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{cutoff}{Only those genotypes with error LOD scores above this cutoff will be listed.} \item{msg}{If TRUE, print a message if there are no apparent errors.} } \value{ A data.frame with 4 columns, whose rows correspond to the genotypes that are possibly in error. The four columns give the chromosome number, individual number, marker name, and error LOD score. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=c(1,19))} # Calculate error LOD scores hyper <- calc.errorlod(hyper,error.prob=0.01) # Print those above a specified cutoff top.errorlod(hyper,cutoff=4) } \seealso{ \code{\link{calc.errorlod}}, \code{\link{plotGeno}}, \code{\link{plotErrorlod}} } \keyword{print} qtl/man/pull.pheno.Rd0000644000176200001440000000165713355127045014216 0ustar liggesusers\name{pull.pheno} \alias{pull.pheno} \title{Pull out phenotype data from a cross} \description{ Pull out selected phenotype data from a cross object, as a data frame or vector. } \usage{pull.pheno(cross, pheno.col)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{A vector specifying which phenotypes to keep or discard. This may be a logical vector, a numeric vector, or a vector of character strings (for the phenotype names). If missing, the entire set of phenotypes is output.} } \value{ A data.frame with columns specifying phenotypes and rows specifying individuals. If there is just one phenotype, a vector (rather than a data.frame) is returned. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) pull.pheno(listeria, "sex") } \seealso{ \code{\link{pull.geno}}, \code{\link{pull.map}} } \keyword{utilities} qtl/man/plotLodProfile.Rd0000644000176200001440000000772013355127045015065 0ustar liggesusers\name{plotLodProfile} \alias{plotLodProfile} \title{Plot 1-d LOD profiles for a multiple QTL model} \description{ Use the results of \code{\link{refineqtl}} to plot one-dimensional LOD profiles for each QTL. } \usage{ plotLodProfile(qtl, chr, incl.markers=TRUE, gap=25, lwd=2, lty=1, col="black", qtl.labels=TRUE, mtick=c("line", "triangle"), show.marker.names=FALSE, alternate.chrid=FALSE, add=FALSE, showallchr=FALSE, labelsep=5, \dots) } \arguments{ \item{qtl}{An object of class \code{"qtl"}; must have been produced by \code{\link{refineqtl}} using \code{keeplodprofiles=TRUE}.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{incl.markers}{Indicate whether to plot line segments at the marker locations.} \item{gap}{Gap separating chromosomes (in cM).} \item{lwd}{Line widths for each QTL trace (length 1 or the number of QTL).} \item{lty}{Line types for each QTL trace (length 1 or the number of QTL).} \item{col}{Line col for each QTL trace (length 1 or the number of QTL).} \item{qtl.labels}{If TRUE, place a label on each QTL trace.} \item{mtick}{Tick mark type for markers (line segments or upward-pointing triangels).} \item{show.marker.names}{If TRUE, show the marker names along the x axis.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{add}{If TRUE, add curves to a current plot.} \item{showallchr}{If FALSE (the default), only show the chr with a QTL} \item{labelsep}{If \code{qtl.labels=TRUE}, separation between peak LOD and QTL label, as percent of the height of the plot.} \item{\dots}{Passed to the function \code{\link[graphics]{plot}} when it is called.} } \value{None.} \details{ The function plots LOD profiles in the context of a multiple QTL model, using a scheme best described in Zeng et al. (2000). The position of each QTL is varied, keeping all other loci fixed. If a QTL is isolated on a chromosome, the entire chromosome is scanned; if there are additional linked QTL, the position of a QTL is scanned over the largest interval possible without allowing the order of QTLs along a chromosome to change. At each position for the QTL being scanned, we calculate a LOD score comparing the full model, with the QTL of interest at that particular position (and all others at their fixed positions) to the model with the QTL of interest (and any interactions that include that QTL) omitted. Care should be take regarding the arguments \code{lwd}, \code{lty}, and \code{col}; if vectors are given, they should be in the order of the QTL within the object, which may be different than the order in which they are plotted. (The LOD profiles are sorted by chromosome and position.) } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(2,5))} fake.bc <- calc.genoprob(fake.bc, step=2) qtl <- makeqtl(fake.bc, chr=c(2,5), pos=c(32.5, 17.5), what="prob") out <- scanone(fake.bc, method="hk") # refine QTL positions and keep LOD profiles rqtl <- refineqtl(fake.bc, qtl=qtl, method="hk", keeplodprofile=TRUE) # plot the LOD profiles plotLodProfile(rqtl) # add the initial scan results, for comparison plot(out, add=TRUE, chr=c(2,5), col="red") } \seealso{ \code{\link{refineqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}} } \author{Karl W Broman, \email{broman@wisc.edu} } \references{ Zeng Z.-B., Liu, J., Stam, L. F., Kao, C.-H., Mercer, J. M. and Laurie, C. C. (2000) Genetic architecture of a morphological shape difference between two Drosophila species. \emph{Genetics} \bold{154}, 299--310. } \keyword{hplot} qtl/man/convert2risib.Rd0000644000176200001440000000162013355127045014713 0ustar liggesusers\name{convert2risib} \alias{convert2risib} \title{Convert a cross to RIL by sib mating} \description{ Convert a cross to type \code{"risib"} (RIL by sib mating). } \usage{ convert2risib(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The input cross object, with genotype codes possibly changed and cross type changed to \code{"risib"}. } \details{ If there are more genotypes with code 3 (BB) than code 2 (AB), we omit the genotypes with code==2 and call those with code==3 the BB genotypes. If, instead, there are more genotypes with code 2 than code 3, we omit the genotypes with code==3 and call those with code==2 the BB genotypes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) hyper.as.risib <- convert2risib(hyper) } \seealso{ \code{\link{convert2riself}} } \keyword{manip} qtl/man/listeria.Rd0000644000176200001440000000401513005646766013745 0ustar liggesusers\name{listeria} \alias{listeria} \docType{data} \title{Data on Listeria monocytogenes susceptibility} \description{ Data from an experiment on susceptibility to \emph{Listeria monocytogenes} infection in the mouse. } \usage{data(listeria)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 120 F2 individuals typed at 133 markers, including 2 on the X chromosome, with one phenotype. The phenotype is the survival time (in hours) following infection. Mice with phenotype 264 hours may be considered to have recovered from the infection. See the references below. } \references{ Boyartchuk, V. L., Broman, K. W., Mosher, R. E., D'Orazio S. E. F., Starnbach, M. N. and Dietrich, W. F. (2001) Multigenic control of \emph{Listeria monocytogenes} susceptibility in mice. \emph{Nature Genetics} \bold{27}, 259--260. Broman, K. W. (2003) Mapping quantitative trait loci in the case of a spike in the phenotype distribution. \emph{Genetics} \bold{163}, 1169--1175. } \source{ Victor Boyartchuk and William Dietrich (Department of Genetics, Harvard Medical School and Howard Hughes Medical Institute) } \examples{ data(listeria) \dontshow{listeria <- subset(listeria,chr=c(1,5,6,13,15), ind=!is.na(listeria$pheno[,1]))} # Summaries summary(listeria) plot(listeria) # Take log of phenotype listeria$pheno[,1] <- log2(listeria$pheno[,1]) plot(listeria) # Genome scan with a two-part model, using log survival listeria <- calc.genoprob(listeria, step=2) out <- scanone(listeria, model="2part", method="em", upper=TRUE) # Summary of the results summary(out, thr=c(5,3,3), format="allpeaks") # Plot LOD curves for interesting chromosomes # (The two-part model gives three LOD scores) plot(out, chr=c(1,5,6,13,15), lodcolumn=1:3, lty=1, col=c("black","red","blue")) } \seealso{ \code{\link{fake.bc}}, \code{\link{fake.f2}}, \code{\link{fake.4way}}, \code{\link{hyper}}, \code{\link{bristle3}}, \code{\link{bristleX}} } \keyword{datasets} qtl/man/qtlversion.Rd0000644000176200001440000000062113355127045014326 0ustar liggesusers\name{qtlversion} \alias{qtlversion} \title{Installed version of R/qtl} \description{ Print the version number of the currently installed version of R/qtl. } \usage{qtlversion()} %\arguments{ %} \value{ A character string with the version number of the currently installed version of R/qtl. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ qtlversion() } \keyword{print} qtl/man/cbind.scantwoperm.Rd0000644000176200001440000000231113355127045015536 0ustar liggesusers\name{cbind.scantwoperm} \alias{cbind.scantwoperm} \title{Combine scantwo permutations by column} \description{ Column-bind permutations results from \code{\link{scantwo}} for multiple phenotypes or models. } \usage{ \method{cbind}{scantwoperm}(\dots) } \arguments{ \item{\dots}{A set of objects of class \code{scantwoperm}. (This can also be a list of \code{scantwoperm} objects.) These are the permutation results from \code{\link{scantwo}} (that is, when \code{n.perm > 0}). These must all concern the same number of permutations.} } \value{The column-binded input, as a \code{scantwoperm} object.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(18:19), ind=1:50)} fake.bc <- calc.genoprob(fake.bc) \dontrun{operm1 <- scantwo(fake.bc, pheno.col=1, method="hk", n.perm=50) operm2 <- scantwo(fake.bc, pheno.col=2, method="hk", n.perm=50)}\dontshow{ operm1 <- scantwo(fake.bc, pheno.col=1, method="hk", n.perm=3) operm2 <- scantwo(fake.bc, pheno.col=2, method="hk", n.perm=3)} operm <- cbind(operm1, operm2) } \seealso{ \code{\link{scantwo}}, \code{\link{c.scantwoperm}}, \code{\link{summary.scantwoperm}} } \keyword{manip} qtl/man/condense.scantwo.Rd0000644000176200001440000000220113355127045015367 0ustar liggesusers\name{condense.scantwo} \alias{condense.scantwo} \title{Condense the output from a 2-d genome scan} \description{ Produces a very condensed version of the output of \code{\link{scantwo}}. } \usage{ \method{condense}{scantwo}(object) } \arguments{ \item{object}{An object of class \code{scantwo}, the output of the function \code{\link{scantwo}}.} } \value{ An object of class \code{scantwocondensed}, containing just the maximum full, additive and interactive LOD scores, and the positions where they occured, on each pair of chromosomes. } \details{ This produces a very reduced version of the output of \code{\link{scantwo}}, for which a summary may still be created via \code{\link{summary.scantwo}}, though plots can no longer be made. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"))} fake.f2 <- calc.genoprob(fake.f2) out2 <- scantwo(fake.f2, method="hk") out2c <- condense(out2) summary(out2c, allpairs=FALSE) max(out2c) } \seealso{ \code{\link{scantwo}}, \code{\link{summary.scantwo}}, \code{\link{max.scantwo}} } \keyword{print} qtl/man/drop.markers.Rd0000644000176200001440000000167013355127045014534 0ustar liggesusers\name{drop.markers} \alias{drop.markers} \title{Drop a set of markers} \description{ Drop a vector of markers from the data matrices and genetic maps. } \usage{ drop.markers(cross, markers) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{markers}{A character vector of marker names.} } \value{ The input object, with any markers in the vector \code{markers} removed from the genotype data matrices, genetic maps, and, if applicable, any derived data (such as produced by \code{\link{calc.genoprob}}). (It might be a good idea to re-derive such things after using this function.) } \examples{ data(listeria) listeria2 <- drop.markers(listeria, c("D10M44","D1M3","D1M75")) } \seealso{ \code{\link{drop.nullmarkers}}, \code{\link{pull.markers}}, \code{\link{geno.table}}, \code{\link{clean.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/findDupMarkers.Rd0000644000176200001440000000430413355127045015040 0ustar liggesusers\name{findDupMarkers} \alias{findDupMarkers} \title{Find markers with identical genotype data} \description{ Identify sets of markers with identical genotype data. } \usage{ findDupMarkers(cross, chr, exact.only=TRUE, adjacent.only=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector specifying which chromosomes to consider. This may be a logical, numeric, or character string vector.} \item{exact.only}{If TRUE, look only for markers that have matching genotypes and the same pattern of missing data; if FALSE, also look for cases where one the observed genotypes at marker match those at another, and where the first marker has missing genotype whenever the genotype for the second marker is missing.} \item{adjacent.only}{If TRUE, look only for sets of markers that are adjacent to each other.} } \value{A list of marker names; each component is a set of markers whose genotypes match one other marker, and the name of the component is the name of the marker that they match.} \details{ If \code{exact.only=TRUE}, we look only for groups of markers whose pattern of missing data and observed genotypes match exactly. One marker (chosen at random) is selected as the name of the group (in the output of the function). If \code{exact.only=FALSE}, we look also for markers whose observed genotypes are contained in the observed genotypes of another marker. We use a pair of nested loops, working from the markers with the most observed genotypes to the markers with the fewest observed genotypes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) hyper <- drop.nullmarkers(hyper) dupmar <- findDupMarkers(hyper) # finds 4 pairs dupmar.adjonly <- findDupMarkers(hyper, adjacent.only=TRUE) # finds 4 pairs dupmar.nexact <- findDupMarkers(hyper, exact.only=FALSE, adjacent.only=TRUE) # finds 6 pairs # one might consider dropping the extra markers totmar(hyper) # 173 markers hyper <- drop.markers(hyper, unlist(dupmar.adjonly)) totmar(hyper) # 169 markers } \seealso{ \code{\link{drop.nullmarkers}}, \code{\link{drop.markers}}, \code{\link{pickMarkerSubset}} } \keyword{manip} qtl/man/summary.fitqtl.Rd0000644000176200001440000000243113355127045015120 0ustar liggesusers\name{summary.fitqtl} \alias{summary.fitqtl} \title{Summary of fit of qtl model} \description{ Print summary information about the results of \code{\link{fitqtl}}. } \usage{ \method{summary}{fitqtl}(object, pvalues=TRUE, simple=FALSE, \dots) } \arguments{ \item{object}{Output from \code{\link{fitqtl}}.} \item{pvalues}{If FALSE, don't include p-values in the summary.} \item{simple}{If TRUE, don't include p-values or sums of squares in the summary.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.fitqtl}, which is not all that different than the input, but when printed gives summary information about the results. } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 8, 13) qp <- c(26, 56, 28) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") # fit model with 3 interacting QTLs interacting # (performing a drop-one-term analysis) lod <- fitqtl(fake.f2, pheno.col=1, qtl, formula=y~Q1*Q2*Q3, method="hk") summary(lod) } \seealso{ \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}} } \keyword{print} qtl/man/fill.geno.Rd0000644000176200001440000000651413355127045014004 0ustar liggesusers\name{fill.geno} \alias{fill.geno} \title{Fill holes in genotype data} \description{ Replace the genotype data for a cross with a version imputed either by simulation with \code{\link{sim.geno}}, by the Viterbi algorithm with \code{\link{argmax.geno}}, or simply filling in genotypes between markers that have matching genotypes. } \usage{ fill.geno(cross, method=c("imp","argmax", "no_dbl_XO", "maxmarginal"), error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), min.prob=0.95) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{method}{Indicates whether to impute using a single simulation replicate from \code{\link{sim.geno}}, using the Viterbi algorithm, as implemented in \code{\link{argmax.geno}}, by simply filling in missing genotypes between markers with matching genotypes, or by choosing (at each marker) the genotype with maximal marginal probability.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions.} \item{min.prob}{For \code{method="maxmarginal"}, genotypes with probability greater than this value will be imputed; those less than this value will be made missing.} } \details{ This function is written so that one may perform rough genome scans by marker regression without having to drop individuals with missing genotype data. \bold{We must caution the user that little trust should be placed in the results}. With \code{method="imp"}, a single random imputation is performed, using \code{\link{sim.geno}}. With \code{method="argmax"}, for each individual the most probable sequence of genotypes, given the observed data (via \code{argmax.geno}), is used. With \code{method="no_dbl_XO"}, non-recombinant intervals are filled in; recombinant intervals are left missing. For example, a sequence of genotypes like \code{A---A---H---H---A} (with \code{A} and \code{H} corresponding to genotypes AA and AB, respectively, and with \code{-} being a missing value) will be filled in as \code{AAAAA---HHHHH---A}. With \code{method="maxmarginal"}, the conditional genotype probabilities are calculated with \code{calc.genoprob}, and then at each marker, the most probable genotype is determined. This is taken as the imputed genotype if it has probability greater than \code{min.prob}; otherwise it is made missing. With \code{method="no_dbl_XO"} and \code{method="maxmarginal"}, some missing genotypes likely remain. With \code{method="maxmarginal"}, some observed genotypes may be made missing. } \value{ The input \code{cross} object with the genotype data replaced by an imputed version. Any intermediate calculations (such as is produced by \code{\link{calc.genoprob}}, \code{\link{argmax.geno}} and \code{\link{sim.geno}}) are removed. } \examples{ data(hyper) \dontshow{hyper <- subset(hyper,chr=18:19)} out.mr <- scantwo(fill.geno(hyper,method="argmax"), method="mr") plot(out.mr) } \seealso{ \code{\link{sim.geno}}, \code{\link{argmax.geno}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/plot.scanoneboot.Rd0000644000176200001440000000205613355127045015413 0ustar liggesusers\name{plot.scanoneboot} \alias{plot.scanoneboot} \title{Plot results of bootstrap for QTL position} \description{ Plot a histogram of the results of a nonparametric bootstrap to assess uncertainty in QTL position. } \usage{ \method{plot}{scanoneboot}(x, \dots) } \arguments{ \item{x}{An object of class \code{"scanoneboot"}, as output by \code{\link{scanoneboot}}.} \item{\dots}{Passed to the function \code{\link[graphics]{hist}} when it is called.} } \value{None.} \details{ The function plots a histogram of the bootstrap results obtained by \code{\link{scanoneboot}}. Genetic marker locations are displayed by vertical lines at the bottom of the plot. } \examples{ data(fake.f2) fake.f2 <- calc.genoprob(fake.f2, step=1) \dontrun{out.boot <- scanoneboot(fake.f2, chr=13, method="hk")} \dontshow{out.boot <- scanoneboot(fake.f2, chr=13, method="hk", n.boot=50)} summary(out.boot) plot(out.boot) } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanoneboot}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/mqmplotcistrans.Rd0000644000176200001440000000577413526005051015366 0ustar liggesusers\name{mqmplot.cistrans} \alias{mqmplot.cistrans} \title{cis-trans plot} \description{ Plot results for a genomescan using a multiple-QTL model. With genetic location for the traits it is possible to show cis- and trans- locations, and detect trans-bands } \usage{ mqmplot.cistrans(result, cross, threshold=5, onlyPEAK=TRUE, highPEAK=FALSE, cisarea=10, pch=22, cex=0.5, verbose=FALSE, \dots) } \arguments{ \item{result}{An object of class \code{mqmmulti}. See \code{\link{mqmscanall}} for details.} \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{threshold}{ Threshold value in LOD, Markers that have a LOD score above this threshold are plotted as small squares (see \code{pch} parameter). The markers with LODscores below this threshold are not visible } \item{onlyPEAK}{ Plot only the peak markers ? (TRUE/FALSE) (Peak markers are markers that have a QTL likelihood above \code{threshold} and higher than other markers in the same region) } \item{highPEAK}{ Highlight peak markers ? (TRUE/FALSE). When using this option peak markers (the marker with the highest LOD score in a region above the threshold gets an 25\% increase in size and is displayed in red) } \item{cisarea}{ Adjust the two green lines around the line y=x } \item{pch}{ What kind of character is used in plotting of the figure (Default: 22, small square) } \item{cex}{ Size of the points plotted (default to 0.5 half of the original size)} \item{verbose}{If TRUE, give verbose output} \item{\dots}{ Extra parameters will be passed to points } } %\details{ % %} \value{ Plotting routine, so no return } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a))))} data(locations) multiloc <- addloctocross(multitrait,locations) multiloc <- calc.genoprob(multiloc) results <- scanall(multiloc, method="hk") mqmplot.cistrans(results, multiloc, 5, FALSE, TRUE) } \keyword{ hplot } qtl/man/plot.map.Rd0000644000176200001440000000516713355127045013664 0ustar liggesusers\name{plotMap} \alias{plotMap} \alias{plot.map} \title{Plot genetic map} \description{ Plot genetic map of marker locations for all chromosomes. } \usage{ \method{plot}{map}(x, map2, chr, horizontal=FALSE, shift=TRUE, show.marker.names=FALSE, alternate.chrid=FALSE, \dots) plotMap(x, map2, chr, horizontal=FALSE, shift=TRUE, show.marker.names=FALSE, alternate.chrid=FALSE, \dots) } \arguments{ \item{x}{A list whose components are vectors of marker locations. A \code{cross} object may be given instead, in which case the genetic map it contains is used.} \item{map2}{An optional second genetic map with the same number (and names) of chromosomes. As with the first argument, a \code{cross} object may be given instead. If this argument is given, a comparison of the two genetic maps is plotted.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{horizontal}{Specifies whether the chromosomes should be plotted horizontally.} \item{shift}{If TRUE, shift the first marker on each chromosome to be at 0 cM.} \item{show.marker.names}{If TRUE, marker names are included.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Passed to \code{\link[graphics]{plot}}.} } \value{None.} \details{ Plots the genetic map for each chromosome, or a comparison of the genetic maps if two maps are given. For a comparison of two maps, the first map is on the left (or, if \code{horizontal=TRUE}, on the top). Lines are drawn to connect markers. Markers that exist in just one map and not the other are indicated by short line segments, on one side or the other, that are not connected across. For a sex-specific map, female and male maps are plotted against one another. For two sex-specific maps, the two female maps are plotted against one another and the two male maps are plotted against one another. } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=18:19)} plotMap(fake.bc) plotMap(fake.bc,horizontal=TRUE) newmap <- est.map(fake.bc) plot(newmap) plotMap(fake.bc, newmap) plotMap(fake.bc, show.marker.names=TRUE) } \seealso{ \code{\link{est.map}}, \code{\link{plot.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/mqmscan.Rd0000644000176200001440000001534013540452600013555 0ustar liggesusers\name{mqmscan} \alias{mqmscan} \title{Genome scan with a multiple QTL model (MQM)} \description{ Genome scan with a multiple QTL model. } \usage{ mqmscan(cross, cofactors=NULL, pheno.col = 1, model=c("additive","dominance"), forceML=FALSE, cofactor.significance=0.02, em.iter=1000, window.size=25.0, step.size=5.0, logtransform = FALSE, estimate.map = FALSE, plot=FALSE, verbose=FALSE, outputmarkers=TRUE, multicore=TRUE, batchsize=10, n.clusters=1, test.normality=FALSE,off.end=0 ) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{cofactors}{ List of cofactors to be analysed as cofactors in backward elimination procedure when building the QTL model. See \code{\link{mqmsetcofactors}} on how-to manually set cofactors for backward elimination. Or use \code{\link{mqmautocofactors}} for automatic selection of cofactors. Only three kind of (integer) values are allowed in the cofactor list. (0: no cofactor at this marker, 1: Use this marker as an additive cofactor, 2: Use this marker as an sexfactor (Dominant cofactor)) } \item{pheno.col}{ Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers; One may also give a character strings matching the phenotype names. Finally, one may give a numeric vector of phenotypeIDs. This should consist of integers with 0 < value < no. phenotypes. } \item{model}{ When scanning for QTLs should haplotype dominance be considered in an F2 intercross. Using the dominance model we scan for additive effects but also allow an additional effect where AA+AB versus BB and AA versus AB+BB. This setting is ignored for BC and RIL populations } \item{forceML}{ Specify which statistical method to use to estimate variance components to use when QTL modeling and mapping. Default usage is the Restricted maximum likelihood approach (REML). With this option a user can disable REML and use maximum likelihood. } \item{cofactor.significance}{ Significance level at which a cofactor is considered significant. This is estimated using an analysis of deviance, and compared to the level specified by the user. The cofactors that dont reach this level of statistical significance are NOT used in the mapping stage. Value between 0 and 1 } \item{em.iter}{ Maximum number of iterations for the EM algorithm to converge } \item{window.size}{ Window size for mapping QTL locations, this parameter is used in the interval mapping stage. When calculating LOD scores at a genomic position all cofactors within window.size are dropped to estimate the (unbiased) effect of the location under interest. } \item{step.size}{ Step size used in interval mapping. A lower step.size parameter increases the number of output points, this creates a smoother QTL profile } \item{off.end}{Distance (in cM) past the terminal markers on each chromosome to which the genotype simulations will be carried. } \item{logtransform}{ Indicate if the algorithm should do a log transformation on the trait data in the pheno.col } \item{estimate.map}{ Should Re-estimation of the marker locations on the genetic map occur before mapping QTLs. This method is deprecated rather use the \code{\link{est.map}} function in R/qtl. This is because no map is returned into the crossobject. The old map remains in the cross object. } \item{plot}{ plot the results (default FALSE)} \item{verbose}{ verbose output} \item{outputmarkers}{If TRUE (the default), the results include the marker locations as well as along a grid of pseudomarkers; if FALSE, the results include only the grid positions.} \item{multicore}{Use multicore (if available)} \item{batchsize}{Number of traits being analyzed as a batch.} \item{n.clusters}{Number of child processes to split the job into.} \item{test.normality}{If TRUE, test whether the phenotype follows a normal distribution via \code{\link{mqmtestnormal}}. } } %\details{ %} \value{ When scanning a single phenotype the function returns a \code{\link{scanone}} object. The object contains a matrix of three columns for LOD scores, information content and LOD*information content with pseudo markers sorted in increasing order. For more information on the scanone object see: \code{\link{scanone}} } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \note{ The resulting scanone object itself can be visualized using the standard R/qtl plotting routines (\code{\link{plot.scanone}}) or specialized function to show the mqm model (\code{\link{mqmplot.singletrait}}) and QTL profile. If cofactors were specified the QTL model used in scanning is also returned as a named attribute of the scanone object called mqmmodel. It can be extracted from the resulting scanone object by using the \code{\link{mqmgetmodel}} function or the \code{\link{attr}} function. Also note the \code{estimate.map} parameter does not return its re-estimated genetic map, altough it is used internally. When scanning multiple genotypes a \code{mqmmulti} object is created. This object is just a list composed of scanone objects. The results for a single trait can be obtained from the \code{mqmmulti} object, in scanone format. } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ % \input{"inst/doc/Sources/MQM/mqm/standard_example.txt"} data(map10) # Genetic map modeled after mouse # simulate a cross (autosomes 1-10) qtl <- c(3,15,1,0) # QTL model: chr, pos'n, add've & dom effects cross <- sim.cross(map10[1:10],qtl,n=100,missing.prob=0.01) # MQM crossaug <- mqmaugment(cross) # Augmentation cat(crossaug$mqm$Nind,'real individuals retained in dataset', crossaug$mqm$Naug,'individuals augmented\n') result <- mqmscan(crossaug) # Scan # show LOD interval of the QTL on chr 3 lodint(result,chr=3) % -----^^ inst/doc/Sources/MQM/mqm/standard_example.txt ^^----- } \keyword{ models } qtl/man/convert.scantwo.Rd0000644000176200001440000000172713355127045015265 0ustar liggesusers\name{convert.scantwo} \alias{convert.scantwo} \title{Convert output from scantwo for R/qtl version 1.03 and earlier} \description{ Convert the output from scantwo from the format used in R/qtl version 1.03 and earlier to that used in version 1.04 and later. } \usage{ \method{convert}{scantwo}(object, \dots) } \arguments{ \item{object}{Output from the function \code{\link{scantwo}}, for R/qtl version 1.03 and earlier.} \item{\dots}{Ignored at this point.} } \value{ The same scanone output, but revised for use with R/qtl version 1.03 and later. } \details{ Previously, the output from \code{\link{scantwo}} contained the full and interaction LOD scores. In R/qtl version 1.04 and later, the output contains the LOD scores from the full and additive QTL models. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ \dontrun{out2.new <- convert(out2.old)} } \seealso{ \code{\link{scantwo}}, \code{\link{convert.scanone}} } \keyword{manip} qtl/man/mqmplotmultitrait.Rd0000644000176200001440000000473013526005066015733 0ustar liggesusers\name{mqmplot.multitrait} \alias{mqmplot.multitrait} \title{Plot the results from a genomescan using a multiple-QTL model on multiple phenotypes} \description{ Plotting routine to display the results from a multiple-QTL model on multiple phenotypes. It supports four different visualizations: a contourmap, heatmap, 3D graph or a multiple QTL plot created by using \code{\link{plot.scanone}} on the \code{mqmmulti} object } \usage{ mqmplot.multitrait(result, type=c("lines","image","contour","3Dplot"), group=NULL, meanprofile=c("none","mean","median"), theta=30, phi=15, \dots) } \arguments{ \item{result}{ Result object from \code{\link{mqmscanall}} } \item{type}{ Selection of the plot method to visualize the data: "lines" (defaut plotting option), "image", "contour" and "3Dplot" } \item{group}{ A numeric vector indicating which traits to plot. NULL means no grouping } \item{meanprofile}{ Plot a mean/median profile from the group selected } \item{theta}{ Horizontal axis rotation in a 3D plot } \item{phi}{ Vertical axis rotation in a 3D plot } \item{\dots}{Additional arguments passed to \code{\link[graphics]{plot}}.} } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3]} multitrait <- fill.geno(multitrait) # impute missing genotype data result <- mqmscanall(multitrait, logtransform=TRUE) mqmplot.multitrait(result,"lines") mqmplot.multitrait(result,"contour") mqmplot.multitrait(result,"image") mqmplot.multitrait(result,"3Dplot") } \keyword{ hplot } qtl/man/mqmplotclusteredheatmap.Rd0000644000176200001440000000522613526005054017065 0ustar liggesusers\name{mqmplot.clusteredheatmap} \alias{mqmplot.clusteredheatmap} \title{Plot clustered heatmap of MQM scan on multiple phenotypes} \description{ Plot the results from a MQM scan on multiple phenotypes. } \usage{ mqmplot.clusteredheatmap(cross, mqmresult, directed=TRUE, legend=FALSE, Colv=NA, scale="none", verbose=FALSE, breaks = c(-100,-10,-3,0,3,10,100), col = c("darkblue","blue","lightblue","yellow", "orange","red"), \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{mqmresult}{ Result object from mqmscanall, the object needs to be of class \code{mqmmulti} } \item{directed}{ Take direction of QTLs into account (takes more time because of QTL direction calculations } \item{legend}{ If TRUE, add a legend to the plot } \item{Colv}{ Cluster only the Rows, the columns (Markers) should not be clustered } \item{scale}{ character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default "none" } \item{verbose}{If TRUE, give verbose output.} \item{breaks}{ Color break points for the LOD scores } \item{col}{ Colors used between breaks } \item{\dots}{Additional arguments passed to \code{\link[stats]{heatmap}}.} } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3]} multitrait <- fill.geno(multitrait) # impute missing genotype data result <- mqmscanall(multitrait, logtransform=TRUE) cresults <- mqmplot.clusteredheatmap(multitrait,result) groupclusteredheatmap(multitrait,cresults,10) } \keyword{ hplot } qtl/man/strip.partials.Rd0000644000176200001440000000144413355127045015103 0ustar liggesusers\name{strip.partials} \alias{strip.partials} \title{Strip partially informative genotypes} \description{ Replace all partially informative genotypes (e.g., dominant markers in an intercross) with missing values. } \usage{strip.partials(cross, verbose=TRUE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{verbose}{If TRUE, print the number of genotypes removed.} } \value{ The same class \code{cross} object as in the input, but with partially informative genotypes made missing. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) sum(nmissing(listeria)) listeria <- strip.partials(listeria) sum(nmissing(listeria)) } \seealso{ \code{\link{plotMissing}}, \code{\link{plotInfo}} } \keyword{manip} qtl/man/flip.order.Rd0000644000176200001440000000214013355127045014162 0ustar liggesusers\name{flip.order} \alias{flip.order} \title{Flip the orders of markers on a set of chromosomes} \description{ Flip the orders of markers on a specified set of chromosome, so that the markers will be in the reverse order. } \usage{flip.order(cross, chr)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Vector indicating the chromosomes to flip. This should be a vector of character strings referring to chromosomes by name. A logical (TRUE/FALSE) vector may also be used.} } \value{ The input \code{cross} object, but with the marker order on the specified chromosomes flipped. } \details{ If the cross contains results from \code{\link{calc.genoprob}}, \code{\link{sim.geno}}, \code{\link{argmax.geno}}, or \code{\link{calc.errorlod}}, those results are also updated. Results of \code{\link{est.rf}} and \code{\link{markerlrt}} are deleted. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) fake.f2 <- flip.order(fake.f2, c(1, 5, 13)) } \seealso{ \code{\link{switch.order}} } \keyword{manip} qtl/man/mqmsetcofactors.Rd0000644000176200001440000000477613526005006015341 0ustar liggesusers\name{mqmsetcofactors} \alias{mqmsetcofactors} \title{Set cofactors at fixed intervals, to be used with MQM} \description{ Set cofactors, at fixed marker intervals. Together with \code{mqmscan} cofactors are selected through backward elimination. } \usage{ mqmsetcofactors(cross, each = NULL, cofactors=NULL, sexfactors=NULL, verbose=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{each}{ Every 'each' marker will be used as a cofactor, when each is used the \code{cofactors} and \code{sexfactors} parameter is ignored } \item{cofactors}{ List of cofactors to be analysed in the QTL model. To set cofactors use \code{\link{mqmautocofactors}} or \code{mqmsetcofactors}; when \code{each} is set, this parameter is ignored } \item{sexfactors}{ list of markers which should be treated as dominant cofactors (sexfactors), when \code{each} is set, this parameter is ignored } \item{verbose}{If TRUE, print tracing information.} } \value{ An list of cofactors to be passed into \code{\link{mqmscan}}. } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(hyper) # Hyper dataset \dontshow{hyper <- hyper[1:5]} hyperfilled <- fill.geno(hyper) # Automatic cofactors every third marker cofactors <- mqmsetcofactors(hyperfilled,3) result <- mqmscan(hyperfilled,cofactors) # Backward model selection mqmgetmodel(result) #Manual cofactors at markers 3,6,9,12,40 and 60 cofactors <- mqmsetcofactors(hyperfilled,cofactors=c(3,6,9,12,40,60)) result <- mqmscan(hyperfilled,cofactors) # Backward model selection mqmgetmodel(result) } \keyword{ models } qtl/man/effectscan.Rd0000644000176200001440000000735213355127045014231 0ustar liggesusers\name{effectscan} \alias{effectscan} \title{Plot estimated QTL effects across the whole genome} \description{ This function is used to plot the estimated QTL effects along selected chromosomes. For a backcross, there will be only one line, representing the additive effect. For an intercross, there will be two lines, representing the additive and dominance effects. } \usage{ effectscan(cross, pheno.col=1, chr, get.se=FALSE, draw=TRUE, gap=25, ylim, mtick=c("line","triangle"), add.legend=TRUE, alternate.chrid=FALSE, \dots) } \arguments{ \item{cross}{An object of class \code{cross}.} \item{pheno.col}{Column number in the phenotype matrix which to be drawn in the plot. One may also give a character string matching a phenotype name.} \item{chr}{Optional vector indicating the chromosomes to be drawn in the plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{get.se}{If TRUE, estimated standard errors are calculated.} \item{draw}{If TRUE, draw the figure.} \item{gap}{Gap separating chromosomes (in cM).} \item{ylim}{Y-axis limits (optional).} \item{mtick}{Tick mark type for markers.} \item{add.legend}{If TRUE, add a legend.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Passed to the function \code{\link[graphics]{plot}} when it is called.} } \value{ The results are returned silently, as an object of class \code{"effectscan"}, which is the same as the form returned by the function \code{\link{scanone}}, though with estimated effects where LOD scores might be. That is, it is a data frame with the first two columns being chromosome ID and position (in cM), and subsequent columns being estimated effects, and (if \code{get.se=TRUE}) standard errors. } \details{ The results of \code{\link{sim.geno}} are required for taking account of missing genotype information. For a backcross, the additive effect is estimated as the difference between the phenotypic averages for heterozygotes and homozygotes. For recombinant inbred lines, the additive effect is estimated as half the difference between the phenotypic averages for the two homozygotes. For an intercross, the additive and dominance effects are estimated from linear regression on \eqn{a} and \eqn{d} with \eqn{a} = -1, 0, 1, for the AA, AB and BB genotypes, respectively, and \eqn{d} = 0, 1, 0, for the AA, AB and BB genotypes, respectively. As usual, the X chromosome is a bit more complicated. We estimate separate additive effects for the two sexes, and for the two directions within females. There is an internal function \code{plot.effectscan} that creates the actual plot by calling \code{plot.scanone}. In the case \code{get.se=TRUE}, colored regions indicate \eqn{\pm}{+/-} 1 SE. } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(1,13,"X"))} fake.f2 <- sim.geno(fake.f2, step=2.5, n.draws=16) # allelic effect on whole genome effectscan(fake.f2) # on chromosome 13, include standard errors effectscan(fake.f2, chr="13", mtick="triangle", get.se=TRUE) } \references{ Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W. Broman, \email{broman@wisc.edu}} \seealso{ \code{\link{effectplot}}, \code{\link{plotPXG}}, \code{\link{sim.geno}} } \keyword{hplot} qtl/man/add.threshold.Rd0000644000176200001440000000443513355127045014652 0ustar liggesusers\name{add.threshold} \alias{add.threshold} \title{Add significance threshold to plot} \description{ Add a significance threshold to a plot created by \code{\link{plot.scanone}}), using the permutation results. } \usage{ add.threshold(out, chr, perms, alpha=0.05, lodcolumn=1, gap=25, \dots) } \arguments{ \item{out}{An object of class \code{"scanone"}, as output by \code{\link{scanone}}. This must be identical to what was used in the call to \code{\link{plot.scanone}}.} \item{chr}{Optional vector specifying which chromosomes to plot. If a selected subset of chromosomes were plotted, they must be specified here.} \item{perms}{Permutation results from \code{\link{scanone}}, used to calculate the significance threshold.} \item{alpha}{Significance level of the threshold.} \item{lodcolumn}{An integer indicating which of column in the permutation results should be used.} \item{gap}{Gap separating chromosomes (in cM). This must be identical to what was used in the call to \code{\link{plot.scanone}}.} \item{\dots}{Passed to the function \code{\link[graphics]{abline}} when it is called.} } \value{None.} \details{ This function allows you to add a horizontal line at the significance threshold to genome scan results plotted by \code{\link{plot.scanone}}. The arguments \code{out}, \code{chr}, and \code{gap} must match what was used in the call to \code{\link{plot.scanone}}. The argument \code{perms} must be specified. If X-chromosome-specific permutations were performed (via the argument \code{perm.Xsp} in the call to \code{\link{scanone}}), separate thresholds will be plotted for the autosomes and the X chromosome. These are calculated via the \code{\link{summary.scanoneperm}} function. } \examples{ data(hyper) hyper <- calc.genoprob(hyper) out <- scanone(hyper, method="hk") operm <- scanone(hyper, method="hk", n.perm=100, perm.Xsp=TRUE) plot(out, chr=c(1,4,6,15,"X")) add.threshold(out, chr=c(1,4,6,15,"X"), perms=operm, alpha=0.05) add.threshold(out, chr=c(1,4,6,15,"X"), perms=operm, alpha=0.1, col="green", lty=2) } \seealso{ \code{\link{scanone}}, \code{\link{plot.scanone}}, \code{\link{summary.scanoneperm}}, \code{\link{xaxisloc.scanone}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/locations.Rd0000644000176200001440000000300513355127045014112 0ustar liggesusers\name{locations} \alias{locations} \docType{data} \title{ Genetic locations of traits for the multitrait dataset } \description{ A table with genetic locations of the traits in the \code{\link{multitrait}} dataset } \usage{data(locations)} \format{ Each row is a trait with the following information: \code{Name}, Name of the trait (will be checked against the name in the cross object \code{Chr}, Chromosome of the trait \code{cM}, Location in cM from the start of the chromosome } %\details{ % %} \source{ Additional information from the Arabidopsis RIL selfing experiment with Landsberg erecta (Ler) and Cape Verde Islands (Cvi) with 162 individuals scored (with errors at) 117 markers. Dataset obtained from GBIC - Groningen BioInformatics Centre } \references{ \itemize{ \item Keurentijes JJB, Fu J, de Vos CHR,Lommen A, Jansen RC et al (2006), The genetics of plant metabolism. \emph{Nature Genetics} \bold{38}, 842--849. \item Alonso-Blanco C., Peeters, A. J. and Koornneef, M. (2006) Development of an AFLP based linkage map of Ler, Col and Cvi Arabidopsis thaliana ecotypes and construction of a Ler/Cvi recombinant inbred line population. \emph{Plant J.} \bold{14}(2), 259--271. } } \examples{ % See the help file for mqmplot.cistrans \dontrun{ data(multitrait) data(locations) multiloc <- addloctocross(multitrait,locations) results <- scanall(multiloc) mqmplot.cistrans(results,multiloc, 5, FALSE, TRUE) } } \seealso{\code{\link{multitrait}} } \keyword{datasets} qtl/man/xaxisloc.scanone.Rd0000644000176200001440000000420013355127045015374 0ustar liggesusers\name{xaxisloc.scanone} \alias{xaxisloc.scanone} \title{Get x-axis locations in scanone plot} \description{ Get x-axis locations for given cM positions on given chromosomes in a plot from \code{\link{plot.scanone}}) } \usage{ xaxisloc.scanone(out, thechr, thepos, chr, gap=25) } \arguments{ \item{out}{An object of class \code{"scanone"}, as output by \code{\link{scanone}}. This must be identical to what was used in the call to \code{\link{plot.scanone}}.} \item{thechr}{Chromosome IDs at which x-axis locations are to be determined.} \item{thepos}{Chromosome positions at which x-axis locations are to be determined.} \item{chr}{Optional vector specifying which chromosomes were plotted. This must be identical to what was used in the call to \code{\link{plot.scanone}}.} \item{gap}{Gap separating chromosomes (in cM). This must be identical to what was used in the call to \code{\link{plot.scanone}}.} } \value{A numeric vector of x-axis locations.} \details{ This function allows you to identify the x-axis locations in a plot of genome scan results, produced by \code{\link{plot.scanone}}. This is useful for adding annotations, such as text or arrows. The arguments \code{out}, \code{chr}, and \code{gap} must match what was used in the call to \code{\link{plot.scanone}}. The arguments \code{thechr} and \code{thepos} indicate the genomic positions for which x-axis locations are desired. If they both have length > 1, they must have the same length. If one has length > 1 and one has length 1, the one with length 1 is expanded to match. } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, c(1,4,6,15))} hyper <- calc.genoprob(hyper) out <- scanone(hyper, method="hk") plot(out, chr=c(1, 4, 6, 15)) # add arrow and text to indicate peak LOD score mxout <- max(out) x <- xaxisloc.scanone(out, mxout$chr, mxout$pos, chr=c(1,4,6,15)) arrows(x+30, mxout$lod, x+5, mxout$lod, len=0.1, col="blue") text(x+35, mxout$lod, "the peak", col="blue", adj=c(0, 0.5)) } \seealso{ \code{\link{plot.scanone}}, \code{\link{add.threshold}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/rescalemap.Rd0000644000176200001440000000230513355127045014235 0ustar liggesusers\name{rescalemap} \alias{rescalemap} \title{Rescale genetic maps} \description{ Rescale a genetic map by multiplying all positions by a constant } \usage{ rescalemap(object, scale=1e-6) } \arguments{ \item{object}{An object of class \code{cross} (see \code{\link{read.cross}} for details) or \code{map} (see \code{\link{sim.map}} for details).} \item{scale}{Scale factor by which all positions will be multiplied.} } \details{ This function is included particularly for the case that map positions in a cross object were provided in basepairs and one wishes to quickly convert them to Mbp or some other approximation of cM distances. (In the mouse, 1 cM is approximation 2 Mbp, so one might use \code{scale=5e-7} in this function.) } \value{ If the input is a \code{map} object, a \code{map} object is returned; if the input is a \code{cross} object, a \code{cross} object is returned. In either case, the positions of markers are simply multiplied by \code{scale}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) rescaled <- rescalemap(hyper, scale=2) plotMap(hyper, rescaled) } \seealso{ \code{\link{replace.map}}, \code{\link{est.map}} } \keyword{utilities} qtl/man/bristleX.Rd0000644000176200001440000000315213355127045013716 0ustar liggesusers\name{bristleX} \alias{bristleX} \docType{data} \title{Data on bristle number in Drosophila} \description{ Data from bristle number in chromosome X recombinant isogenic lines of \emph{Drosophila melanogaster}. } \usage{data(bristleX)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 92 chromosome X recombinant isogenic lines, derived from inbred lines that were selected for low (A) and high (B) abdominal bristle numbers. A recombinant chromosome X was placed in an isogenic low background. There are eight phenotypes: the average and SD of the number of abdominal and sternopleural bristles in males and females for each line. Each line is typed at 17 genetic markers on chromosome 3. } \references{ Long, A. D., Mullaney, S. L., Reid, L. A., Fry, J. D., Langley, C. H. and MacKay, T. F. C. (1995) High resolution mapping of genetic factors affecting abdominal bristle number in \emph{Drosophila melanogaster}. \emph{Genetics} \bold{139}, 1273--1291. } %\source{ %} \examples{ data(bristleX) # Summaries summary(bristleX) plot(bristleX) # genome scan for each of the average phenotypes bristleX <- calc.genoprob(bristleX, step=2) out <- scanone(bristleX, pheno.col=c(1,3,5,7)) # Plot the results # maximum LOD score among four phenotypes ym <- max(apply(out[,-(1:2)], 2, max)) plot(out, lod=1:3, ylim=c(0,ym)) plot(out, lod=4, add=TRUE, col="green") } \seealso{ \code{\link{bristleX}}, \code{\link{listeria}}, \code{\link{fake.bc}}, \code{\link{fake.f2}}, \code{\link{fake.4way}}, \code{\link{hyper}} } \keyword{datasets} qtl/man/countXO.Rd0000644000176200001440000000266413355127045013530 0ustar liggesusers\name{countXO} \alias{countXO} \title{Count number of obligate crossovers for each individual} \description{ Count the number of obligate crossovers for each individual in a cross, either by chromosome or overall. } \usage{ countXO(cross, chr, bychr=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to investigate. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{bychr}{If TRUE, return counts for each individual chromosome; if FALSE, return the overall number across the selected chromosomes.} } \details{ For each individual we count the minimal number of crossovers that explain the observed genotype data. } \value{ If \code{bychr=TRUE}, a matrix of counts is returned, with rows corresponding to individuals and columns corresponding to chromosomes. If \code{bychr=FALSE}, a vector of counts (the total number of crossovers across all selected chromosomes) is returned. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) plot(countXO(hyper)) } \seealso{ \code{\link{ripple}}, \code{\link{locateXO}}, \code{\link{cleanGeno}} } \keyword{utilities} qtl/man/plot.errorlod.Rd0000644000176200001440000000456513355127045014740 0ustar liggesusers\name{plotErrorlod} \alias{plotErrorlod} \title{Plot grid of error LOD values} \description{ Plot a grid of the LOD scores indicating which genotypes are likely to be in error. } \usage{ plotErrorlod(x, chr, ind, breaks=c(-Inf,2,3,4.5,Inf), col=c("white","gray85","hotpink","purple3"), alternate.chrid=FALSE, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to be drawn in the plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{ind}{Indicates the individuals for which the error LOD scores should be plotted (passed to \code{\link{subset.cross}}).} \item{breaks}{A set of breakpoints for the colors; must give one more breakpoint than color. Intervals are open on the left and closed on the right, except for the lowest interval.} \item{col}{A vector of colors to appear in the image.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Ignored at this point.} } \details{ Uses \code{\link[graphics]{image}} to plot a grid with different shades of pixels to indicate which genotypes are likely to be in error. Darker pixels have higher error LOD scores: \eqn{LOD \le 2} in white; \eqn{2 < LOD \le 3}{2 < LOD <= 3} in gray; \eqn{3 < LOD \le 4.5}{3 < LOD <= 4.5} in pink; \eqn{LOD > 4.5} in purple. } \value{None.} \examples{ data(hyper) \dontshow{hyper <- subset(hyper,chr=c(1,19))} # Calculate error LOD scores hyper <- calc.errorlod(hyper,error.prob=0.01) # plot the error LOD scores; print those above a specified cutoff plotErrorlod(hyper) plotErrorlod(hyper,chr=1) } \seealso{ \code{\link{calc.errorlod}}, \code{\link{top.errorlod}}, \code{\link[graphics]{image}}, \code{\link{subset.cross}}, \code{\link{plotGeno}} } \references{ Lincoln, S. E. and Lander, E. S. (1992) Systematic detection of errors in genetic linkage data. \emph{Genomics} \bold{14}, 604--610. } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/stepwiseqtl.Rd0000644000176200001440000003202113355127045014503 0ustar liggesusers\name{stepwiseqtl} \alias{stepwiseqtl} \title{Stepwise selection for multiple QTL} \description{ Performs forward/backward selection to identify a multiple QTL model, with model choice made via a penalized LOD score, with separate penalties on main effects and interactions. } \usage{ stepwiseqtl(cross, chr, pheno.col=1, qtl, formula, max.qtl=10, covar=NULL, method=c("imp", "hk"), model=c("normal", "binary"), incl.markers=TRUE, refine.locations=TRUE, additive.only=FALSE, scan.pairs=FALSE, penalties, keeplodprofile=TRUE, keeptrace=FALSE, verbose=TRUE, tol=1e-4, maxit=1000, require.fullrank=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider in search for QTL. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give character strings matching the phenotype names. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{Optional QTL object (of class \code{"qtl"}, as created by \code{\link{makeqtl}}) to use as a starting point.} \item{formula}{Optional formula to define the QTL model to be used as a starting point.} \item{max.qtl}{Maximum number of QTL to which forward selection should proceed.} \item{covar}{Data frame of additive covariates.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid.} \item{refine.locations}{If TRUE, use \code{\link{refineqtl}} to refine the QTL locations after each step of forward and backward selection.} \item{additive.only}{If TRUE, allow only additive QTL models; if FALSE, consider also pairwise interactions among QTL.} \item{scan.pairs}{If TRUE, perform a two-dimensional, two-QTL scan at each step of forward selection.} \item{penalties}{Vector of three (or six) values indicating the penalty on the number of QTL terms. If three values, these are the penalties on main effects and heavy and light penalties on interactions. If six values, these include X-chr-specific penalties, and the values are: main effect for autosomes, main effect for X chr, heavy penalty on A:A interactions, light penalty on A:A interactions, penalty on A:X interactions, and penalty on X:X interactions. See the Details below. If missing, default values are used that are based on simulations of backcrosses and intercrosses with genomes modeled after that of the mouse.} \item{keeplodprofile}{If TRUE, keep the LOD profiles from the last iteration as attributes to the output.} \item{keeptrace}{If TRUE, keep information on the sequence of models visited through the course of forward and backward selection as an attribute to the output.} \item{verbose}{If TRUE, give feedback about progress. If \code{verbose} is an integer > 1, even more information is printed.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{require.fullrank}{If TRUE, give LOD=0 when covariate matrix in the linear regression is not of full rank.} } \section{Methods}{ \bold{\code{imp}}: multiple imputation is used, as described by Sen and Churchill (2001). \bold{\code{hk}}: Haley-Knott regression is used (regression of the phenotypes on the multipoint QTL genotype probabilities), as described by Haley and Knott (1992). } \details{ We seek to identify the model with maximal penalized LOD score. The penalized LOD score, defined in Manichaikul et al. (2009), is the LOD score for the model (the \eqn{\log_{10}}{log10} likelihood ratio comparing the model to the null model with no QTL) with penalties on the number of QTL and QTL:QTL interactions. We consider QTL models allowing pairwise interactions among QTL but with an enforced hierarchy in which inclusion of a pairwise interaction requires the inclusion of both of the corresponding main effects. Additive covariates may be included, but currently we do not explore QTL:covariate interactions. Also, the penalized LOD score criterion is currently defined only for autosomal loci, and results with the X chromosome should be considered with caution. The penalized LOD score is of the form \eqn{pLOD(\gamma) = LOD(\gamma) - T_m p_m - T_h p_h - T_l p_l}{pLOD(g) = LOD(g) - Tm pm - Th ph - Tl pl} where \eqn{\gamma}{g} denotes a model, \eqn{p_m}{pm} is the number of QTL in the model ("main effects"), \eqn{p_h}{ph} is the number of pairwise interactions that will be given a heavy interaction penalty, \eqn{p_l}{pl} is the number of pairwise interactions that will be given a light interaction penalty, \eqn{T_m}{Tm} is the penalty on main effects, \eqn{T_h}{Th} is the heavy interaction penalty, and \eqn{T_l}{Tl} is the light interaction penalty. The \code{penalties} argument is the vector \eqn{(T_m, T_h, T_l)}{(Tm, Th, Tl)}. If \eqn{T_l}{Tl} is missing (\code{penalties} has a vector of length 2), we assume \eqn{T_l = T_h}{Tl = Th}, and so all pairwise interactions are assigned the same penalty. The "heavy" and "light" interaction penalties can be a bit confusing. Consider the clusters of QTL that are connected via one or more pairwise interactions. To each such cluster, we assign at most one "light" interaction penalty, and give all other pairwise interactions the heavy interaction penalty. In other words, if \eqn{p_i}{pi} is the total number of pairwise interactions for a QTL model, we let \eqn{p_l}{pl} be the number of clusters of connected QTL with at least one pairwise interaction, and then let \eqn{p_h - p_i - p_l}{ph = pi - pl}. Let us give an explicit example. Consider a model with 6 QTL, and with interactions between QTL 2 and 3, QTL 4 and 5 and QTL 4 and 6 (so we have the model formula \code{y ~ Q1 + Q2 + Q3 + Q4 + Q5 + Q6 + Q2:Q3 + Q4:Q5 + Q4:Q6}). There are three clusters of connected QTL: (1), (2,3) and (4,5,6). We would assign 6 main effect penalties (\eqn{T_m}{Tm}), 2 light interaction penalties (\eqn{T_l}{Tl}), and 1 heavy interaction penalty (\eqn{T_h}{Th}). Manichaikul et al. (2009) described a system for deriving the three penalties on the basis of permutation results from a two-dimensional, two-QTL genome scan (as calculated with \code{\link{scantwo}}). These may be calculated with the function \code{\link{calc.penalties}}. A forward/backward search method is used, with the aim to optimize the penalized LOD score criterion. That is, we seek to identify the model with maximal the penalized LOD score. The search algorithm was based closely on an algorithm described by Zeng et al. (1999). We use forward selection to a model of moderate size (say 10 QTL), followed by backward elimination all the way to the null model. The chosen model is that which optimizes the penalized LOD score criterion, among all models visited. The detailed algorithm is as follows. Note that if \code{additive.only=TRUE}, no pairwise interactions are considered. \enumerate{ \item Start at the null model, and perform a single-QTL genome scan, and choose the position giving the largest LOD score. If \code{scan.pairs=TRUE}, start with a two-dimensional, two-QTL genome scan instead. If an initial QTL model were defined through the arguments \code{qtl} and \code{formula}, start with this model and jump immediately to step 2. \item With a fixed QTL model in hand: \enumerate{ \item Scan for an additional additive QTL. \item For each QTL in the current model, scan for an additional interacting QTL. \item If there are \eqn{\ge}{>=} 2 QTL in the current model, consider adding one of the possible pairwise interactions. \item If \code{scan.pairs=TRUE} perform a two-dimensional, two-QTL scan, seeking to add a pair of novel QTL, either additive or interacting. \item Step to the model that gives the largest value for the model comparison criterion, among those considered at the current step. } \item Refine the locations of the QTL in the current model (if \code{refine.locations=TRUE}). \item Repeat steps 2 and 3 up to a model with some pre-determined number of loci. \item Perform backward elimination, all the way back to the null model. At each step, consider dropping one of the current main effects or interactions; move to the model that maximizes the model comparison criterion, among those considered at this step. Follow this with a refinement of the locations of the QTL. \item Finally, choose the model having the largest model comparison criterion, among all models visited. } In this forward/backward algorithm, it is likely best to build up to an overly large model and then prune it back. Note that there is no "stopping rule"; the chosen model is that which optimizes the model comparison criterion, among all models visited. The search can be time consuming, particularly if a two-dimensional scan is performed at each forward step. Such two-dimensional scans may be useful for identifying QTL linked in repulsion (having effects of opposite sign) or interacting QTL with limited marginal effects, but our limited experience suggests that they are not necessary; important linked or interacting QTL pairs can be picked up in the forward selection to a large model, and will be retained in the backward elimination phase. } \value{ The output is a representation of the best model, as measured by the penalized LOD score (see Details), among all models visited. This is QTL object (of class \code{"qtl"}, as produced by \code{\link{makeqtl}}), with attributes \code{"formula"}, indicating the model formula, and \code{"pLOD"} indicating the penalized LOD score. If \code{keeplodprofile=TRUE}, LOD profiles from the last pass through the refinement algorithm are retained as an attribute, \code{"lodprofile"}, to the object. These may be plotted with \code{\link{plotLodProfile}}. If \code{keeptrace=TRUE}, the output will contain an attribute \code{"trace"} containing information on the best model at each step of forward and backward elimination. This is a list of objects of class \code{"compactqtl"}, which is similar to a QTL object (as produced by \code{\link{makeqtl}}) but containing just a vector of chromosome IDs and positions for the QTL. Each will also have attributes \code{"formula"} (containing the model formula) and \code{"pLOD"} (containing the penalized LOD score. } \references{ Manichaikul, A., Moon, J. Y., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}, Yandell, B. S. and Broman, K. W. (2009) A model selection approach for the identification of quantitative trait loci in experimental crosses, allowing epistasis. \emph{Genetics}, \bold{181}, 1077--1086. Broman, K. W. and Speed, T. P. (2002) A model selection approach for the identification of quantitative trait loci in experimental crosses (with discussion). \emph{J Roy Stat Soc B} \bold{64}, 641--656, 731--775. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. Zeng, Z.-B., Kao, C.-H. and Basten, C. J. (1999) Estimating the genetic architecture of quantitative traits. \emph{Genetical Research}, \bold{74}, 279--289. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(1,2,3,5))} \dontrun{fake.bc <- calc.genoprob(fake.bc, step=2.5) }\dontshow{fake.bc <- calc.genoprob(fake.bc, step=0)} outsw <- stepwiseqtl(fake.bc, max.qtl=3, method="hk", keeptrace=TRUE) # best model outsw plotModel(outsw) # path through model space thetrace <- attr(outsw, "trace") # plot of these par(mfrow=c(3,3)) for(i in seq(along=thetrace)) plotModel(thetrace[[i]], main=paste("pLOD =",round(attr(thetrace[[i]],"pLOD"), 2))) } \seealso{ \code{\link{calc.penalties}}, \code{\link{plotModel}}, \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{refineqtl}}, \code{\link{addqtl}}, \code{\link{addpair}} } \keyword{models} qtl/man/getid.Rd0000644000176200001440000000140413355127045013214 0ustar liggesusers\name{getid} \alias{getid} \title{Pull out the individual identifiers from a cross} \description{ Pull out the individual identifiers from a cross object. } \usage{getid(cross)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ A vector of individual identifiers, pulled from the phenotype data (a column named \code{id} or \code{ID}). If there are no such identifiers in the cross, the function returns \code{NULL}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) # create an ID column fake.f2$pheno$id <- paste("ind", sample(nind(fake.f2)), sep="") getid(fake.f2) } \seealso{ \code{\link{subset.cross}}, \code{\link{top.errorlod}} } \keyword{utilities} qtl/man/mqmplotdirectedqtl.Rd0000644000176200001440000000423313526005061016032 0ustar liggesusers\name{mqmplot.directedqtl} \alias{mqmplot.directedqtl} \title{Plot LOD*Effect curves of a multiple-QTL model } \description{ Plot the LOD*Effect curve for a genome scan with a multiple-QTL model (the output of \code{\link{mqmscan}}). } \usage{ mqmplot.directedqtl(cross, mqmresult, pheno.col=1, draw = TRUE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{mqmresult}{ Results from mqmscan of type \code{scanone} } \item{pheno.col}{ From which phenotype in the crossobject are the result calculated } \item{draw}{ If TRUE, draw the figure. } } \value{ Returns a scanone object, with added the effectsign calculated internally by the function effect.scan. For more info on the scanone object see: \code{\link{scanone}} } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ #Simulated F2 Population f2qtl <- c(3,15,1,0) # QTL at chromosome 3 data(map10) # Mouse genetic map \dontshow{map10 <- map10[1:3]} f2cross <- sim.cross(map10,f2qtl,n=100,type="f2") # Simulate a F2 Cross f2cross <- fill.geno(f2cross) # Fill in missing genotypes f2result <- mqmscan(f2cross) # Do a MQM scan of the genome mqmplot.directedqtl(f2cross,f2result) } \keyword{ hplot } qtl/man/shiftmap.Rd0000644000176200001440000000246513355127045013743 0ustar liggesusers\name{shiftmap} \alias{shiftmap} \title{Shift starting points in genetic maps} \description{ Shift starting points in a genetic map to a set of defined positions } \usage{ shiftmap(object, offset=0) } \arguments{ \item{object}{An object of class \code{cross} (see \code{\link{read.cross}} for details) or \code{map} (see \code{\link{sim.map}} for details).} \item{offset}{Defines the starting position for each chromosome. This should be a single value (to be used for all chromosomes) or a vector with length equal to the number of chromosomes, defining individual starting positions for each chromosome. For a sex-specific map (as in a 4-way cross), we use the same offset for both the male and female maps.} } \value{ If the input is a \code{map} object, a \code{map} object is returned; if the input is a \code{cross} object, a \code{cross} object is returned. In either case, the positions of markers are shifted so that the starting positions are as in \code{offset}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) shiftedhyper <- shiftmap(hyper, offset=0) par(mfrow=c(1,2)) plotMap(hyper, shift=FALSE, alternate.chrid=TRUE) plotMap(shiftedhyper, shift=FALSE, alternate.chrid=TRUE) } \seealso{ \code{\link{replace.map}}, \code{\link{est.map}} } \keyword{utilities} qtl/man/find.pseudomarker.Rd0000644000176200001440000000347013355127045015545 0ustar liggesusers\name{find.pseudomarker} \alias{find.pseudomarker} \title{Find the pseudomarker closest to a specified position} \description{ Find the pseudomarker closest to a specified position on a chromosome. } \usage{find.pseudomarker(cross, chr, pos, where=c("draws", "prob"), addchr=TRUE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{A vector of chromosome identifiers, or a single such.} \item{pos}{A vector of cM positions.} \item{where}{Indicates whether to look in the \code{draws} or \code{prob} components of the input cross.} \item{addchr}{If TRUE, include something like \code{"c5."} at the beginning of the names of non-pseudomarker locations, as in the output of \code{\link{scanone}}; if FALSE, don't include this sort of string, as in the genotype probabilities from \code{\link{calc.genoprob}}.} } \value{ A vector of pseudomarker names (of the same length as the input \code{pos}), corresponding to the markers nearest to the specified chromosomes/positions. } \details{ If the input \code{chr} has length one, it is expanded to the same length as the input \code{pos}. If multiple markers are exactly the same distance from the specified position, one is chosen at random from among those with the most genotype data. For a cross with sex-specific maps, the input positions are assumed to correspond to the female genetic map. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) listeria <- calc.genoprob(listeria, step=2.5) find.pseudomarker(listeria, 5, 28, "prob") find.pseudomarker(listeria, c(1, 5, 13), c(81, 28, 26), "prob") } \seealso{ \code{\link{find.flanking}}, \code{\link{plotPXG}}, \code{\link{effectplot}}, \code{\link{find.marker}}, \code{\link{find.markerpos}} } \keyword{utilities} qtl/man/ripple.Rd0000644000176200001440000000627113355127045013422 0ustar liggesusers\name{ripple} \alias{ripple} \title{Compare marker orders} \description{ Investigate different marker orders for a given chromosome, comparing all possible permutations of a sliding window of markers. } \usage{ ripple(cross, chr, window=4, method=c("countxo","likelihood"), error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), maxit=4000, tol=1e-6, sex.sp=TRUE, verbose=TRUE, n.cluster=1) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{The chromosome to investigate. Only one chromosome is allowed. (This should be a character string referring to the chromosomes by name.)} \item{window}{Number of markers to include in the sliding window of permuted markers. Larger numbers result in the comparison of a greater number of marker orders, but will require a considerable increase in computation time.} \item{method}{Indicates whether to compare orders by counting the number of obligate crossovers, or by a likelihood analysis.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} \item{verbose}{If TRUE, information about the number of orders (and, if \code{method="likelihood"}, about progress) are printed.} \item{n.cluster}{If the package \code{snow} is available and \code{n.perm} > 0, permutations are run in parallel using this number of nodes. This is really only useful with \code{method="likelihood"}.} } \details{ For \code{method="likelihood"}, calculations are done by first constructing a matrix of marker orders and then making repeated calls to the R function \code{\link{est.map}}. Of course, it would be faster to do everything within C, but this was a lot easier to code. For \code{method="countxo"}, calculations are done within C. } \value{ A matrix, given class \code{"ripple"}; the first set of columns are marker indices describing the order. In the case of \code{method="countxo"}, the last column is the number of obligate crossovers for each particular order. In the case of \code{method="likelihood"}, the last two columns are LOD scores (log base 10 likelihood ratios) comparing each order to the initial order and the estimated chromosome length for the given order. Positive LOD scores indicate that the alternate order has more support than the original. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(badorder) rip1 <- ripple(badorder, chr=1, window=3) summary(rip1) \dontrun{ rip2 <- ripple(badorder, chr=1, window=2, method="likelihood") summary(rip2) } badorder <- switch.order(badorder, 1, rip1[2,]) } \seealso{ \code{\link{summary.ripple}}, \code{\link{switch.order}}, \code{\link{est.map}}, \code{\link{est.rf}} } \keyword{utilities} qtl/man/c.scantwoperm.Rd0000644000176200001440000000307613355127045014712 0ustar liggesusers\name{c.scantwoperm} \alias{c.scantwoperm} \alias{rbind.scantwoperm} \title{Combine data from scantwo permutations} \description{ Concatenate the data for multiple runs of \code{\link{scantwo}} with \code{n.perm > 0}. } \usage{ \method{c}{scantwoperm}(\dots) \method{rbind}{scantwoperm}(\dots) } \arguments{ \item{\dots}{A set of objects of class \code{scantwoperm}. (This can also be a list of \code{scantwoperm} objects.) These are the permutation results from \code{\link{scantwo}} (that is, when \code{n.perm > 0}). These must all concern the same number of LOD columns. (That is, they must have been created with the same number of phenotypes, and it is assumed that they were generated in precisely the same way.)} } \value{The concatenated input, as a \code{scantwoperm} object.} \details{ The aim of this function is to concatenate the results from multiple runs of a permutation test \code{\link{scantwo}}, to assist with the case that such permutations are done on multiple processors in parallel. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"), ind=1:50)} fake.f2 <- calc.genoprob(fake.f2) \dontrun{operm1 <- scantwo(fake.f2, method="hk", n.perm=50) operm2 <- scantwo(fake.f2, method="hk", n.perm=50)}\dontshow{ operm1 <- scantwo(fake.f2, method="hk", n.perm=3) operm2 <- scantwo(fake.f2, method="hk", n.perm=3)} operm <- c(operm1, operm2) } \seealso{ \code{\link{summary.scantwoperm}}, \code{\link{scantwo}}, \code{\link{cbind.scantwoperm}} } \keyword{manip} qtl/man/mqmtestnormal.Rd0000644000176200001440000000450413526005125015021 0ustar liggesusers\name{mqmtestnormal} \alias{mqmtestnormal} \title{ Shapiro normality test used for MQM } \description{ Wraps a shapiro's normality test from the nortest package. This function is used in MQM to test the normality of the trait under investigation } \usage{ mqmtestnormal(cross, pheno.col = 1,significance=0.05, verbose=FALSE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{pheno.col}{ Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers. % \phenocol } \item{significance}{ Significance level used in the normality test. Lower significance levels will accept larger deviations from normality. } \item{verbose}{ If TRUE, print result as well as return it. } } \value{ Boolean indicating normality of the trait in pheno.col. (FALSE when not normally distributed.) } \details{ For augmented data (as from \code{\link{mqmaugment}}), the cross is first reduced to distinct individuals. Furthermore the shapiro used to test normality works only for 3 <= nind(cross) <= 5000 } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ \item \code{\link[stats]{shapiro.test}} - Function wrapped by our mqmtestnormal % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) # test normality of 7th phenotype mqmtestnormal(multitrait, pheno.col=7) # take log multitrait <- transformPheno(multitrait, pheno.col=7, transf=log) # test again mqmtestnormal(multitrait, pheno.col=7) } \keyword{ utilities } qtl/man/orderMarkers.Rd0000644000176200001440000000670713355127045014573 0ustar liggesusers\name{orderMarkers} \alias{orderMarkers} \title{Find an initial order for markers within chromosomes} \description{ Establish initial orders for markers within chromosomes by a greedy algorithm, adding one marker at a time with locations of previous markers fixed, in the position giving the miniminum number of obligate crossovers. } \usage{ orderMarkers(cross, chr, window=7, use.ripple=TRUE, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), maxit=4000, tol=1e-4, sex.sp=TRUE, verbose=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{window}{If \code{use.ripple=TRUE}, this indicates the number of markers to include in the sliding window of permuted markers. Larger numbers result in the comparison of a greater number of marker orders, but will require a considerable increase in computation time.} \item{use.ripple}{If TRUE, the initial order is refined by a call to the function \code{\link{ripple}}.} \item{error.prob}{Assumed genotyping error rate used in the final estimated map.} \item{map.function}{Indicates the map function to use in the final estimated map.} \item{maxit}{Maximum number of EM iterations to perform in the final estimated map.} \item{tol}{Tolerance for determining convergence in the final estimated map.} \item{sex.sp}{Indicates whether to estimate sex-specific maps in the final estimated map; this is used only for the 4-way cross.} \item{verbose}{If TRUE, information about the progress of the calculations is displayed; if > 1, even more information is given.} } \value{ The output is a cross object, as in the input, with orders of markers on selected chromosomes revised. } \details{ Markers within a linkage group are considered in order of decreasing number of genotyped individuals. The first two markers are placed in an arbitrary order. Additional markers are considered one at a time, and each possible placement of a marker is compared (with the order of the previously placed markers taken as fixed) via the number of obligate crossovers (that is, the minimal number of crossovers that would explain the observed data). The marker is placed in the position giving the minimal number of obligate crossovers. If multiple positions give the same number of obligate crossovers, a single location (among those positions) is chosen at random. If \code{use.ripple=TRUE}, the final order is passed to \code{\link{ripple}} with \code{method="countxo"} to refine the marker order. If \code{use.ripple=TRUE} and the number of markers on a chromosome is \eqn{\le}{<=} the argument \code{window}, the initial greedy algorithm is skipped and all possible marker orders are compared via \code{\link{ripple}}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) pull.map(listeria, chr=3) revcross <- orderMarkers(listeria, chr=3, use.ripple=FALSE) pull.map(revcross, chr=3) } \seealso{ \code{\link{formLinkageGroups}}, \code{\link{ripple}}, \code{\link{est.map}}, \code{\link{countXO}} } \keyword{utilities} qtl/man/pull.map.Rd0000644000176200001440000000264313355127045013656 0ustar liggesusers\name{pull.map} \alias{pull.map} \title{Pull out the genetic map from a cross} \description{ Pull out the map portion of a cross object. } \usage{pull.map(cross, chr, as.table=FALSE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{as.table}{If TRUE, return the genetic map as a table with chromosome assignments and marker names. If FALSE, return the map as a \code{"map"} object.} } \value{ The genetic map: a list with each component containing the marker positions (in cM) for a chromosome. Each component has class \code{A} or \code{X} according to whether it is an autosome or the X chromosome. The components are either vectors of marker positions or, for a sex-specific map, 2-row matrices containing the female and male marker locations. The map itself is given class \code{map}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) map <- pull.map(fake.f2) plot(map) } \seealso{ \code{\link{replace.map}}, \code{\link{plotMap}}, \code{\link{map2table}} } \keyword{utilities} qtl/man/nind.Rd0000644000176200001440000000121313355127045013046 0ustar liggesusers\name{nind} \alias{nind} \title{Determine the number of individuals QTL experiment} \description{ Determine the number of individuals in cross object. } \usage{ nind(object) } \arguments{ \item{object}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The number of individuals in the input cross object. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) nind(fake.f2) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{summary.cross}}, \code{\link{nmar}}, \code{\link{nchr}}, \code{\link{totmar}}, \code{\link{nphe}} } \keyword{print} qtl/man/convert.map.Rd0000644000176200001440000000243413355127045014360 0ustar liggesusers\name{convert.map} \alias{convert.map} \title{Change map function for a genetic map} \description{ Convert a genetic map from using one map function to another. } \usage{ \method{convert}{map}(object, old.map.function=c("haldane", "kosambi", "c-f", "morgan"), new.map.function=c("haldane", "kosambi", "c-f", "morgan"), \dots) } \arguments{ \item{object}{A genetic map object, of class \code{"map"}: A list whose components are vectors of marker locations.} \item{old.map.function}{The map function used in forming the map in \code{object}.} \item{new.map.function}{The new map function to be used.} \item{\dots}{Ignored at this point.} } \value{ The same as the input, but with inter-marker distances changed to reflect a different map function. } \details{ The location of the first marker on each chromosome is left unchanged. Inter-marker distances are converted to recombination fractions with the inverse of the \code{old.map.function}, and then back to distances with the \code{new.map.function}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) map <- pull.map(listeria) map <- convert(map, "haldane", "kosambi") listeria <- replace.map(listeria, map) } \seealso{ \code{\link{est.map}}, \code{\link{replace.map}} } \keyword{manip} qtl/man/subset.cross.Rd0000644000176200001440000000624413355127045014564 0ustar liggesusers\name{subset.cross} \alias{subset.cross} \alias{[.cross} \title{Subsetting data for QTL experiment} \description{ Pull out a specified set of chromosomes and/or individuals from a \code{cross} object. } \usage{ \method{subset}{cross}(x, chr, ind, \dots) \method{[}{cross}(x, chr, ind) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector specifying which chromosomes to keep or discard. This may be a logical, numeric, or character string vector. See Details, below.} \item{ind}{Optional vector specifying which individuals to keep discard. This may be a logical, numeric or chacter string vector. See Details, below.} \item{\dots}{Ignored at this point.} } \value{The input \code{cross} object, but with only the specified subset of the data.} \details{ The \code{chr} argument may be a logical vector with length equal to the number of chromosomes in the input cross \code{x}. Alternatively, it should be a vector of character strings referring to chromosomes by name. Numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. If the \code{ind} argument is a logical vector (\code{TRUE}/\code{FALSE}), it should have length equal to the number of individuals in the input cross \code{x}. The individuals with corresponding \code{TRUE} values are retained. If the \code{ind} argument is numeric, it should have values either between 1 and the number of individuals in the input cross \code{x} (in which case these individuals will be retained), or it should have values between \code{-1} and \code{-n}, where \code{n} is the number of individuals in the input cross \code{x}, in which case all \emph{except} these individuals will be retained. If the input cross object \code{x} contains individual identifiers (a phenotype column labeled \code{"id"} or \code{"ID"}), and if the \code{ind} argument contains character strings, then these will be matched against the individual identifiers. If all values in \code{ind} are preceded by a \code{-}), we omit those individuals whose IDs match those in \code{ind}. Otherwise, we retain those individuals whose IDs match those in \code{ind}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) fake.f2.A <- subset(fake.f2, chr=c("5","13")) fake.f2.B <- subset(fake.f2, ind = -c(1,5,10)) fake.f2.C <- subset(fake.f2, chr=1:5, ind=1:50) data(listeria) y <- pull.pheno(listeria, 1) listeriaB <- subset(listeria, ind = (!is.na(y) & y < 264)) # individual identifiers listeria$pheno$ID <- paste("mouse", 1:nind(listeria), sep="") listeriaC <- subset(listeria, ind=c("mouse1","mouse11","mouse21")) listeriaD <- subset(listeria, ind=c("-mouse1","-mouse11","-mouse21")) # you can also use brackets (like matrix with rows=chromosomes and columns=individuals) temp <- listeria[c("5","13"),] # chr 5 and 13 temp <- listeria[ , 1:10] # first ten individuals temp <- listeria[5, 1:10] # chr 5 for first ten individuals } \seealso{ \code{\link{pull.map}}, \code{\link{drop.markers}}, \code{\link{subset.map}} } \keyword{manip} qtl/man/find.markerpos.Rd0000644000176200001440000000132513355127045015044 0ustar liggesusers\name{find.markerpos} \alias{find.markerpos} \title{Find position of a marker} \description{ Find the chromosome and cM position of a set of genetic markers. } \usage{find.markerpos(cross, marker)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{marker}{A vector of marker names.} } \value{ A data frame with two columns: the chromosome and position of the markers. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) find.markerpos(hyper, "D4Mit164") find.markerpos(hyper, c("D4Mit164", "D1Mit94")) } \seealso{ \code{\link{find.flanking}}, \code{\link{find.marker}}, \code{\link{find.pseudomarker}} } \keyword{utilities} qtl/man/c.scanone.Rd0000644000176200001440000000317213355127045013773 0ustar liggesusers\name{c.scanone} \alias{c.scanone} \alias{cbind.scanone} \title{Combine columns from multiple scanone results} \description{ Concatenate the columns from different runs of \code{\link{scanone}}. } \usage{ \method{c}{scanone}(\dots, labels) \method{cbind}{scanone}(\dots, labels) } \arguments{ \item{\dots}{A set of objects of class \code{scanone}. (This can also be a list of \code{scanone} objects.) These are the results from \code{\link{scanone}} (with \code{n.perm=0}), generally run with different phenotypes or methods. All must conform with each other, meaning that \code{\link{calc.genoprob}} and/or \code{\link{sim.geno}} were run with the same values for \code{step} and \code{off.end} and with data having the same genetic map.} \item{labels}{A vector of character strings, of length 1 or of the same length as the input, to be appended to the column names in the output.} } \value{The concatenated input, as a \code{scanone} object.} \details{ The aim of this function is to concatenate the results from multiple runs \code{\link{scanone}}, generally for different phenotypes and/or methods, to be used in parallel with \code{\link{summary.scanone}}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) fake.f2 <- calc.genoprob(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} out.hk <- scanone(fake.f2, method="hk") out.np <- scanone(fake.f2, model="np") out <- c(out.hk, out.np, labels=c("hk","np")) plot(out, lod=1:2, col=c("blue", "red")) } \seealso{ \code{\link{summary.scanone}}, \code{\link{scanone}}, \code{\link{cbind.scanoneperm}} } \keyword{manip} qtl/man/est.rf.Rd0000644000176200001440000000311113355127045013316 0ustar liggesusers\name{est.rf} \alias{est.rf} \title{Estimate pairwise recombination fractions} \description{ Estimate the sex-averaged recombination fraction between all pairs of genetic markers. } \usage{ est.rf(cross, maxit=10000, tol=1e-6) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{maxit}{Maximum number of iterations for the EM algorithm (not used with backcrosses).} \item{tol}{Tolerance for determining convergence (not used with backcrosses).} } \value{ The input \code{cross} object is returned with a component, \code{rf}, added. This is a matrix of size (tot.mar x tot.mar). The diagonal contains the number of typed meioses per marker, the lower triangle contains the estimated recombination fractions, and the upper triangle contains the LOD scores (testing rf = 0.5). } \details{ For a backcross, one can simply count recombination events. For an intercross or 4-way cross, a version of the EM algorithm must be used to estimate recombination fractions. (Since, for example, in an intercross individual that is heterozygous at two loci, it is not known whether there were 0 or 2 recombination events.) Note that, for the 4-way cross, we estimate sex-averaged recombination fractions. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(badorder) badorder <- est.rf(badorder) plotRF(badorder) } \seealso{ \code{\link{plotRF}}, \code{\link{pull.rf}}, \code{\link{plot.rfmatrix}}, \code{\link{est.map}}, \code{\link{badorder}}, \code{\link{checkAlleles}} } \keyword{utilities} qtl/man/plot.scanoneperm.Rd0000644000176200001440000000231713355127045015413 0ustar liggesusers\name{plot.scanoneperm} \alias{plot.scanoneperm} \title{Plot permutation results for a single-QTL genome scan} \description{ Plot a histogram of the permutation results from a single-QTL genome scan. } \usage{ \method{plot}{scanoneperm}(x, lodcolumn=1, \dots) } \arguments{ \item{x}{An object of class \code{"scanoneperm"}, as output by \code{\link{scanone}} when \code{n.perm} is specified.} \item{lodcolumn}{This indicates the LOD score column to plot. This should be a single number between 1 and the number of LOD columns in the object input.} \item{\dots}{Passed to the function \code{\link[graphics]{hist}} when it is called.} } \value{None.} \details{ The function plots a histogram of the permutation results obtained by \code{\link{scanone}} when \code{n.perm} is specified. If separate permutations were performed for the autosomes and the X chromosome (using \code{perm.Xsp=TRUE}), separate histograms are given. } \examples{ data(fake.bc) fake.bc <- calc.genoprob(fake.bc) operm <- scanone(fake.bc, method="hk", n.perm=100) plot(operm) } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanoneperm}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/plot.rf.Rd0000644000176200001440000000600113355127045013502 0ustar liggesusers\name{plotRF} \alias{plotRF} \title{Plot recombination fractions} \description{ Plot a grid showing the recombination fractions for all pairs of markers, and/or the LOD scores for tests of linkage between pairs of markers. } \usage{ plotRF(x, chr, what=c("both","lod","rf"), alternate.chrid=FALSE, zmax=12, mark.diagonal=FALSE, col.scheme=c("viridis", "redblue"), \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{what}{Indicate whether to plot LOD scores, recombination fractions or both.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{zmax}{Maximum LOD score plotted; values above this are all thresholded at this value.} \item{mark.diagonal}{If TRUE, include black line segments around the pixels along the diagonal, to better separate the upper left triangle from the lower right triangle.} \item{col.scheme}{The color palette. The default is "viridis"; see Option D at \url{https://bids.github.io/colormap}} \item{\dots}{Generally ignored, but you can include \code{main} to change or omit the title of the figure.} } \value{None.} \details{ Uses \code{\link[graphics]{image}} to plot a grid showing the recombination fractions and/or LOD scores for all pairs of markers. (The LOD scores are for a test of \eqn{r = 1/2}.) If both are plotted, the recombination fractions are in the upper left triangle while the LOD scores are in the lower right triangle. With \code{col.scheme="viridis"} (the default), purple corresponds to a large LOD score or a small recombination fraction, while yellow is the reverse. With \code{col.scheme="redblue"}, red corresponds to a large LOD or a small recombination fraction, while blue is the reverse. Note that missing values appear in light gray. Recombination fractions are transformed by \eqn{-4(\log_2{r}+1)}{% -4(log2(r)+1)} to make them on the same sort of scale as LOD scores. Values of LOD or the transformed recombination fraction that are above 12 are set to 12. } \examples{ data(badorder) badorder <- est.rf(badorder) plotRF(badorder) # plot just chr 1 plotRF(badorder, chr=1) # plot just the recombination fractions plotRF(badorder, what="rf") # plot just the LOD scores, and just for chr 2 and 3 plotRF(badorder, chr=2:3, what="lod") } \seealso{ \code{\link{est.rf}}, \code{\link{pull.rf}}, \code{\link{plot.rfmatrix}}, \code{\link[graphics]{image}}, \code{\link{badorder}}, \code{\link{ripple}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/subset.scanoneperm.Rd0000644000176200001440000000255013355127045015741 0ustar liggesusers\name{subset.scanoneperm} \alias{subset.scanoneperm} \alias{[.scanoneperm} \title{Subsetting permutation test results} \description{ Pull out results for a specified set LOD columns from permutation results from \code{\link{scanone}}. } \usage{ \method{subset}{scanoneperm}(x, repl, lodcolumn, \dots) \method{[}{scanoneperm}(x, repl, lodcolumn) } \arguments{ \item{x}{Permutation results from \code{\link{scanone}}, run with \code{n.perm}>0.} \item{repl}{A vector specifying which permutation replicates to keep or (if negative) omit.} \item{lodcolumn}{A vector specifying which LOD columns to keep or (if negative) omit. These should be between 1 and the number of LOD columns in the input \code{x}.} \item{\dots}{Ignored at this point.} } \value{The input \code{scanone} permutation results, but with only the specified subset of the data.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=16:19)} fake.bc <- calc.genoprob(fake.bc, step=5) operm <- scanone(fake.bc, method="hk", pheno.col=1:2, n.perm=25) operm2 <- subset(operm, lodcolumn=2) # alternatively operm2alt <- operm[,2] } \seealso{ \code{\link{summary.scanoneperm}}, \code{\link{scanone}}, \code{\link{c.scanoneperm}}, \code{\link{cbind.scanoneperm}}, \code{\link[=c.scanoneperm]{rbind.scanoneperm}} } \keyword{manip} qtl/man/scanone.Rd0000644000176200001440000005211113355127045013547 0ustar liggesusers\name{scanone} \alias{scanone} \title{Genome scan with a single QTL model} \description{ Genome scan with a single QTL model, with possible allowance for covariates, using any of several possible models for the phenotype and any of several possible numerical methods. } \usage{ scanone(cross, chr, pheno.col=1, model=c("normal","binary","2part","np"), method=c("em","imp","hk","ehk","mr","mr-imp","mr-argmax"), addcovar=NULL, intcovar=NULL, weights=NULL, use=c("all.obs", "complete.obs"), upper=FALSE, ties.random=FALSE, start=NULL, maxit=4000, tol=1e-4, n.perm, perm.Xsp=FALSE, perm.strata=NULL, verbose, batchsize=250, n.cluster=1, ind.noqtl) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes for which LOD scores should be calculated. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers; for methods \code{"hk"} and \code{"imp"} this can be considerably faster than doing them one at a time. One may also give a character strings matching the phenotype names. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{model}{The phenotype model: the usual normal model, a model for binary traits, a two-part model or non-parametric analysis} \item{method}{Indicates whether to use the EM algorithm, imputation, Haley-Knott regression, the extended Haley-Knott method, or marker regression. Not all methods are available for all models. Marker regression is performed either by dropping individuals with missing genotypes (\code{"mr"}), or by first filling in missing data using a single imputation (\code{"mr-imp"}) or by the Viterbi algorithm (\code{"mr-argmax"}).} \item{addcovar}{Additive covariates; allowed only for the normal and binary models.} \item{intcovar}{Interactive covariates (interact with QTL genotype); allowed only for the normal and binary models.} \item{weights}{Optional weights of individuals. Should be either NULL or a vector of length n.ind containing positive weights. Used only in the case \code{model="normal"}.} \item{use}{In the case that multiple phenotypes are selected to be scanned, this argument indicates whether to use all individuals, including those missing some phenotypes, or just those individuals that have data on all selected phenotypes.} \item{upper}{Used only for the two-part model; if true, the "undefined" phenotype is the maximum observed phenotype; otherwise, it is the smallest observed phenotype.} \item{ties.random}{Used only for the non-parametric "model"; if TRUE, ties in the phenotypes are ranked at random. If FALSE, average ranks are used and a corrected LOD score is calculated.} \item{start}{Used only for the EM algorithm with the normal model and no covariates. If \code{NULL}, use the usual starting values; if length 1, use random initial weights for EM; otherwise, this should be a vector of length n+1 (where n is the number of possible genotypes for the cross), giving the initial values for EM.} \item{maxit}{Maximum number of iterations for methods \code{"em"} and \code{"ehk"}.} \item{tol}{Tolerance value for determining convergence for methods \code{"em"} and \code{"ehk"}.} \item{n.perm}{If specified, a permutation test is performed rather than an analysis of the observed data. This argument defines the number of permutation replicates.} \item{perm.Xsp}{If \code{n.perm} > 0, so that a permutation test will be performed, this indicates whether separate permutations should be performed for the autosomes and the X chromosome, in order to get an X-chromosome-specific LOD threshold. In this case, additional permutations are performed for the X chromosome.} \item{perm.strata}{If \code{n.perm} > 0, this may be used to perform a stratified permutation test. This should be a vector with the same number of individuals as in the cross data. Unique values indicate the individual strata, and permutations will be performed within the strata.} \item{verbose}{In the case \code{n.perm} is specified, display information about the progress of the permutation tests.} \item{batchsize}{The number of phenotypes (or permutations) to be run as a batch; used only for methods \code{"hk"} and \code{"imp"}.} \item{n.cluster}{If the package \code{snow} is available and \code{n.perm} > 0, permutations are run in parallel using this number of nodes.} \item{ind.noqtl}{Indicates individuals who should not be allowed a QTL effect (used rarely, if at all); this is a logical vector of same length as there are individuals in the cross.} } \section{Models}{ \bold{The normal model} is the standard model for QTL mapping (see Lander and Botstein 1989). The residual phenotypic variation is assumed to follow a normal distribution, and analysis is analogous to analysis of variance. \bold{The binary model} is for the case of a binary phenotype, which must have values 0 and 1. The proportions of 1's in the different genotype groups are compared. Currently only methods \code{em}, \code{hk}, and \code{mr} are available for this model. See Xu and Atchley (1996) and Broman (2003). \bold{The two-part model} is appropriate for the case of a spike in the phenotype distribution (for example, metastatic density when many individuals show no metastasis, or survival time following an infection when individuals may recover from the infection and fail to die). The two-part model was described by Boyartchuk et al. (2001) and Broman (2003). Individuals with QTL genotype \eqn{g} have probability \eqn{p_g}{p[g]} of having an undefined phenotype (the spike), while if their phenotype is defined, it comes from a normal distribution with mean \eqn{\mu_g}{mu[g]} and common standard deviation \eqn{\sigma}{s}. Three LOD scores are calculated: LOD(\eqn{p,\mu}{p,mu}) is for the test of the hypothesis that \eqn{p_g = p}{p[g] = p} and \eqn{\mu_g = \mu}{mu[g] = mu}. LOD(\eqn{p}) is for the test that \eqn{p_g = p}{p[g] = p} while the \eqn{\mu_g}{mu[g]} may vary. LOD(\eqn{\mu}{mu}) is for the test that \eqn{\mu_g = \mu}{mu[g] = mu} while the \eqn{p_g}{p[g]} may vary. \bold{With the non-parametric "model"}, an extension of the Kruskal-Wallis test is used; this is similar to the method described by Kruglyak and Lander (1995). In the case of incomplete genotype information (such as at locations between genetic markers), the Kruskal-Wallis statistic is modified so that the rank for each individual is weighted by the genotype probabilities, analogous to Haley-Knott regression. For this method, if the argument \code{ties.random} is TRUE, ties in the phenotypes are assigned random ranks; if it is FALSE, average ranks are used and a corrected LOD score is calculate. Currently the \code{method} argument is ignored for this model. } \section{Methods}{ \bold{\code{em}}: maximum likelihood is performed via the EM algorithm (Dempster et al. 1977), first used in this context by Lander and Botstein (1989). \bold{\code{imp}}: multiple imputation is used, as described by Sen and Churchill (2001). \bold{\code{hk}}: Haley-Knott regression is used (regression of the phenotypes on the multipoint QTL genotype probabilities), as described by Haley and Knott (1992). \bold{\code{ehk}}: the extended Haley-Knott method is used (like H-K, but taking account of the variances), as described in Feenstra et al. (2006). \bold{\code{mr}}: Marker regression is used. Analysis is performed only at the genetic markers, and individuals with missing genotypes are discarded. See Soller et al. (1976). } \section{Covariates}{ Covariates are allowed only for the normal and binary models. The normal model is \eqn{y = \beta_q + A \gamma + Z \delta_q + \epsilon}{y = b[q] + A g + Z d[q] + e} where \emph{q} is the unknown QTL genotype, \emph{A} is a matrix of additive covariates, and \emph{Z} is a matrix of covariates that interact with the QTL genotype. The columns of \emph{Z} are forced to be contained in the matrix \emph{A}. The binary model is the logistic regression analog. The LOD score is calculated comparing the likelihood of the above model to that of the null model \eqn{y = \mu + A \gamma + \epsilon}{y = m + A g + e}. Covariates must be numeric matrices. Individuals with any missing covariates are discarded. } \section{X chromosome}{ The X chromosome must be treated specially in QTL mapping. See Broman et al. (2006). If both males and females are included, male hemizygotes are allowed to be different from female homozygotes. Thus, in a backcross, we will fit separate means for the genotype classes AA, AB, AY, and BY. In such cases, sex differences in the phenotype could cause spurious linkage to the X chromosome, and so the null hypothesis must be changed to allow for a sex difference in the phenotype. Numerous special cases must be considered, as detailed in the following table. \tabular{lllccc}{ \bold{BC} \tab \tab \bold{Sexes} \tab \bold{Null} \tab \bold{Alternative} \tab \bold{df} \cr \tab \tab both sexes \tab sex \tab AA/AB/AY/BY \tab 2 \cr \tab \tab all female \tab grand mean \tab AA/AB \tab 1 \cr \tab \tab all male \tab grand mean \tab AY/BY \tab 1 \cr \tab \tab \tab \tab \tab \cr \bold{F2} \tab \bold{Direction} \tab \bold{Sexes}\tab \bold{Null}\tab \bold{Alternative} \tab \bold{df} \cr \tab Both \tab both sexes \tab femaleF/femaleR/male \tab AA/ABf/ABr/BB/AY/BY \tab 3 \cr \tab \tab all female \tab pgm \tab AA/ABf/ABr/BB \tab 2 \cr \tab \tab all male \tab grand mean \tab AY/BY \tab 1 \cr \tab Forward \tab both sexes \tab sex \tab AA/AB/AY/BY \tab 2 \cr \tab \tab all female \tab grand mean \tab AA/AB \tab 1 \cr \tab \tab all male \tab grand mean \tab AY/BY \tab 1 \cr \tab Backward \tab both sexes \tab sex \tab AB/BB/AY/BY \tab 2 \cr \tab \tab all female \tab grand mean \tab AB/BB \tab 1 \cr \tab \tab all male \tab grand mean \tab AY/BY \tab 1 \cr } In the case that the number of degrees of freedom for the linkage test for the X chromosome is different from that for autosomes, a separate X-chromosome LOD threshold is recommended. Autosome- and X-chromosome-specific LOD thresholds may be estimated by permutation tests with \code{scanone} by setting \code{n.perm}>0 and using \code{perm.Xsp=TRUE}. } \details{ Use of the EM algorithm, Haley-Knott regression, and the extended Haley-Knott method require that multipoint genotype probabilities are first calculated using \code{\link{calc.genoprob}}. The imputation method uses the results of \code{\link{sim.geno}}. Individuals with missing phenotypes are dropped. In the case that \code{n.perm}>0, so that a permutation test is performed, the R function \code{scanone} is called repeatedly. If \code{perm.Xsp=TRUE}, separate permutations are performed for the autosomes and the X chromosome, so that an X-chromosome-specific threshold may be calculated. In this case, \code{n.perm} specifies the number of permutations used for the autosomes; for the X chromosome, \code{n.perm} \eqn{\times \, L_A/L_X}{* L_A/L_X} permutations will be run, where \eqn{L_A} and \eqn{L_X} are the total genetic lengths of the autosomes and X chromosome, respectively. More permutations are needed for the X chromosome in order to obtain thresholds of similar accuracy. For further details on the models, the methods and the use of covariates, see below. } \value{ If \code{n.perm} is missing, the function returns a data.frame whose first two columns contain the chromosome IDs and cM positions. Subsequent columns contain the LOD scores for each phenotype. In the case of the two-part model, there are three LOD score columns for each phenotype: LOD(\eqn{p,\mu}{p,mu}), LOD(\eqn{p}) and LOD(\eqn{\mu}{mu}). The result is given class \code{"scanone"} and has attributes \code{"model"}, \code{"method"}, and \code{"type"} (the latter is the type of cross analyzed). If \code{n.perm} is specified, the function returns the results of a permutation test and the output has class \code{"scanoneperm"}. If \code{perm.Xsp=FALSE}, the function returns a matrix with \code{n.perm} rows, each row containing the genome-wide maximum LOD score for each of the phenotypes. In the case of the two-part model, there are three columns for each phenotype, corresponding to the three different LOD scores. If \code{perm.Xsp=TRUE}, the result contains separate permutation results for the autosomes and the X chromosome respectively, and an attribute indicates the lengths of the chromosomes and an indicator of which chromosome is X. } \references{ Boyartchuk, V. L., Broman, K. W., Mosher, R. E., D'Orazio S. E. F., Starnbach, M. N. and Dietrich, W. F. (2001) Multigenic control of \emph{Listeria monocytogenes} susceptibility in mice. \emph{Nature Genetics} \bold{27}, 259--260. Broman, K. W. (2003) Mapping quantitative trait loci in the case of a spike in the phenotype distribution. \emph{Genetics} \bold{163}, 1169--1175. Broman, K. W., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}, Owens, S. E., Manichaikul, A., Southard-Smith, E. M. and Churchill G. A. (2006) The X chromosome in quantitative trait locus mapping. \emph{Genetics}, \bold{174}, 2151--2158. Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. Dempster, A. P., Laird, N. M. and Rubin, D. B. (1977) Maximum likelihood from incomplete data via the EM algorithm. \emph{J. Roy. Statist. Soc.} B, \bold{39}, 1--38. Feenstra, B., Skovgaard, I. M. and Broman, K. W. (2006) Mapping quantitative trait loci by an extension of the Haley-Knott regression method using estimating equations. \emph{Genetics}, \bold{173}, 2111--2119. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Kruglyak, L. and Lander, E. S. (1995) A nonparametric approach for mapping quantitative trait loci. \emph{Genetics} \bold{139}, 1421--1428. Lander, E. S. and Botstein, D. (1989) Mapping Mendelian factors underlying quantitative traits using RFLP linkage maps. \emph{Genetics} \bold{121}, 185--199. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. Soller, M., Brody, T. and Genizi, A. (1976) On the power of experimental designs for the detection of linkage between marker loci and quantitative loci in crosses between inbred lines. \emph{Theor. Appl. Genet.} \bold{47}, 35--39. Xu, S., and Atchley, W.R. (1996) Mapping quantitative trait loci for complex binary diseases using line crosses. \emph{Genetics} \bold{143}, 1417--1424. } \author{Karl W Broman, \email{broman@wisc.edu}; Hao Wu} \examples{ ################### # Normal Model ################### data(hyper) \dontshow{hyper <- subset(hyper,chr=1:4,ind=1:100)} # Genotype probabilities for EM and H-K \dontrun{hyper <- calc.genoprob(hyper, step=2.5) }\dontshow{hyper <- calc.genoprob(hyper)} out.em <- scanone(hyper, method="em") out.hk <- scanone(hyper, method="hk") # Summarize results: peaks above 3 summary(out.em, thr=3) summary(out.hk, thr=3) # An alternate method of summarizing: # patch them together and then summarize out <- c(out.em, out.hk) summary(out, thr=3, format="allpeaks") # Plot the results plot(out.hk, out.em) plot(out.hk, out.em, chr=c(1,4), lty=1, col=c("blue","black")) # Imputation; first need to run sim.geno # Do just chromosomes 1 and 4, to save time \dontrun{hyper.c1n4 <- sim.geno(subset(hyper, chr=c(1,4)), step=2.5, n.draws=8) }\dontshow{hyper.c1n4 <- sim.geno(subset(hyper, chr=c(1,4)), step=0, n.draws=4)} out.imp <- scanone(hyper.c1n4, method="imp") summary(out.imp, thr=3) # Plot all three results plot(out.imp, out.hk, out.em, chr=c(1,4), lty=1, col=c("red","blue","black")) # extended Haley-Knott out.ehk <- scanone(hyper, method="ehk") plot(out.hk, out.em, out.ehk, chr=c(1,4)) # Permutation tests \dontrun{permo <- scanone(hyper, method="hk", n.perm=1000) }\dontshow{permo <- scanone(hyper, method="hk", n.perm=5) } # Threshold from the permutation test summary(permo, alpha=c(0.05, 0.10)) # Results above the 0.05 threshold summary(out.hk, perms=permo, alpha=0.05) #################### # scan with square-root of phenotype # (Note that pheno.col can be a vector of phenotype values) #################### out.sqrt <- scanone(hyper, pheno.col=sqrt(pull.pheno(hyper, 1))) plot(out.em - out.sqrt, ylim=c(-0.1,0.1), ylab="Difference in LOD") abline(h=0, lty=2, col="gray") #################### # Stratified permutations #################### extremes <- (nmissing(hyper)/totmar(hyper) < 0.5) \dontrun{operm.strat <- scanone(hyper, method="hk", n.perm=1000, perm.strata=extremes) }\dontshow{operm.strat <- scanone(hyper, method="hk", n.perm=5, perm.strata=extremes) } summary(operm.strat) #################### # X-specific permutations #################### data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"))} \dontrun{fake.f2 <- calc.genoprob(fake.f2, step=2.5) }\dontshow{fake.f2 <- calc.genoprob(fake.f2, step=0)} # genome scan out <- scanone(fake.f2, method="hk") # X-chr-specific permutations \dontrun{operm <- scanone(fake.f2, method="hk", n.perm=1000, perm.Xsp=TRUE) }\dontshow{operm <- scanone(fake.f2, method="hk", n.perm=5, perm.Xsp=TRUE) } # thresholds summary(operm) # scanone summary with p-values summary(out, perms=operm, alpha=0.05, pvalues=TRUE) ################### # Non-parametric ################### out.np <- scanone(hyper, model="np") summary(out.np, thr=3) # Plot with previous results plot(out.np, chr=c(1,4), lty=1, col="green") plot(out.imp, out.hk, out.em, chr=c(1,4), lty=1, col=c("red","blue","black"), add=TRUE) ################### # Two-part Model ################### data(listeria) \dontshow{listeria <- subset(listeria,chr=c(1,5,13),ind=!is.na(listeria$pheno[,1]))} \dontrun{listeria <- calc.genoprob(listeria,step=2.5) }\dontshow{listeria <- calc.genoprob(listeria,step=0)} out.2p <- scanone(listeria, model="2part", upper=TRUE) summary(out.2p, thr=c(5,3,3), format="allpeaks") # Plot all three LOD scores together plot(out.2p, out.2p, out.2p, lodcolumn=c(2,3,1), lty=1, chr=c(1,5,13), col=c("red","blue","black")) # Permutation test \dontrun{permo <- scanone(listeria, model="2part", upper=TRUE, n.perm=1000) }\dontshow{permo <- scanone(listeria, model="2part", upper=TRUE, n.perm=3) } # Thresholds summary(permo) ################### # Binary model ################### binphe <- as.numeric(pull.pheno(listeria,1)==264) out.bin <- scanone(listeria, pheno.col=binphe, model="binary") summary(out.bin, thr=3) # Plot LOD for binary model with LOD(p) from 2-part model plot(out.bin, out.2p, lodcolumn=c(1,2), lty=1, col=c("black", "red"), chr=c(1,5,13)) # Permutation test \dontrun{permo <- scanone(listeria, pheno.col=binphe, model="binary", n.perm=1000) }\dontshow{permo <- scanone(listeria, pheno.col=binphe, model="binary", n.perm=3) } # Thresholds summary(permo) ################### # Covariates ################### data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(2,5,10))} \dontrun{fake.bc <- calc.genoprob(fake.bc, step=2.5) }\dontshow{fake.bc <- calc.genoprob(fake.bc, step=0)} # genome scans without covariates out.nocovar <- scanone(fake.bc) # genome scans with covariates ac <- pull.pheno(fake.bc, c("sex","age")) ic <- pull.pheno(fake.bc, "sex") out.covar <- scanone(fake.bc, pheno.col=1, addcovar=ac, intcovar=ic) summary(out.nocovar, thr=3) summary(out.covar, thr=3) plot(out.covar, out.nocovar, chr=c(2,5,10)) } \seealso{ \code{\link{plot.scanone}}, \code{\link{summary.scanone}}, \code{\link{scantwo}}, \code{\link{calc.genoprob}}, \code{\link{sim.geno}}, \code{\link{max.scanone}}, \code{\link{summary.scanoneperm}}, \code{\link[=-.scanone]{-.scanone}}, \code{\link[=+.scanone]{+.scanone}} } \keyword{models} qtl/man/mapthis.Rd0000644000176200001440000000256213526005247013572 0ustar liggesusers\name{mapthis} \alias{mapthis} \docType{data} \title{Simulated data for illustrating genetic map construction} \description{ Simulated data for an F2 intercross, obtained using \code{\link{sim.cross}}, useful for illustrating the process of constructing a genetic map. } \usage{data(mapthis)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ These are simulated data, consisting of 300 F2 individuals typed at 100 markers on five chromosomes. There are no real phenotypes, just a set of individual identifiers. The data were simulated for the purpose of illustrating the process of constructing a genetic map. The markers are all assigned to a single chromosome and in a random order, and there are a number of problematic markers and individuals. See \url{https://rqtl.org/tutorials/geneticmaps.pdf} for a tutorial on how to construct a genetic map with these data.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(mapthis) summary(mapthis) plot(mapthis) } \references{ Broman, K. W. (2010) Genetic map construction with R/qtl. Technical report #214, Department of Biostatistics and Medical Informatics, University of Wisconsin--Madison } \seealso{ \code{\link{fake.f2}}, \code{\link{est.rf}}, \code{\link{est.map}}, \code{\link{formLinkageGroups}}, \code{\link{orderMarkers}} } \keyword{datasets} qtl/man/qtl-internal.Rd0000644000176200001440000001204713576462636014554 0ustar liggesusers\name{qtl-internal} \alias{reviseXdata} \alias{calc.plod} \alias{checkcovar} \alias{clean} \alias{condense} \alias{convert} \alias{convert2bcsft} \alias{create.map} \alias{find.pseudomarkerpos} \alias{flipcross} \alias{genAllPartitions} \alias{getsex} \alias{addmarkerstointervalmap} \alias{mqm_version} \alias{scanall} \alias{getgenonames} \alias{imf.cf} \alias{imf.h} \alias{imf.k} \alias{imf.m} \alias{imf.stahl} \alias{locatemarker} \alias{max.scantwocondensed} \alias{mf.cf} \alias{mf.h} \alias{mf.k} \alias{mf.m} \alias{mf.stahl} \alias{polyplot} \alias{print.addcovarint} \alias{print.addint} \alias{print.compactqtl} \alias{print.cross} \alias{print.map} \alias{print.qtl} \alias{print.scanoneboot} \alias{print.scantwo} \alias{print.summary.addpair} \alias{print.summary.compactqtl} \alias{print.summary.comparegeno} \alias{print.summary.cross} \alias{print.summary.fitqtl} \alias{print.summary.map} \alias{print.summary.qtl} \alias{print.summary.ripple} \alias{print.summary.scanone} \alias{print.summary.scanoneperm} \alias{print.summary.scantwo} \alias{print.summary.scantwo.old} \alias{print.summary.scantwoperm} \alias{replacemap} \alias{subrousummaryscantwo} \alias{summary.scantwocondensed} \alias{summary.addcovarint} \alias{summary.addint} \alias{summary.compactqtl} \alias{checkStepwiseqtlStart} \alias{checkformula} \alias{countqtlterms} \alias{deparseQTLformula} \alias{fitqtlengine} \alias{matchchr} \alias{parseformula} \alias{reviseqtlnuminformula} \title{Internal qtl functions} \description{ Internal qtl functions. These are generally not to be called by the user. } \usage{ reviseXdata(type=c("f2","bc","bcsft"), expandX=c("simple","standard","full"), sexpgm, geno, prob, draws, pairprob, cross.attr, force=FALSE) calc.plod(lod, nterms, type=c("f2","bc"), penalties) checkcovar(cross, pheno.col, addcovar, intcovar, perm.strata, ind.noqtl=NULL, weights=NULL, verbose=TRUE) clean(object, \dots) condense(object) convert(object, \dots) convert2bcsft(cross, BC.gen = 0, F.gen = 0, estimate.map = TRUE, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), verbose=FALSE) create.map(map, step, off.end, stepwidth=c("fixed", "variable", "max")) find.pseudomarkerpos(cross, marker, where=c("draws", "prob")) flipcross(cross) genAllPartitions(n.taxa, taxa) getsex(cross) addmarkerstointervalmap(cross,intervalresult,verbose=FALSE) mqm_version() scanall(cross, scanfunction=scanone, multicore=TRUE, n.clusters=1, batchsize=10, FF=0,cofactors=NULL, \dots, plot=FALSE, verbose=FALSE) getgenonames(type=c("f2","bc","riself","risib","4way","dh","haploid","special","bcsft"), chrtype=c("A","X"), expandX=c("simple","standard","full"), sexpgm, cross.attr) imf.cf(r) imf.h(r) imf.k(r) imf.m(r) imf.stahl(r, m=0, p=0, tol=1e-12, maxit=1000) locatemarker(map, pos, chr, flag) \method{max}{scantwocondensed}(object, lodcolumn=1, what=c("best", "full", "add", "int"), na.rm=TRUE, \dots) mf.cf(d) mf.h(d) mf.k(d) mf.m(d) mf.stahl(d, m=0, p=0) polyplot(x, type='b', legend=TRUE,legendloc=0, labels=NULL, cex = par("cex"), pch = 19, gpch = 21, bg = par("bg"), color = par("fg"), col=NULL, ylim=range(x[is.finite(x)]), xlim = NULL, main = NULL, xlab = NULL, ylab = NULL, add=FALSE, \dots) \method{print}{addcovarint}(x, \dots) \method{print}{addint}(x, \dots) \method{print}{compactqtl}(x, \dots) \method{print}{summary.comparegeno}(x, \dots) \method{print}{cross}(x, \dots) \method{print}{map}(x, \dots) \method{print}{qtl}(x, \dots) \method{print}{scanoneboot}(x, \dots) \method{print}{scantwo}(x, \dots) \method{print}{summary.addpair}(x, \dots) \method{print}{summary.compactqtl}(x, \dots) \method{print}{summary.cross}(x, \dots) \method{print}{summary.fitqtl}(x, \dots) \method{print}{summary.map}(x, \dots) \method{print}{summary.qtl}(x, \dots) \method{print}{summary.ripple}(x, \dots) \method{print}{summary.scanone}(x, \dots) \method{print}{summary.scanoneperm}(x, \dots) \method{print}{summary.scantwo}(x, \dots) \method{print}{summary.scantwo.old}(x, \dots) \method{print}{summary.scantwoperm}(x, \dots) replacemap(object, map) subrousummaryscantwo(object, for.perm=FALSE) \method{summary}{scantwocondensed}(object, thresholds, what=c("best", "full", "add", "int"), perms, alphas, lodcolumn=1, pvalues=FALSE, allpairs=TRUE, \dots) \method{summary}{addcovarint}(object, \dots) \method{summary}{addint}(object, \dots) \method{summary}{compactqtl}(object, \dots) checkStepwiseqtlStart(qtl, formula, covar=NULL) checkformula(formula, qtl.name, covar.name) countqtlterms(formula, ignore.covar=TRUE) deparseQTLformula(formula, reorderterms=FALSE) fitqtlengine(pheno, qtl, covar=NULL, formula, method=c("imp", "hk"), model=c("normal", "binary"), dropone=TRUE, get.ests=FALSE, run.checks=TRUE, cross.attr, crosstype, sexpgm, tol, maxit, forceXcovar=FALSE) matchchr(selection, thechr) parseformula(formula, qtl.dimname, covar.dimname) reviseqtlnuminformula(formula, oldnum, newnum) } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{internal} qtl/man/calc.errorlod.Rd0000644000176200001440000000562213355127045014657 0ustar liggesusers\name{calc.errorlod} \alias{calc.errorlod} \title{Identify likely genotyping errors} \description{ Calculates a LOD score for each genotype, measuring the evidence for genotyping errors. } \usage{ calc.errorlod(cross, error.prob=0.01, map.function=c("haldane","kosambi","c-f","morgan"), version=c("new","old")) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype)} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} \item{version}{Specifies whether to use the original version of this function or the current (preferred) version.} } \details{ Calculates, for each individual at each marker, a LOD score measuring the strength of evidence for a genotyping error, as described by Lincoln and Lander (1992). In the latest version, evidence for a genotype being in error is considered assuming that all other genotypes (for that individual, on that chromosome) are correct. The argument \code{version} allows one to specify whether this new version is used, or whether the original (old) version of the calculation is performed. Note that values below 4 are generally not interesting. Also note that if markers are extremely tightly linked, \emph{recombination events} can give large error LOD scores. The error LOD scores should not be trusted blindly, but should be viewed as a tool for identifying genotypes deserving further study. Use \code{\link{top.errorlod}} to print all genotypes with error LOD scores above a specified threshold, \code{\link{plotErrorlod}} to plot the error LOD scores for specified chromosomes, and \code{\link{plotGeno}} to view the observed genotype data with likely errors flagged. } \value{ The input \code{cross} object is returned with a component, \code{errorlod}, added to each component of \code{cross$geno}. The \code{errorlod} component is a matrix of size (n.ind x n.mar). An attribute \code{"error.prob"} is set to the value of the corresponding argument, for later reference. } \author{Karl W Broman, \email{broman@wisc.edu} } \references{ Lincoln, S. E. and Lander, E. S. (1992) Systematic detection of errors in genetic linkage data. \emph{Genomics} \bold{14}, 604--610. } \examples{ data(hyper) \dontshow{hyper <- subset(hyper,chr=c(1,19))} hyper <- calc.errorlod(hyper,error.prob=0.01) # print those above a specified cutoff top.errorlod(hyper, cutoff=4) # plot genotype data, flagging genotypes with error LOD > cutoff plotGeno(hyper, chr=1, ind=160:200, cutoff=7, min.sep=2) } \seealso{ \code{\link{plotErrorlod}}, \code{\link{top.errorlod}}, \code{\link{cleanGeno}} } \keyword{utilities} qtl/man/mqmplotcofactors.Rd0000644000176200001440000000332313526005056015514 0ustar liggesusers\name{mqmplot.cofactors} \alias{mqmplot.cofactors} \title{Plot cofactors on the genetic map} \description{ Plots cofactors as created by \code{\link{mqmsetcofactors}} or \code{\link{mqmautocofactors}} on the genetic map. } \usage{ mqmplot.cofactors(cross,cofactors, \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{cofactors}{ List of cofactors to be analysed in the QTL model. To set cofactors use \code{\link{mqmautocofactors}} or \code{mqmsetcofactors}}. % \mqmcofactors \item{\dots}{Passed to \code{\link{plot.qtl}}} } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) cof1 <- mqmsetcofactors(multitrait,20) cof2 <- mqmsetcofactors(multitrait,10) op <- par(mfrow=c(2,1)) mqmplot.cofactors(multitrait,cof1,col="blue") mqmplot.cofactors(multitrait,cof2,col="blue") op <- par(mfrow=c(1,1)) } \keyword{ hplot } qtl/man/summary.map.Rd0000644000176200001440000000215113355127045014371 0ustar liggesusers\name{summaryMap} \alias{summary.map} \alias{summaryMap} \title{Print summary of a genetic map} \description{ Print summary information about a \code{map} object. } \usage{ \method{summary}{map}(object, \dots) summaryMap(object, \dots) } \arguments{ \item{object}{An object of class \code{map}, which is a list of vectors (or, for a sex-specific map, 2-row matrices), each specifying the locations of the markers. The object can also be of class \code{cross}, in which case the function \code{\link{pull.map}} is used to extract the genetic map from the object.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.map}, which is just a data.frame containing the number of markers, length, the average inter-marker spacing, and the maximum distance between markers, for each chromosome and overall. An attribute \code{sexsp} indicates whether the map was sex-specific. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(map10) summary(map10) } \seealso{ \code{\link{chrlen}}, \code{\link{pull.map}}, \code{\link{summary.cross}} } \keyword{print} qtl/man/multitrait.Rd0000644000176200001440000000321013355127045014313 0ustar liggesusers\name{multitrait} \alias{multitrait} \docType{data} \title{ Example Cross object from R/QTL with multiple traits } \description{ Cross object from R/QTL, an object of class \code{cross} from R/QTL. See \code{\link{read.cross}} for details. } \usage{data(multitrait)} \format{ Cross object from R/QTL } \details{ Arabidopsis recombinant inbred lines by selfing. There are 162 lines, 24 phenotypes, and 117 markers on 5 chromosomes. } \source{ Part of the Arabidopsis RIL selfing experiment with Landsberg erecta (Ler) and Cape Verde Islands (Cvi) with 162 individuals scored (with errors at) 117 markers. Dataset obtained from GBIC - Groningen BioInformatics Centre } \references{ \itemize{ \item Keurentjes, J. J. and Fu, J. and de Vos, C. H. and Lommen, A. and Hall, R. D. and Bino, R. J. and van der Plas, L. H. and Jansen, R. C. and Vreugdenhil, D. and Koornneef, M. (2006), The genetics of plant metabolism. \emph{Nature Genetics.} \bold{38}-7, 842--849. \item Alonso-Blanco, C. and Peeters, A. J. and Koornneef, M. and Lister, C. and Dean, C. and van den Bosch, N. and Pot, J. and Kuiper, M. T. (1998), Development of an AFLP based linkage map of Ler, Col and Cvi Arabidopsis thaliana ecotypes and construction of a Ler/Cvi recombinant inbred line population}. \emph{Plant J.} \bold{14}(2), 259--271. } \examples{ data(multitrait) # Load dataset multitrait <- fill.geno(multitrait) # impute missing genotype data \dontshow{multitrait <- subset(multitrait, chr=1) multitrait$pheno <- multitrait$pheno[,1:3]} result <- mqmscanall(multitrait, logtransform=TRUE) # Analyse all 24 traits } \keyword{datasets} qtl/man/plot.pxg.Rd0000644000176200001440000000560113355127045013676 0ustar liggesusers\name{plotPXG} \alias{plotPXG} \title{Plot phenotypes versus marker genotypes} \description{ Plot the phenotype values versus the genotypes at a marker or markers. } \usage{ plotPXG(x, marker, pheno.col=1, jitter=1, infer=TRUE, pch, ylab, main, col, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details. } \item{marker}{Marker name (a character string; can be a vector).} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{jitter}{A positive number indicating how much to spread out the points horizontally. (Larger numbers correspond to greater spread.)} \item{infer}{If TRUE, missing genotypes are filled in with a single random imputation and plotted in red; if FALSE, only individuals typed at the specified marker are plotted.} \item{pch}{Plot symbol.} \item{ylab}{Label for y-axis.} \item{main}{Main title for the plot. If missing, the names of the markers are used.} \item{col}{A vector of colors to use for the confidence intervals (optional).} \item{\dots}{Passed to \code{\link[graphics]{plot}}.} } \details{ Plots the phenotype data against the genotypes at the specified marker. If infer=TRUE, the genotypes of individuals that were not typed is inferred based the genotypes at linked markers via a single imputation from \code{\link{sim.geno}}; these points are plotted in red. For each genotype, the phenotypic mean is plotted, with error bars at \eqn{\pm}{+/-} 1 SE. } \value{ A data.frame with initial columns the marker genotypes, then the phenotype data, then a column indicating whether any of the marker genotypes were inferred (1=at least one genotype inferred, 0=none were inferred). } \examples{ data(listeria) mname <- find.marker(listeria, 5, 28) # marker D5M357 plotPXG(listeria, mname) mname2 <- find.marker(listeria, 13, 26) # marker D13Mit147 plotPXG(listeria, c(mname, mname2)) plotPXG(listeria, c(mname2, mname)) # output of the function contains the raw data output <- plotPXG(listeria, mname) head(output) # another example data(fake.f2) mname <- find.marker(fake.f2, 1, 37) # marker D1M437 plotPXG(fake.f2, mname) mname2 <- find.marker(fake.f2, "X", 14) # marker DXM66 plotPXG(fake.f2, mname2) plotPXG(fake.f2, c(mname,mname2)) plotPXG(fake.f2, c(mname2,mname)) } \seealso{ \code{\link{find.marker}}, \code{\link{effectplot}}, \code{\link{find.flanking}}, \code{\link{effectscan}} } \author{Karl W Broman, \email{broman@wisc.edu}; Brian Yandell } \keyword{hplot} qtl/man/mqmscanfdr.Rd0000644000176200001440000001002613526005107014245 0ustar liggesusers\name{mqmscanfdr} \alias{mqmscanfdr} \title{ Estimate FDR for multiple trait QTL analysis } \description{ Estimate the false discovery rate (FDR) for multiple trait analysis } \usage{ mqmscanfdr(cross, scanfunction=mqmscanall, thresholds=c(1,2,3,4,5,7,10,15,20), n.perm=10, verbose=FALSE, \dots ) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{scanfunction}{ QTL mapping function, Note: Must use scanall or mqmscanall. Otherwise this will not produce usefull results. Reason: We need a function that maps all traits ecause of the correlation structure which is not changed (between traits) during permutation (Valis options: scanall or mqmscanall) } \item{thresholds}{ False discovery rate (FDR) is calculated for peaks above these LOD thresholds (DEFAULT=Range from 1 to 20, using 10 thresholds) Parameter is a list of LOD scores at which FDR is calculated. } \item{n.perm}{ Number of permutations (DEFAULT=10 for quick analysis, however for publications use 1000, or higher) } \item{verbose}{ verbose output } \item{\dots}{ Parameters passed to the mapping function } } \details{ This function wraps the analysis of \code{\link{scanone}}, \code{\link{cim}} and \code{\link{mqmscan}} to scan for QTL in shuffled/randomized data. It is recommended to also install the \code{snow} library for parallelization of calculations. The \code{snow} library allows calculations to run on multiple cores or even scale it up to an entire cluster, thus speeding up calculation by the number of computers used. } \value{ Returns a data.frame with 3 columns: FalsePositives, FalseNegatives and False Discovery Rates. In the rows the userspecified thresholds are with scores for the 3 columns. } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) # impute missing genotype data multitrait <- fill.geno(multitrait) \dontrun{# Calculate the thresholds result <- mqmscanfdr(multitrait, threshold=10.0, n.perm=1000) }\dontshow{ multitrait <- subset(multitrait, chr=1, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3] result <- mqmscanfdr(multitrait, threshold=10.0, n.perm=2) } } \references{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/significance_references.txt"} \item Bruno M. Tesson, Ritsert C. Jansen (2009) Chapter 3.7. Determining the significance threshold \emph{eQTL Analysis in Mice and Rats} \bold{1}, 20--25 \item Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. % -----^^ inst/doc/Sources/MQM/mqm/significance_references.txt ^^----- % \input{"inst/doc/Sources/MQM/mqm/parallelisation_references.txt"} \item Rossini, A., Tierney, L., and Li, N. (2003), Simple parallel statistical computing. \emph{R. UW Biostatistics working paper series} University of Washington. \bold{193} \item Tierney, L., Rossini, A., Li, N., and Sevcikova, H. (2004), The snow Package: Simple Network of Workstations. Version 0.2-1. % -----^^ inst/doc/Sources/MQM/mqm/parallelisation_references.txt ^^----- } } \keyword{ models } qtl/man/nphe.Rd0000644000176200001440000000121013355127045013045 0ustar liggesusers\name{nphe} \alias{nphe} \title{Determine the number of phenotypes QTL experiment} \description{ Determine the number of phenotypes in cross object. } \usage{ nphe(object) } \arguments{ \item{object}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The number of phenotypes in the input cross object. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) nphe(fake.f2) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{summary.cross}}, \code{\link{nmar}}, \code{\link{nchr}}, \code{\link{totmar}}, \code{\link{nind}} } \keyword{print} qtl/man/mqmplotcircle.Rd0000644000176200001440000000742613526005046015001 0ustar liggesusers\name{mqmplot.circle} \alias{mqmplot.circle} \title{Circular genome plot for MQM} \description{ Circular genome plot - shows QTL locations and relations. } \usage{ mqmplot.circle(cross,result,highlight=0,spacing=25, interactstrength=2, axis.legend=TRUE, col.legend=FALSE, verbose=FALSE, transparency=FALSE) } \arguments{ \item{cross}{An object of class \code{cross} with optionally phenotype locations. See \code{\link{read.cross}} for details on reading in cross objects, and optionally \code{\link{addloctocross}} for adding phenotype locations. } \item{result}{An object of class \code{mqmmulti} or \code{scanone}. See \code{\link{mqmscanall}} \code{\link{scanone}} for details. } \item{highlight}{ With a mqmmulti object, highlight this phenotype (value between one and the number of results in the mqmmultiobject) } \item{interactstrength}{ When highlighting a trait, consider interactions significant they have a change of more than interactstrength*SEs. A higher value will show less interactions. However the interactions reported at higher interactstrength values will generaty be more reliable. } \item{spacing}{ User defined spacing between chromosomes in cM } \item{axis.legend}{ When set to FALSE, suppresses the legends. (defaults to plotting legends besides the axis. } \item{col.legend}{ With a mqmmulti object, plots a legend for the non-highlighed version } \item{transparency}{ Use transparency when drawing the plots (defaults to no transparency) } \item{verbose}{ Be verbose } } \details{ Depending on the input of the result being either \code{\link{scanone}} or \code{mqmmulti} a different plot is drawn. If model information is present from \code{\link{mqmscan}} (by setting cofactors) This will be highlighted in red (see example). If phenotypes have genetic locations (e.g. eQTL) they will be plotted on the genome otherwise phenotypes will be plotted in the middle of the circle (with a small offset) Locations can be added by using the \code{\link{addloctocross}} function. } \value{ Plotting routine, no return } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait$pheno <- multitrait$pheno[,1:3]} data(locations) \dontshow{locations <- locations[1:3,]} multifilled <- fill.geno(multitrait) # impute missing genotypes multicof <- mqmsetcofactors(multitrait,10) # create cofactors multiloc <- addloctocross(multifilled,locations) # add phenotype information to cross multires <- mqmscanall(multifilled,cofactors=multicof) # run mqmscan for all phenotypes #Basic mqmmulti, color = trait, round circle = significant mqmplot.circle(multifilled,multires) #mqmmulti with locations of traits in multiloc mqmplot.circle(multiloc,multires) #mqmmulti with highlighting mqmplot.circle(multitrait,multires,highlight=3) #mqmmulti with locations of traits in multiloc and highlighting mqmplot.circle(multiloc,multires,highlight=3) } \keyword{ utilities } qtl/man/addcovarint.Rd0000644000176200001440000001134413355127045014422 0ustar liggesusers\name{addcovarint} \alias{addcovarint} \title{Add QTL x covariate interaction to a multiple-QTL model} \description{ Try adding all QTL x covariate interactions, one at a time, to a multiple QTL model, for a given set of covariates. } \usage{ addcovarint(cross, pheno.col=1, qtl, covar=NULL, icovar, formula, method=c("imp","hk"), model=c("normal", "binary"), verbose=TRUE, pvalues=TRUE, simple=FALSE, tol=1e-4, maxit=1000, require.fullrank=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{An object of class \code{qtl}, as output from \code{\link{makeqtl}}.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{icovar}{Vector of character strings indicating the columns in \code{covar} to be considered for QTL x covariate interactions.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are referred to as \code{Q1}, \code{Q2}, etc. Covariates are referred to by their names in the data frame \code{covar}.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{verbose}{If TRUE, will print a message if there are no interactions to test.} \item{pvalues}{If FALSE, p-values will not be included in the results.} \item{simple}{If TRUE, don't include p-values or sums of squares in the summary.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{require.fullrank}{If TRUE, give LOD=0 when covariate matrix in the linear regression is not of full rank.} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect must also be included. } \section{Value}{ An object of class \code{addcovarint}, with results as in the drop-one-term analysis from \code{\link{fitqtl}}. This is a data frame (given class \code{"addcovarint"}, with the following columns: degrees of freedom (df), Type III sum of squares (Type III SS), LOD score(LOD), percentage of variance explained (\%var), F statistics (F value), and P values for chi square (Pvalue(chi2)) and F distribution (Pvalue(F)). Note that the degree of freedom, Type III sum of squares, the LOD score and the percentage of variance explained are the values comparing the full to the sub-model with the term dropped. Also note that for imputation method, the percentage of variance explained, the the F values and the P values are approximations calculated from the LOD score. QTL x covariate interactions already included in the input \code{formula} are not tested. } \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 8, 13) qp <- c(26, 56, 28) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") # use the sex phenotype as the covariate covar <- data.frame(sex=fake.f2$pheno$sex) # try all possible QTL x sex interactions, one at a time addcovarint(fake.f2, pheno.col=1, qtl, covar, "sex", y~Q1+Q2+Q3, method="hk") } \seealso{ \code{\link{addint}}, \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}}, \code{\link{refineqtl}}, \code{\link{addqtl}}, \code{\link{addpair}} } \keyword{models} qtl/man/find.marker.Rd0000644000176200001440000000315413355127045014324 0ustar liggesusers\name{find.marker} \alias{find.marker} \title{Find marker closest to a specified position} \description{ Find the genetic marker closest to a specified position on a chromosome. } \usage{find.marker(cross, chr, pos, index)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{A vector of chromosome identifiers, or a single such.} \item{pos}{A vector of cM positions.} \item{index}{A vector of numeric indices of the markers within chromosomes.} } \value{ A vector of marker names (of the same length as the input \code{pos}), corresponding to the markers nearest to the specified chromosomes/positions (if \code{pos} is specified) or to the input numeric indices (in \code{index} is specified). } \details{ Provide one of \code{pos} or \code{index}. If the input \code{chr} has length one, it is expanded to the same length as the input \code{pos} or \code{index}. If \code{pos} is specified and multiple markers are exactly the same distance from the specified position, one is chosen at random from among those with the most genotype data. For a cross with sex-specific maps, positions specified by \code{pos} are assumed to correspond to the female genetic map. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) find.marker(listeria, 5, 28) find.marker(listeria, 5, index=6) find.marker(listeria, c(1, 5, 13), c(81, 28, 26)) } \seealso{ \code{\link{find.flanking}}, \code{\link{plotPXG}}, \code{\link{find.pseudomarker}}, \code{\link{effectplot}}, \code{\link{find.markerpos}} } \keyword{utilities} qtl/man/geno.image.Rd0000644000176200001440000000375113416110013014121 0ustar liggesusers\name{geno.image} \alias{geno.image} \title{Plot grid of genotype data} \description{ Plot a grid showing which the genotype data in a cross. } \usage{ geno.image(x, chr, reorder=FALSE, main="Genotype data", alternate.chrid=FALSE, col=NULL, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details. } \item{chr}{Optional vector indicating the chromosomes to be drawn in the plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{reorder}{Specify whether to reorder individuals according to their phenotypes. \tabular{ll}{ FALSE \tab Don't reorder \cr TRUE \tab Reorder according to the sum of the phenotypes \cr n \tab Reorder according to phenotype n}} \item{main}{Title to place on plot.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{col}{Vector of colors. The first is for missing genotypes, followed by colors for each of the genotypes. If \code{NULL}, a default set of colors are used.} \item{\dots}{Passed to \code{\link[graphics]{image}}.} } \details{ Uses \code{\link[graphics]{image}} to plot a grid with the genotype data. The genotypes AA, AB, BB are displayed in the colors red, blue, and green, respectively. In an intercross, if there are genotypes "not BB" and "not AA", these are displayed in purple and orange, respectively. White pixels indicate missing data. } \value{None.} \examples{ data(listeria) geno.image(listeria) } \seealso{ \code{\link{plot.cross}}, \code{\link{plotMissing}}, \code{\link{plotGeno}}, \code{\link[graphics]{image}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/sim.map.Rd0000644000176200001440000000366713355127045013501 0ustar liggesusers\name{sim.map} \alias{sim.map} \title{Simulate a genetic map} \description{ Simulate the positions of markers on a genetic map. } \usage{ sim.map(len=rep(100,20), n.mar=10, anchor.tel=TRUE, include.x=TRUE, sex.sp=FALSE, eq.spacing=FALSE) } \arguments{ \item{len}{A vector specifying the chromosome lengths (in cM)} \item{n.mar}{A vector specifying the number of markers per chromosome.} \item{anchor.tel}{If true, markers at the two telomeres will always be included, so if \code{n.mar} = 1 or 2, we'll give just the two telomeric markers.} \item{include.x}{Indicates whether the last chromosome should be considered the X chromosome.} \item{sex.sp}{Indicates whether to create sex-specific maps, in which case the output will be a vector of 2-row matrices, with rows corresponding to the maps for the two sexes.} \item{eq.spacing}{If TRUE, markers will be equally spaced.} } \details{ Aside from the telomeric markers, marker positions are simulated as iid Uniform(\eqn{0,L}). If \code{len} or \code{n.mar} has just one element, it is expanded to the length of the other argument. If they both have just one element, only one chromosome is simulated. If \code{eq.spacing} is TRUE, markers are equally spaced between 0 and \eqn{L}. If \code{anchor.tel} is FALSE, telomeric markers are not included. } \value{ A list of vectors, each specifying the locations of the markers. Each component of the list is given class \code{A} or \code{X}, according to whether it is autosomal or the X chromosome. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ # simulate 4 autosomes, each with 10 markers map <- sim.map(c(100,90,80,40), 10, include.x=FALSE) plotMap(map) # equally spaced markers map2 <- sim.map(c(100,90,80,40), 10, include.x=FALSE, eq.spacing=TRUE) plot(map2) } \seealso{ \code{\link{sim.cross}}, \code{\link{plotMap}}, \code{\link{replace.map}}, \code{\link{pull.map}} } \keyword{datagen} qtl/man/fitqtl.Rd0000644000176200001440000001756213355127045013437 0ustar liggesusers\name{fitqtl} \alias{fitqtl} \title{Fit a multiple-QTL model} \description{ Fits a user-specified multiple-QTL model. If specified, a drop-one-term analysis will be performed. } \usage{ fitqtl(cross, pheno.col=1, qtl, covar=NULL, formula, method=c("imp", "hk"), model=c("normal", "binary"), dropone=TRUE, get.ests=FALSE, run.checks=TRUE, tol=1e-4, maxit=1000, forceXcovar=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{An object of class \code{qtl}, as output from \code{\link{makeqtl}}.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are referred to as \code{Q1}, \code{Q2}, etc. Covariates are referred to by their names in the data frame \code{covar}. } \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{dropone}{If TRUE, do drop-one-term analysis.} \item{get.ests}{If TRUE, return estimated QTL effects and their estimated variance-covariance matrix.} \item{run.checks}{If TRUE, check the input formula and check for individuals with missing phenotypes or covariates.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{forceXcovar}{If TRUE, force inclusion of X-chr-related covariates (like sex and cross direction).} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect must also be included. In the drop-one-term analysis, for a given QTL/covariate model, all submodels will be analyzed. For each term in the input formula, when it is dropped, all higher order terms that contain it will also be dropped. The comparison between the new model and the full (input) model will be output. The estimated percent variances explained for the QTL are simplify transformations of the conditional LOD scores by the formula \eqn{h^2 = 1 - 10^{-(2/n) {\rm LOD}}}. While these may be reasonable for unlinked, additive QTL, \bold{they can be completely wrong in the case of linked QTL}, but we don't currently have any alternative. For \code{model="binary"}, a logistic regression model is used. \bold{The part to get estimated QTL effects is not complete for the case of the X chromosome and 4-way crosses. The values returned in these cases are based on a design matrix that is convenient for calculations but not easily interpreted.} The estimated QTL effects for a backcross are derived by the coding scheme \eqn{\pm}{+/-} 1/2 for AA and AB, so that the additive effect corresponds to the difference between phenotype averages for the two genotypes. For doubled haploids and RIL, the coding scheme is \eqn{\pm}{+/-} 1 for AA and BB, so that the additive effect corresponds to half the difference between the phenotype averages for the two homozygotes. For an intercross, the additive effect is derived from the coding scheme -1/0/+1 for genotypes AA/AB/BB, and so is half the difference between the phenotype averages for the two homozygotes. The dominance deviation is derived from the coding scheme 0/+1/0 for genotypes AA/AB/BB, and so is the difference between the phenotype average for the heterozygotes and the midpoint between the phenotype averages for the two homozygotes. Epistatic effects and QTL \eqn{\times}{x} covariate interaction effects are obtained through the products of the corresponding additive/dominant effect columns. } \value{ An object of class \code{fitqtl}. It may contains as many as four components: \itemize{ \item \code{result.full} is the ANOVA table as a matrix for the full model result. It contains the degree of freedom (df), Sum of squares (SS), mean square (MS), LOD score (LOD), percentage of variance explained (\%var) and P value (Pvalue). \item \code{lod} is the LOD score from the fit of the full model. \item \code{result.drop} is a drop-one-term ANOVA table as a matrix. It contains degrees of freedom (df), Type III sum of squares (Type III SS), LOD score(LOD), percentage of variance explained (\%var), F statistics (F value), and P values for chi square (Pvalue(chi2)) and F distribution (Pvalue(F)). Note that the degree of freedom, Type III sum of squares, the LOD score and the percentage of variance explained are the values comparing the full to the sub-model with the term dropped. Also note that for imputation method, the percentage of variance explained, the the F values and the P values are approximations calculated from the LOD score. \item \code{ests} contains the estimated QTL effects and standard errors. } When \code{method="normal"}, residuals are saved as an attribute of the output, named \code{"residuals"} and accessible via the \code{\link[base]{attr}} function. \bold{The part to get estimated QTL effects is fully working only for the case of autosomes in a backcross, intercross, RIL or doubled haploids. In other cases the values returned are based on a design matrix that is convenient for calculations but not easily interpreted.} } \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 8, 13) qp <- c(26, 56, 28) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") # fit model with 3 interacting QTLs interacting # (performing a drop-one-term analysis) lod <- fitqtl(fake.f2, pheno.col=1, qtl, formula=y~Q1*Q2*Q3, method="hk") summary(lod) \dontrun{ # fit an additive QTL model lod.add <- fitqtl(fake.f2, pheno.col=1, qtl, formula=y~Q1+Q2+Q3, method="hk") summary(lod.add) # fit the model including sex as an interacting covariate Sex <- data.frame(Sex=pull.pheno(fake.f2, "sex")) lod.sex <- fitqtl(fake.f2, pheno.col=1, qtl, formula=y~Q1*Q2*Q3*Sex, cov=Sex, method="hk") summary(lod.sex) # fit the same with an additive model lod.sex.add <- fitqtl(fake.f2, pheno.col=1, qtl, formula=y~Q1+Q2+Q3+Sex, cov=Sex, method="hk") summary(lod.sex.add) # residuals residuals <- attr(lod.sex.add, "residuals") plot(residuals) }} \seealso{ \code{\link{summary.fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}}, \code{\link{refineqtl}}, \code{\link{addtoqtl}} , \code{\link{dropfromqtl}}, \code{\link{replaceqtl}}, \code{\link{reorderqtl}}} \keyword{models} qtl/man/bayesint.Rd0000644000176200001440000000326613355127045013746 0ustar liggesusers\name{bayesint} \alias{bayesint} \title{Bayesian credible interval} \description{ Calculate an approximate Bayesian credible interval for a particular chromosome, using output from \code{\link{scanone}}. } \usage{bayesint(results, chr, qtl.index, prob=0.95, lodcolumn=1, expandtomarkers=FALSE)} \arguments{ \item{results}{Output from \code{\link{scanone}}, or a qtl object as output from \code{\link{refineqtl}}.} \item{chr}{A chromosome ID (if input \code{results} are from \code{\link{scanone}} (should have length 1).} \item{qtl.index}{Numeric index for a QTL (if input \code{results} are from \code{\link{refineqtl}} (should have length 1).} \item{prob}{Probability coverage of the interval.} \item{lodcolumn}{An integer indicating which of the LOD score columns should be considered (if input \code{results} are from \code{\link{scanone}}).} \item{expandtomarkers}{If TRUE, the interval is expanded to the nearest flanking markers.} } \value{ An object of class \code{scanone} indicating the estimated QTL position and the approximate endpoints for the Bayesian credible interval. } \details{ We take \eqn{10^{LOD}}{10^LOD}, rescale it to have area 1, and then calculate the connected interval with density above some threshold and having coverage matching the target probability. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=c(1,4))} hyper <- calc.genoprob(hyper, step=0.5) out <- scanone(hyper, method="hk") bayesint(out, chr=1) bayesint(out, chr=4) bayesint(out, chr=4, prob=0.99) bayesint(out, chr=4, expandtomarkers=TRUE) } \seealso{ \code{\link{scanone}}, \code{\link{lodint}} } \keyword{utilities} qtl/man/checkAlleles.Rd0000644000176200001440000000333413355127045014503 0ustar liggesusers\name{checkAlleles} \alias{checkAlleles} \title{Identify markers with switched alleles} \description{ Identify markers whose alleles might have been switched by comparing the LOD score for linkage to all other autosomal markers with the original data to that when the alleles have been switched. } \usage{checkAlleles(cross, threshold=3, verbose)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{threshold}{Only an increase in maximum 2-point LOD of at least this amount will lead to a marker being flagged.} \item{verbose}{If TRUE and there are no markers above the threshold, print a message.} } \value{ A data frame containing the flagged markers, having four columns: the marker name, chromosome ID, numeric index within chromosome, and the difference between the maximum two-point LOD score with the alleles switched to that from the original data. } \details{ For each marker, we compare the maximum LOD score for the cases where the estimated recombination fraction > 0.5 to those where r.f. < 0.5. The function \code{\link{est.rf}} must first be run. \bold{Note}: Markers that are tightly linked to a marker whose alleles are switched are likely to also be flagged by this method. The real problem markers are likely those with the biggest difference in LOD scores. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr="5")} # switch homozygotes at marker D5M391 fake.f2 <- switchAlleles(fake.f2, "D5M391") fake.f2 <- est.rf(fake.f2) checkAlleles(fake.f2) } \seealso{ \code{\link{est.rf}}, \code{\link{geno.crosstab}}, \code{\link{switchAlleles}} } \keyword{utilities} qtl/man/dropfromqtl.Rd0000644000176200001440000000275413355127045014502 0ustar liggesusers\name{dropfromqtl} \alias{dropfromqtl} \title{Drop a QTL from a qtl object} \description{ Drop a QTL or multiple QTL from a QTL object } \usage{ dropfromqtl(qtl, index, chr, pos, qtl.name, drop.lod.profile=TRUE) } \arguments{ \item{qtl}{A qtl object, as created by \code{\link{makeqtl}}.} \item{index}{Vector specifying the numeric indices of the QTL to be dropped.} \item{chr}{Vector indicating the chromosome for each QTL to drop.} \item{pos}{Vector (of same length as \code{chr}) indicating the positions of the QTL to be dropped.} \item{qtl.name}{Vector specifying the names of the QTL to be dropped.} \item{drop.lod.profile}{If TRUE, remove any LOD profiles from the object.} } \details{ Provide either \code{chr} and \code{pos}, or one of \code{qtl.name} or \code{index}. } \value{ The input \code{qtl} object with the specified QTL omitted. See \code{\link{makeqtl}} for details on the format. } \author{Karl W Broman, \code{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 6, 13) qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") newqtl <- dropfromqtl(qtl, chr=1, pos=25.8) altqtl <- dropfromqtl(qtl, index=1) } \seealso{ \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{addtoqtl}}, \code{\link{replaceqtl}} , \code{\link{reorderqtl}}} \keyword{utilities} qtl/man/sim.cross.Rd0000644000176200001440000002041613355127045014044 0ustar liggesusers\name{sim.cross} \alias{sim.cross} \title{Simulate a QTL experiment} \description{ Simulates data for a QTL experiment using a model in which QTLs act additively. } \usage{ sim.cross(map, model=NULL, n.ind=100, type=c("f2", "bc", "4way", "risib", "riself", "ri4sib", "ri4self", "ri8sib", "ri8self", "bcsft"), error.prob=0, missing.prob=0, partial.missing.prob=0, keep.qtlgeno=TRUE, keep.errorind=TRUE, m=0, p=0, map.function=c("haldane","kosambi","c-f","morgan"), founderGeno, random.cross=TRUE, \dots) } \arguments{ \item{map}{A list whose components are vectors containing the marker locations on each of the chromosomes.} \item{model}{A matrix where each row corresponds to a different QTL, and gives the chromosome number, cM position and effects of the QTL.} \item{n.ind}{Number of individuals to simulate.} \item{type}{Indicates whether to simulate an intercross (\code{f2}), a backcross (\code{bc}), a phase-known 4-way cross (\code{4way}), or recombinant inbred lines (by selfing or by sib-mating, and with the usual 2 founder strains or with 4 or 8 founder strains).} \item{error.prob}{The genotyping error rate.} \item{missing.prob}{The rate of missing genotypes.} \item{partial.missing.prob}{When simulating an intercross or 4-way cross, this gives the rate at which markers will be incompletely informative (i.e., dominant or recessive).} \item{keep.qtlgeno}{If TRUE, genotypes for the simulated QTLs will be included in the output.} \item{keep.errorind}{If TRUE, and if \code{error.prob > 0}, the identity of genotyping errors will be included in the output.} \item{m}{Interference parameter; a non-negative integer. 0 corresponds to no interference.} \item{p}{Probability that a chiasma comes from the no-interference mechanism} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} \item{founderGeno}{For 4- or 8-way RIL, the genotype data of the founder strains, as a list whose components are numeric matrices (no. markers x no. founders), one for each chromosome.} \item{random.cross}{For 4- or 8-way RIL, indicates whether the order of the founder strains should be randomized, independently for each RIL, or whether all RIL be derived from a common cross. In the latter case, for a 4-way RIL, the cross would be (AxB)x(CxD).} \item{\dots}{For \code{type = "bcsft"}, additional arguments passed to \code{sim.cross.bcsft}.} } \details{ Meiosis is assumed to follow the Stahl model for crossover interference (see the references, below), of which the no interference model and the chi-square model are special cases. Chiasmata on the four-strand bundle are a superposition of chiasmata from two different mechanisms. With probability \code{p}, they arise by a mechanism exhibiting no interference; the remainder come from a chi-square model with inteference parameter \code{m}. Note that \code{m=0} corresponds to no interference, and with \code{p=0}, one gets a pure chi-square model. If a chromosomes has class \code{X}, it is assumed to be the X chromosome, and is assumed to be segregating in the cross. Thus, in an intercross, it is segregating like a backcross chromosome. In a 4-way cross, a second phenotype, \code{sex}, will be generated. QTLs are assumed to act additively, and the residual phenotypic variation is assumed to be normally distributed with variance 1. For a backcross, the effect of a QTL is a single number corresponding to the difference between the homozygote and the heterozygote. For an intercross, the effect of a QTL is a pair of numbers, (\eqn{a,d}), where \eqn{a} is the additive effect (half the difference between the homozygotes) and \eqn{d} is the dominance deviation (the difference between the heterozygote and the midpoint between the homozygotes). For a four-way cross, the effect of a QTL is a set of three numbers, (\eqn{a,b,c}), where, in the case of one QTL, the mean phenotype, conditional on the QTL genotyping being AC, BC, AD or BD, is \eqn{a}, \eqn{b}, \eqn{c} or 0, respectively. } \section{Recombinant inbred lines}{ In the simulation of recombinant inbred lines (RIL), we simulate a single individual from each line, and no phenotypes are simulated (so the argument \code{model} is ignored). The types \code{riself} and \code{risib} are the usual two-way RIL. The types \code{ri4self}, \code{ri4sib}, \code{ri8self}, and \code{ri8sib} are RIL by selfing or sib-mating derived from four or eight founding parental strains. For the 4- and 8-way RIL, one must include the genotypes of the founding individuals; these may be simulated with \code{\link{simFounderSnps}}. Also, the output cross will contain a component \code{cross}, which is a matrix with rows corresponding to RIL and columns corresponding to the founders, indicating order of the founder strains in the crosses used to generate the RIL. The coding of genotypes in 4- and 8-way RIL is rather complicated. It is a binary encoding of which founder strains' genotypes match the RIL's genotype at a marker, and not that this is specific to the order of the founders in the crosses used to generate the RIL. For example, if an RIL generated from 4 founders has the 1 allele at a SNP, and the four founders have SNP alleles 0, 1, 0, 1, then the RIL allele matches that of founders B and D. If the RIL was derived by the cross (AxB)x(CxD), then the RIL genotype would be encoded \eqn{2^{2-1} + 2^{3-1} = 6}{2^(2-1) + 2^(3-1) = 6}. If the cross was derived by the cross (DxA)x(CxB), then the RIL genotype would be encoded \eqn{2^{1-1} + 2^{4-1} = 9}{2^(1-1) + 2^(4-1) = 6}. These get reorganized after calls to \code{\link{calc.genoprob}}, \code{\link{sim.geno}}, or \code{\link{argmax.geno}}, and this approach simplifies the hidden Markov model (HMM) code. For the 4- and 8-way RIL, genotyping errors are simulated only if the founder genotypes are 0/1 SNPs. } \value{ An object of class \code{cross}. See \code{\link{read.cross}} for details. If \code{keep.qtlgeno} is TRUE, the cross object will contain a component \code{qtlgeno} which is a matrix containing the QTL genotypes (with complete data and no errors), coded as in the genotype data. If \code{keep.errorind} is TRUE and errors were simulated, each component of \code{geno} will each contain a matrix \code{errors}, with 1's indicating simulated genotyping errors. } \author{Karl W Broman, \email{broman@wisc.edu} } \seealso{ \code{\link{sim.map}}, \code{\link{read.cross}}, \code{\link{fake.f2}}, \code{\link{fake.bc}} \code{\link{fake.4way}}, \code{\link{simFounderSnps}} } \examples{ # simulate a genetic map map <- sim.map() ### simulate 250 intercross individuals with 2 QTLs fake <- sim.cross(map, type="f2", n.ind=250, model = rbind(c(1,45,1,1),c(5,20,0.5,-0.5))) ### simulate 100 backcross individuals with 3 QTL # a 10-cM map model after the mouse data(map10) fakebc <- sim.cross(map10, type="bc", n.ind=100, model=rbind(c(1,45,1), c(5,20,1), c(5,50,1))) ### simulate 8-way RIL by sibling mating # get lengths from the above 10-cM map L <- ceiling(sapply(map10, max)) # simulate a 1 cM map themap <- sim.map(L, n.mar=L+1, eq.spacing=TRUE) # simulate founder genotypes pg <- simFounderSnps(themap, "8") # simulate the 8-way RIL by sib mating (256 lines) ril <- sim.cross(themap, n.ind=256, type="ri8sib", founderGeno=pg) } \references{ Copenhaver, G. P., Housworth, E. A. and Stahl, F. W. (2002) Crossover interference in arabidopsis. \emph{Genetics} \bold{160}, 1631--1639. Foss, E., Lande, R., Stahl, F. W. and Steinberg, C. M. (1993) Chiasma interference as a function of genetic distance. \emph{Genetics} \bold{133}, 681--691. Zhao, H., Speed, T. P. and McPeek, M. S. (1995) Statistical analysis of crossover interference using the chi-square model. \emph{Genetics} \bold{139}, 1045--1056. Broman, K. W. (2005) The genomes of recombinant inbred lines \emph{Genetics} \bold{169}, 1133--1146. Teuscher, F. and Broman, K. W. (2007) Haplotype probabilities for multiple-strain recombinant inbred lines. \emph{Genetics} \bold{175}, 1267--1274. } \keyword{datagen} qtl/man/mqmpermutation.Rd0000644000176200001440000001217113526005043015176 0ustar liggesusers\name{mqmpermutation} \alias{mqmpermutation} \title{Estimate QTL LOD score significance using permutations or simulations } \description{ Two randomization approaches to obtain estimates of QTL significance: \itemize{ \item Random redistribution of traits (method='permutation') \item Random redistribution of simulated trait values (method='simulation') } Calculations can be parallelized using the SNOW package. } \usage{ mqmpermutation(cross, scanfunction=scanone, pheno.col=1, multicore=TRUE, n.perm=10, batchsize=10, file="MQM_output.txt", n.cluster=1, method=c("permutation","simulation"), cofactors=NULL, plot=FALSE, verbose=FALSE, \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{scanfunction}{ Function to use when mappingQTL's (either scanone,cim or mqm)} \item{pheno.col}{ Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers. % \phenocol } \item{multicore}{ Use multicore (if available)} \item{n.perm}{ Number of permutations to perform (DEFAULT=10, should be 1000, or higher, for publications) } \item{batchsize}{ Batch size. The entire set is split in jobs. Each job contains b.size number of traits per job } \item{file}{ Name of the intermediate output file used } \item{n.cluster}{ Number of child processes to split the job into } \item{method}{ What kind permutation should occur: permutation or simulation } \item{cofactors}{cofactors, only used when scanfunction is mqm. List of cofactors to be analysed in the QTL model. To set cofactors use \code{\link{mqmautocofactors}} or \code{mqmsetcofactors}}. % \mqmcofactors \item{plot}{If TRUE, make a plot} \item{verbose}{If TRUE, print tracing information} \item{\dots}{Parameters passed through to the \code{\link{scanone}}, \code{\link{cim}} or \code{\link{mqmscan}} functions} } \details{ Analysis of \code{\link{scanone}}, \code{\link{cim}} or \code{\link{mqmscan}} to scan for QTL in shuffled/randomized data. It is recommended to also install the \code{snow} library. The \code{snow} library allows calculations to run on multiple cores or even scale it up to an entire cluster, thus speeding up calculation. } \value{ Returns a mqmmulti object. this object is a list of scanone objects that can be plotted using \code{plot.scanone(result[[trait]])} } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ # Use the multitrait dataset data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- log(multitrait$pheno)} multitrait <- calc.genoprob(multitrait) result <- mqmpermutation(multitrait,pheno.col=7, n.perm=2, batchsize=2) \dontrun{#Set 50 cofactors cof <- mqmautocofactors(multitrait,50) }\dontshow{cof <- mqmautocofactors(multitrait,5)} multitrait <- fill.geno(multitrait) result <- mqmpermutation(multitrait,scanfunction=mqmscan,cofactors=cof, pheno.col=7, n.perm=2,batchsize=2,verbose=FALSE) #Create a permutation object f2perm <- mqmprocesspermutation(result) #Get Significant LOD thresholds summary(f2perm) } \references{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/significance_references.txt"} \item Bruno M. Tesson, Ritsert C. Jansen (2009) Chapter 3.7. Determining the significance threshold \emph{eQTL Analysis in Mice and Rats} \bold{1}, 20--25 \item Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. % -----^^ inst/doc/Sources/MQM/mqm/significance_references.txt ^^----- % \input{"inst/doc/Sources/MQM/mqm/parallelisation_references.txt"} \item Rossini, A., Tierney, L., and Li, N. (2003), Simple parallel statistical computing. \emph{R. UW Biostatistics working paper series} University of Washington. \bold{193} \item Tierney, L., Rossini, A., Li, N., and Sevcikova, H. (2004), The snow Package: Simple Network of Workstations. Version 0.2-1. % -----^^ inst/doc/Sources/MQM/mqm/parallelisation_references.txt ^^----- } } \keyword{ models } qtl/man/findmarkerindex.Rd0000644000176200001440000000137213355127045015276 0ustar liggesusers\name{find.markerindex} \alias{find.markerindex} \title{Determine the numeric index for a marker} \description{ Determine the numeric index for a marker in a cross object, when all markers on all chromosomes are pasted together. } \usage{find.markerindex(cross, name)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{name}{A vector of marker names.} } \value{ A vector of numeric indices, from 1, 2, \dots, \code{totmar(cross)}, with \code{NA} for markers not found. } \author{Danny Arends; Karl W Broman \email{broman@wisc.edu} } \examples{ data(hyper) mar <- find.marker(hyper, 4, 30) find.markerindex(hyper, mar) } \seealso{ \code{\link{find.markerpos}} } \keyword{utilities} qtl/man/map2table.Rd0000644000176200001440000000221113355127045013764 0ustar liggesusers\name{map2table} \alias{map2table} \title{Convert genetic map from list to table.} \description{ Convert a map object (as a list) to a table (as a data frame). } \usage{map2table(map, chr)} \arguments{ \item{map}{A \code{map} object: a list whose components (corresponding to chromosomes) are either vectors of marker positions or matrices with two rows of sex-specific marker positions.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} } \value{ A data frame with two or three columns: chromosome and sex-averaged position, or chromosome, female position, and male position. The row names are the marker names. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) map <- pull.map(fake.f2) map_as_tab <- map2table(map) } \seealso{ \code{\link{table2map}}, \code{\link{pull.map}}, \code{\link{est.map}} } \keyword{utilities} qtl/man/a.starting.point.Rd0000644000176200001440000002770613526005216015332 0ustar liggesusers\name{A starting point} \docType{package} \alias{qtl-package} \title{Introductory comments on R/qtl} \description{ A brief introduction to the R/qtl package, with a walk-through of an analysis. } \section{New to R and/or R/qtl?}{ \itemize{ \item In order to use the R/qtl package, you must type (within R) \code{library(qtl)}. You may wish to include this in a \code{\link[base:Startup]{.Rprofile}} file. \item Documention and several tutorials are available at the R archive (\url{https://cran.r-project.org}). \item Use the \code{\link[utils]{help.start}} function to start the html version of the R help. \item Type \code{library(help=qtl)} to get a list of the functions in R/qtl. \item Use the \code{\link[utils]{example}} function to run examples of the various functions in R/qtl. \item A tutorial on the use of R/qtl is distributed with the package and is also available at \url{https://rqtl.org/rqtltour.pdf}. \item Download the latest version of R/qtl from the R archive or from \url{https://rqtl.org}. } } \section{Walk-through of an analysis}{ Here we briefly describe the use of R/qtl to analyze an experimental cross. A more extensive tutorial on its use is distributed with the package and is also available at \url{https://rqtl.org/rqtltour.pdf}. A difficult first step in the use of most data analysis software is the import of data. With R/qtl, one may import data in several different formats by use of the function \code{\link{read.cross}}. The internal data structure used by R/qtl is rather complicated, and is described in the help file for \code{\link{read.cross}}. We won't discuss data import any further here, except to say that the comma-delimited format (\code{"csv"}) is recommended. If you have trouble importing data, send an email to Karl Broman, \email{broman@wisc.edu}, perhaps attaching examples of your data files. (Such data will be kept confidential.) Also see the sample data files and code at \url{https://rqtl.org/sampledata}. We consider the example data \code{\link{hyper}}, an experiment on hypertension in the mouse, kindly provided by Bev Paigen and Gary Churchill. Use the \code{\link[utils]{data}} function to load the data. \code{data(hyper)} The \code{\link{hyper}} data set has class \code{"cross"}. The function \code{\link{summary.cross}} gives summary information on the data, and checks the data for internal consistency. A number of other utility functions are available; hopefully these are self-explanatory. \code{summary(hyper)} \cr \code{nind(hyper)} \cr \code{nphe(hyper)} \cr \code{nchr(hyper)} \cr \code{nmar(hyper)} \cr \code{totmar(hyper)} The function \code{\link{plot.cross}} gives a graphical summary of the data; it calls \code{\link{plotMissing}} (to plot a matrix displaying missing genotypes) and \code{\link{plotMap}} (to plot the genetic maps), and also displays histograms or barplots of the phenotypes. The \code{\link{plotMissing}} function can plot individuals ordered by their phenotypes; you can see that for most markers, only individuals with extreme phenotypes were genotyped. \code{plot(hyper)} \cr \code{plotMissing(hyper)} \cr \code{plotMissing(hyper, reorder=TRUE)} \cr \code{plotMap(hyper)} Note that one marker (on chromosome 14) has no genotype data. The function \code{\link{drop.nullmarkers}} removes such markers from the data. \code{hyper <- drop.nullmarkers(hyper)} \cr \code{totmar(hyper)} The function \code{\link{est.rf}} estimates the recombination fraction between each pair of markers, and calculates a LOD score for the test of \eqn{r} = 1/2. This is useful for identifying markers that are placed on the wrong chromosome. Note that since, for these data, many markers were typed only on recombinant individuals, the pairwise recombination fractions show rather odd patterns. \code{hyper <- est.rf(hyper)} \cr \code{plotRF(hyper)} \cr \code{plotRF(hyper, chr=c(1,4))} To re-estimate the genetic map for an experimental cross, use the function \code{\link{est.map}}. The function \code{\link{plotMap}}, in addition to plotting a single map, can plot the comparison of two genetic maps (as long as they are composed of the same numbers of chromosomes and markers per chromosome). The function \code{\link{replace.map}} map be used to replace the genetic map in a cross with a new one. \code{newmap <- est.map(hyper, error.prob=0.01, verbose=TRUE)} \cr \code{plotMap(hyper, newmap)} \cr \code{hyper <- replace.map(hyper, newmap)} The function \code{\link{calc.errorlod}} may be used to assist in identifying possible genotyping errors; it calculates the error LOD scores described by Lincoln and Lander (1992). The \code{\link{calc.errorlod}} function return a modified version of the input cross, with error LOD scores included. The function \code{\link{top.errorlod}} prints the genotypes with values above a cutoff (by default, the cutoff is 4.0). \code{hyper <- calc.errorlod(hyper, error.prob=0.01)} \cr \code{top.errorlod(hyper)} The function \code{\link{plotGeno}} may be used to inspect the observed genotypes for a chromosome, with likely genotyping errors flagged. \code{plotGeno(hyper, chr=16, ind=c(24:34, 71:81))} Before doing QTL analyses, some intermediate calculations need to be performed. The function \code{\link{calc.genoprob}} calculates conditional genotype probabilities given the multipoint marker data. \code{\link{sim.geno}} simulates sequences of genotypes from their joint distribution, given the observed marker data. As with \code{\link{calc.errorlod}}, these functions return a modified version of the input cross, with the intermediate calculations included. The \code{step} argument indicates the density of the grid on which the calculations will be performed, and determines the density at which LOD scores will be calculated. \code{hyper <- calc.genoprob(hyper, step=2.5, error.prob=0.01)} \cr \code{hyper <- sim.geno(hyper, step=2.5, n.draws=64, error.prob=0.01)} The function \code{\link{scanone}} performs a genome scan with a single QTL model. By default, it performs standard interval mapping (Lander and Botstein 1989): use of a normal model and the EM algorithm. If one specifies \code{method="hk"}, Haley-Knott regression is performed (Haley and Knott 1992). These two methods require the results from \code{\link{calc.genoprob}}. \code{out.em <- scanone(hyper)} \cr \code{out.hk <- scanone(hyper, method="hk")} If one specifies \code{method="imp"}, a genome scan is performed by the multiple imputation method of Sen and Churchill (2001). This method requires the results from \code{\link{sim.geno}}. \code{out.imp <- scanone(hyper, method="imp")} The output of \code{\link{scanone}} is a data.frame with class \code{"scanone"}. The function \code{\link{plot.scanone}} may be used to plot the results, and may plot up to three sets of results against each other, as long as they conform appropriately. \code{plot(out.em)} \cr \code{plot(out.hk, col="blue", add=TRUE)} \cr \code{plot(out.imp, col="red", add=TRUE)} \cr \code{plot(out.hk, out.imp, out.em, chr=c(1,4), lty=1,} \cr \code{ col=c("blue","red","black"))} The function \code{\link{summary.scanone}} may be used to list information on the peak LOD for each chromosome for which the LOD exceeds a specified threshold. \code{summary(out.em)} \cr \code{summary(out.em, threshold=3)} \cr \code{summary(out.hk, threshold=3)} \cr \code{summary(out.imp, threshold=3)} The function \code{\link{max.scanone}} returns the maximum LOD score, genome-wide. \code{max(out.em)} \cr \code{max(out.hk)} \cr \code{max(out.imp)} One may also use \code{\link{scanone}} to perform a permutation test to get a genome-wide LOD significance threshold. \code{operm.hk <- scanone(hyper, method="hk", n.perm=1000)} The result has class \code{"scanoneperm"}. The \code{\link{summary.scanoneperm}} function may be used to calculate LOD thresholds. \code{summary(operm.hk, alpha=0.05)} The permutation results may also be used in the \code{\link{summary.scanone}} function to calculate LOD thresholds and genome-scan-adjusted p-values. \code{summary(out.hk, perms=operm.hk, alpha=0.05, pvalues=TRUE)} We should say at this point that the function \code{\link[base:save]{save.image}} will save your workspace to disk. You'll wish you had used this if R crashes. \code{save.image()} The function \code{\link{scantwo}} performs a two-dimensional genome scan with a two-QTL model. Methods \code{"em"}, \code{"hk"} and \code{"imp"} are all available. \code{\link{scantwo}} is considerably slower than \code{\link{scanone}}, and can require a great deal of memory. Thus, you may wish to re-run \code{\link{calc.genoprob}} and/or \code{\link{sim.geno}} with a more coarse grid. \code{hyper <- calc.genoprob(hyper, step=10, err=0.01)} \cr \code{hyper <- sim.geno(hyper, step=10, n.draws=64, err=0.01)} \cr \cr \code{out2.hk <- scantwo(hyper, method="hk")} \cr \code{out2.em <- scantwo(hyper)} \cr \code{out2.imp <- scantwo(hyper, method="imp")} The output is an object with class \code{scantwo}. The function \code{\link{plot.scantwo}} may be used to plot the results. The upper triangle contains LOD scores for tests of epistasis, while the lower triangle contains LOD scores for the full model. \code{plot(out2.hk)} \cr \code{plot(out2.em)} \cr \code{plot(out2.imp)} The function \code{\link{summary.scantwo}} lists the interesting aspects of the output. For each pair of chromosomes \eqn{(k,l)}, it calculates the maximum LOD score for the full model, \eqn{M_f(k,l)}; a LOD score indicating evidence for a second QTL, allowing for epistasis), \eqn{M_{fv1}(k,l)}{M_fv1(k,l)}; a LOD score indicating evidence for epistasis, \eqn{M_i(k,l)}; the LOD score for the additive QTL model, \eqn{M_a(k,l)}; and a LOD score indicating evidence for a second QTL, assuming no epistasis, \eqn{M_{av1}(k,l)}{M_av1(k,l)}. You must provide five LOD thresholds, corresponding to the above five LOD scores, and in that order. A chromosome pair is printed if either (a) \eqn{M_f(k,l) \ge T_f}{M_f(k,l) >= T_f} and (\eqn{M_{fv1}(k,l) \ge T_{fv1}}{M_fv1(k,l) >= T_fv1} or \eqn{M_i(k,l) \ge T_i}{M_i(k,l) >= T_i}), or (b) \eqn{M_a(k,l) \ge T_a}{M_a(k,l) >= T_a} and \eqn{M_{av1}(k,l) \ge T_{av1}}{M_av1(k,l) >= T_av1}. \code{summary(out2.em, thresholds=c(6.2, 5.0, 4.6, 4.5, 2.3))} \cr \code{summary(out2.em, thresholds=c(6.2, 5.0, Inf, 4.5, 2.3))} In the latter case, the interaction LOD score will be ignored. The function \code{\link{max.scantwo}} returns the maximum joint and additive LODs for a two-dimensional genome scan. \code{max(out2.em)} Permutation tests may also performed with \code{\link{scantwo}}; it may take a few days of CPU time. The output is a list containing the maxima of the above five LOD scores for each of the imputations. \code{operm2 <- scantwo(hyper, method="hk", n.perm=100)} \cr \code{summary(operm2, alpha=0.05)} } \section{Citing R/qtl}{ To cite R/qtl in publications, use the Broman et al. (2003) reference listed below. } \references{ Broman, K. W. and Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. (2009) \emph{A guide to QTL mapping with R/qtl.} Springer. \url{https://rqtl.org/book} Broman, K. W., Wu, H., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2003) R/qtl: QTL mapping in experimental crosses. \emph{Bioinformatics} \bold{19}, 889--890. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Lander, E. S. and Botstein, D. (1989) Mapping Mendelian factors underlying quantitative traits using RFLP linkage maps. \emph{Genetics} \bold{121}, 185--199. Lincoln, S. E. and Lander, E. S. (1992) Systematic detection of errors in genetic linkage data. \emph{Genomics} \bold{14}, 604--610. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{models} qtl/man/table2map.Rd0000644000176200001440000000142013355127045013765 0ustar liggesusers\name{table2map} \alias{table2map} \title{Convert a table of marker positions to a map object.} \description{ Convert a data frame with marker positions to a map object. } \usage{table2map(tab)} \arguments{ \item{tab}{A data frame with two columns: chromosome and position. The row names are the marker names.} } \value{ A \code{map} object: a list whose components (corresponding to chromosomes) are vectors of marker positions. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ tab <- data.frame(chr=c(1,1,1,1,2,2,2,2,3,3,3,3), pos=c(0,2,4,8,0,2,4,8,0,2,4,8)) rownames(tab) <- paste0("marker", 1:nrow(tab)) map <- table2map(tab) } \seealso{ \code{\link{map2table}}, \code{\link{pull.map}}, \code{\link{est.map}} } \keyword{utilities} qtl/man/simPhyloQTL.Rd0000644000176200001440000001200713355127045014306 0ustar liggesusers\name{simPhyloQTL} \alias{simPhyloQTL} \title{Simulate a set of intercrosses for a single diallelic QTL} \description{ Simulate a set of intercrosses with a single diallelic QTL. } \usage{ simPhyloQTL(n.taxa=3, partition, crosses, map, n.ind=100, model, error.prob=0, missing.prob=0, partial.missing.prob=0, keep.qtlgeno=FALSE, keep.errorind=TRUE, m=0, p=0, map.function=c("haldane","kosambi","c-f","morgan")) } \arguments{ \item{n.taxa}{Number of taxa (i.e., strains).} \item{partition}{A vector of character strings of the form "AB|CD" or "A|BCD" indicating, for each QTL, which taxa have which allele. If missing, simulate under the null hypothesis of no QTL.} \item{crosses}{A vector of character strings indicating the crosses to do (for the form "AB", "AC", etc.). These will be sorted and then only unique ones used. If missing, all crosses will be simulated.} \item{map}{A list whose components are vectors containing the marker locations on each of the chromosomes.} \item{n.ind}{The number of individuals in each cross. If length 1, all crosses will have the same number of individuals; otherwise the length should be the same as \code{crosses}.} \item{model}{A matrix where each row corresponds to a different QTL, and gives the chromosome number, cM position and effects of the QTL (assumed to be the same in each cross in which the QTL is segregating).} \item{error.prob}{The genotyping error rate.} \item{missing.prob}{The rate of missing genotypes.} \item{partial.missing.prob}{When simulating an intercross or 4-way cross, this gives the rate at which markers will be incompletely informative (i.e., dominant or recessive).} \item{keep.qtlgeno}{If TRUE, genotypes for the simulated QTLs will be included in the output.} \item{keep.errorind}{If TRUE, and if \code{error.prob > 0}, the identity of genotyping errors will be included in the output.} \item{m}{Interference parameter; a non-negative integer. 0 corresponds to no interference.} \item{p}{Probability that a chiasma comes from the no-interference mechanism} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} } \details{ Meiosis is assumed to follow the Stahl model for crossover interference (see the references, below), of which the no interference model and the chi-square model are special cases. Chiasmata on the four-strand bundle are a superposition of chiasmata from two different mechanisms. With probability \code{p}, they arise by a mechanism exhibiting no interference; the remainder come from a chi-square model with inteference parameter \code{m}. Note that \code{m=0} corresponds to no interference, and with \code{p=0}, one gets a pure chi-square model. QTLs are assumed to act additively, and the residual phenotypic variation is assumed to be normally distributed with variance 1. The effect of a QTL is a pair of numbers, (\eqn{a,d}), where \eqn{a} is the additive effect (half the difference between the homozygotes) and \eqn{d} is the dominance deviation (the difference between the heterozygote and the midpoint between the homozygotes). } \value{ A list with each component being an object of class \code{cross}. See \code{\link{read.cross}} for details. The names (e.g. "AB", "AC", "BC") indicate the crosses. If \code{keep.qtlgeno} is TRUE, each cross object will contain a component \code{qtlgeno} which is a matrix containing the QTL genotypes (with complete data and no errors), coded as in the genotype data. If \code{keep.errorind} is TRUE and errors were simulated, each component of \code{geno} in each cross will each contain a matrix \code{errors}, with 1's indicating simulated genotyping errors. } \author{Karl W Broman, \email{broman@wisc.edu} } \seealso{ \code{\link{scanPhyloQTL}}, \code{\link{inferredpartitions}}, \code{\link{summary.scanPhyloQTL}}, \code{\link{max.scanPhyloQTL}}, \code{\link{plot.scanPhyloQTL}}, \code{\link{sim.cross}}, \code{\link{read.cross}} } \examples{ \dontrun{ # example map; drop X chromosome data(map10) map10 <- map10[1:19] # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross x <- lapply(x, calc.genoprob, step=2) # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # maximum peak max(out, format="lod") # approximate posterior probabilities at peak max(out, format="postprob") # all peaks above a threshold for LOD(best) - LOD(2nd best) summary(out, threshold=1, format="lod") # all peaks above a threshold for LOD(best), showing approx post'r prob summary(out, format="postprob", threshold=3) # plot of results plot(out) } } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \keyword{datagen} qtl/man/fake.bc.Rd0000644000176200001440000000345113355127045013415 0ustar liggesusers\name{fake.bc} \alias{fake.bc} \docType{data} \title{Simulated data for a backcross} \description{ Simulated data for a backcross, obtained using \code{\link{sim.cross}}. } \usage{data(fake.bc)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 400 backcross individuals typed at 91 markers and with two phenotypes and two covariates (sex and age). The two phenotypes are due to four QTLs, with no epistasis. There is one on chromosome 2 (at 30 cM), two on chromosome 5 (at 10 and 50 cM), and one on chromosome 10 (at 30 cM). The QTL on chromosome 2 has an effect only in the males (sex=1); the two QTLs on chromosome 5 have effect in coupling for the first phenotype and in repulsion for the second phenotype. Age has an effect of increasing the phenotypes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc,chr=c(2,5,10))} summary(fake.bc) plot(fake.bc) # genome scans without covariates fake.bc <- calc.genoprob(fake.bc, step=2.5) out.nocovar <- scanone(fake.bc, pheno.col=1:2) # genome scans with covariates ac <- pull.pheno(fake.bc, c("sex","age")) ic <- pull.pheno(fake.bc, "sex") out.covar <- scanone(fake.bc, pheno.col=1:2, addcovar=ac, intcovar=ic) # summaries summary(out.nocovar, thr=3, format="allpeaks") summary(out.covar, thr=3, format="allpeaks") # plots plot(out.nocovar, out.covar, chr=c(2,5,10), lod=1, col="blue", lty=1:2, ylim=c(0,13)) plot(out.nocovar, out.covar, chr=c(2,5,10), lod=2, col="red", lty=1:2, add=TRUE) } \seealso{ \code{\link{sim.cross}}, \code{\link{fake.4way}}, \code{\link{fake.f2}}, \code{\link{listeria}}, \code{\link{hyper}}, \code{\link{bristle3}}, \code{\link{bristleX}} } \keyword{datasets} qtl/man/makeqtl.Rd0000644000176200001440000000561613355127045013567 0ustar liggesusers\name{makeqtl} \alias{makeqtl} \title{Make a qtl object} \description{ This function takes a cross object and specified chromosome numbers and positions and pulls out the genotype probabilities or imputed genotypes at the nearest pseudomarkers, for later use by the function \code{\link{fitqtl}}. } \usage{ makeqtl(cross, chr, pos, qtl.name, what=c("draws","prob")) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Vector indicating the chromosome for each QTL. (These should be character strings referring to the chromosomes by name.)} \item{pos}{Vector (of same length as \code{chr}) indicating the positions on the chromosome to be taken. If there is no marker or pseudomarker at a position, the nearest position is used.} \item{qtl.name}{Optional user-specified name for each QTL, used in the drop-one-term ANOVA table in \code{\link{fitqtl}}. If unspecified, the names will be of the form \code{"Chr1@10"} for a QTL on Chromsome 1 at 10 cM.} \item{what}{Indicates whether to pull out the imputed genotypes or the genotype probabilities.} } \details{ This function will take out the genotype probabilities and imputed genotypes if they are present in the input \code{cross} object. If both fields are missing in the input object, the function will report an error. Before running this function, the user must have first run either \code{\link{sim.geno}} (for \code{what="draws"}) or \code{\link{calc.genoprob}} (for \code{what="prob"}). } \value{ An object of class \code{qtl} with the following elements (though only one of \code{geno} and \code{prob} will be included, according to whether \code{what} is given as \code{"draws"} or \code{"prob"}): \item{\code{geno}}{Imputed genotypes.} \item{\code{prob}}{Genotype probabilities.} \item{\code{name}}{User-defined name for each QTL, or a name of the form \code{"Chr1@10"}.} \item{\code{altname}}{QTL names of the form \code{"Q1"}, \code{"Q2"}, etc.} \item{\code{chr}}{Input vector of chromosome numbers.} \item{\code{pos}}{Input vector of chromosome positions.} \item{\code{n.qtl}}{Number of QTLs.} \item{\code{n.ind}}{Number of individuals.} \item{\code{n.gen}}{A vector indicating the number of genotypes for each QTL.} } \author{Hao Wu; Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c("1", "6", "13") qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- sim.geno(fake.f2, n.draws=8, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="draws") summary(qtl) } \seealso{ \code{\link{fitqtl}}, \code{\link{calc.genoprob}}, \code{\link{sim.geno}}, \code{\link{dropfromqtl}}, \code{\link{replaceqtl}}, \code{\link{addtoqtl}}, \code{\link{summary.qtl}}, \code{\link{reorderqtl}} } \keyword{utilities} qtl/man/c.scanoneperm.Rd0000644000176200001440000000276113355127045014662 0ustar liggesusers\name{c.scanoneperm} \alias{c.scanoneperm} \alias{rbind.scanoneperm} \title{Combine data from scanone permutations} \description{ Concatenate the data for multiple runs of \code{\link{scanone}} with \code{n.perm > 0}. } \usage{ \method{c}{scanoneperm}(\dots) \method{rbind}{scanoneperm}(\dots) } \arguments{ \item{\dots}{A set of objects of class \code{scanoneperm}. (This can also be a list of \code{scanoneperm} objects.) These are the permutation results from \code{\link{scanone}} (that is, when \code{n.perm > 0}). These must all have the same number of columns. (That is, they must have been created with the same number of phenotypes, and it is assumed that they were generated in precisely the same way.)} } \value{The concatenated input, as a \code{scanoneperm} object.} \details{ The aim of this function is to concatenate the results from multiple runs of a permutation test \code{\link{scanone}}, to assist with the case that such permutations are done on multiple processors in parallel. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"))} fake.f2 <- calc.genoprob(fake.f2) operm1 <- scanone(fake.f2, method="hk", n.perm=100, perm.Xsp=TRUE) operm2 <- scanone(fake.f2, method="hk", n.perm=50, perm.Xsp=TRUE) operm <- c(operm1, operm2) } \seealso{ \code{\link{summary.scanoneperm}}, \code{\link{scanone}}, \code{\link{cbind.scanoneperm}}, \code{\link{c.scantwoperm}} } \keyword{manip} qtl/man/hyper.Rd0000644000176200001440000000270112770016226013246 0ustar liggesusers\name{hyper} \alias{hyper} \docType{data} \title{Data on hypertension} \description{ Data from an experiment on hypertension in the mouse. } \usage{data(hyper)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 250 male backcross individuals typed at 174 markers (actually one contains only missing values), including 4 on the X chromosome, with one phenotype. The phenotype is the blood pressure. See the reference below. Note that, for most markers, genotypes are available on only the individuals with extreme phenotypes. At many markers, only recombinant individuals were typed. } \references{ Sugiyama, F., Churchill, G. A., Higgens, D. C., Johns, C., Makaritsis, K. P., Gavras, H. and Paigen, B. (2001) Concordance of murine quantitative trait loci for salt-induced hypertension with rat and human loci. \emph{Genomics} \bold{71}, 70--77. } \source{ Bev Paigen and Gary Churchill (The Jackson Laboratory, Bar Harbor, Maine) \url{http://phenome.jax.org/db/q?rtn=projects/projdet&reqprojid=119} } \examples{ data(hyper) summary(hyper) plot(hyper) # Note the selective genotyping \dontrun{plotMissing(hyper, reorder=TRUE)} # A marker on c14 has no data; remove it hyper <- drop.nullmarkers(hyper) } \seealso{ \code{\link{fake.bc}}, \code{\link{fake.f2}}, \code{\link{fake.4way}}, \code{\link{listeria}}, \code{\link{bristle3}}, \code{\link{bristleX}} } \keyword{datasets} qtl/man/markernames.Rd0000644000176200001440000000164213355127045014431 0ustar liggesusers\name{markernames} \alias{markernames} \title{Pull out the marker names from a cross} \description{ Pull out the marker names from a cross object as one big vector. } \usage{markernames(cross, chr)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} } \value{ A vector of character strings (the marker names). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) markernames(listeria, chr=5) } \seealso{ \code{\link{pull.map}}, \code{\link{phenames}}, \code{\link{chrnames}} } \keyword{utilities} qtl/man/write.cross.Rd0000644000176200001440000001023013355127045014377 0ustar liggesusers\name{write.cross} \alias{write.cross} \title{Write data for a QTL experiment to a file} \description{ Data for a QTL experiment is written to a file (or files). } \usage{ write.cross(cross, format=c("csv", "csvr", "csvs", "csvsr", "mm", "qtlcart", "gary", "qtab", "mapqtl", "tidy"), filestem="data", chr, digits=NULL, descr) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{format}{Specifies whether to write the data in comma-delimited, rotated comma-delimited, Mapmaker, QTL Cartographer, Gary Churchill's, QTAB, MapQTL format.} \item{filestem}{A character string giving the first part of the output file names (the bit before the dot). In Windows, use forward slashes (\code{"/"}) or double backslashes (\code{"\\\\"}) to specify directory trees.} \item{chr}{A vector specifying for which chromosomes genotype data should be written. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{digits}{Number of digits to which phenotype values and genetic map positions should be rounded. If NULL (the default), they are not rounded.} \item{descr}{Character string description; used only with \code{format="qtab"}.} } %\value{ % Data is written to a single file (comma-delimited format) or two files % (Mapmaker format). %} \details{ Comma-delimited formats: a single csv file is created in the formats \code{"csv"} or \code{"csvr"}. Two files are created (one for the genotype data and one for the phenotype data) for the formats \code{"csvs"} and \code{"csvsr"}; if \code{filestem="file"}, the two files will be names \code{"file_gen.csv"} and \code{"file_phe.csv"}. See the help file for \code{\link{read.cross}} for details on these formats. Mapmaker format: Data is written to two files. Suppose \code{filestem="file"}. Then \code{"file.raw"} will contain the genotype and phenotype data, and \code{"file.prep"} will contain the necessary code for defining the chromosome assignments, marker order, and inter-marker distances. QTL Cartographer format: Data is written to two files. Suppose \code{filestem="file"}. Then \code{"file.cro"} will contain the genotype and phenotype data, and \code{"file.map"} will contain the genetic map information. Note that cross types are converted to QTL Cartographer cross types as follows: riself to RF1, risib to RF2, bc to B1 and f2 to RF2. Gary's format: Data is written to six files. They are: \cr \code{"geno.data"} - genotype data; \cr \code{"pheno.data"} - phenotype data; \cr \code{"chrid.dat"} - the chromosome identifier for each marker; \cr \code{"mnames.txt"} - the marker names; \cr \code{"markerpos.txt"} - the marker positions; \cr \code{"pnames.txt"} - the phenotype names QTAB format: See \href{https://github.com/qtlHD/qtlHD/blob/master/doc/input/qtab.md}{documentation}. MapQTL format: See \href{http://www.kyazma.nl/docs/MQ6Manual.pdf}{documentation}. Tidy format: Data is written to three files, \code{"stem_gen.csv"}, \code{"stem_phe.csv"}, and \code{"stem_map.csv"} (where \code{stem} is taken from the \code{filestem} argument. } \examples{ \dontrun{data(fake.bc) # comma-delimited format write.cross(fake.bc, "csv", "Data/fakebc", c(1,5,13)) # rotated comma-delimited format write.cross(fake.bc, "csvr", "Data/fakebc", c(1,5,13)) # split comma-delimited format write.cross(fake.bc, "csvs", "Data/fakebc", c(1,5,13)) # split and rotated comma-delimited format write.cross(fake.bc, "csvsr", "Data/fakebc", c(1,5,13)) # Mapmaker format write.cross(fake.bc, "mm", "Data/fakebc", c(1,5,13)) # QTL Cartographer format write.cross(fake.bc, "qtlcart", "Data/fakebc", c(1,5,13)) # Gary's format write.cross(fake.bc, "gary", c(1,5,13))} } \author{Karl W Broman, \email{broman@wisc.edu}; Hao Wu; Brian S. Yandell; Danny Arends; Aaron Wolen} \seealso{ \code{\link{read.cross}} } \keyword{IO} qtl/man/transformPheno.Rd0000644000176200001440000000233013355127045015124 0ustar liggesusers\name{transformPheno} \alias{transformPheno} \title{Transformation of the phenotypes in a cross object} \description{ Transform phenotypes in a cross object; by default use a logarithmic transformation, though any function may be used. } \usage{ transformPheno(cross, pheno.col=1, transf=log, \dots) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{pheno.col}{ A vector of numeric indices or character strings (indicating phenotypes by name) of phenotypes to be transformed. } \item{transf}{The function to use in the transformation.} \item{\dots}{Additional arguments, to be passed to \code{transf}.} } \value{ The input cross object with the transformed phenotypes } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \code{\link{mqmscan}}, \code{\link{scanone}} } \examples{ data(multitrait) # Log transformation of all phenotypes multitrait.log <- transformPheno(multitrait, pheno.col=1:nphe(multitrait)) # Square-root transformation of all phenotypes multitrait.sqrt <- transformPheno(multitrait, pheno.col=1:nphe(multitrait), transf=sqrt) } \keyword{ utilities } qtl/man/drop.dupmarkers.Rd0000644000176200001440000000221113355127045015235 0ustar liggesusers\name{drop.dupmarkers} \alias{drop.dupmarkers} \title{Drop duplicate markers} \description{ Drop markers with duplicate names; retaining the first of each set, with consensus genotyps } \usage{ drop.dupmarkers(cross, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{verbose}{If TRUE, print information on the numbers of genotypes and markers omitted. If > 1, give more detailed information on genotypes omitted.} } \value{ The input \code{cross} object, with any duplicate markers omitted (except for one). The marker retained will have consensus genotypes; if multiple versions of a marker have different genotypes for an individual, they will be replaced by \code{NA}. Any derived data (such as produced by \code{\link{calc.genoprob}}) will be stripped off. } \examples{ data(listeria) listeria <- drop.dupmarkers(listeria) } \seealso{ \code{\link{drop.nullmarkers}}, \code{\link{pull.markers}}, \code{\link{drop.markers}}, \code{\link{summary.cross}}, \code{\link{clean.cross}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/drop.nullmarkers.Rd0000644000176200001440000000176713355127045015436 0ustar liggesusers\name{drop.nullmarkers} \alias{drop.nullmarkers} \title{Drop markers without any genotype data} \description{ Drop markers, from the data matrices and genetic maps, that have no genotype data. } \usage{ drop.nullmarkers(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The input object, with any markers lacking genotype data removed from the genotype data matrices, genetic maps, and, if applicable, any derived data (such as produced by \code{\link{calc.genoprob}}). (It might be a good idea to re-derive such things after using this function.) } \examples{ # removes one marker from hyper data(hyper) hyper <- drop.nullmarkers(hyper) # shouldn't do anything to listeria data(listeria) listeria <- drop.nullmarkers(listeria) } \seealso{ \code{\link{nullmarkers}}, \code{\link{drop.markers}}, \code{\link{clean.cross}}, \code{\link{geno.table}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/addqtl.Rd0000644000176200001440000001142513355127045013375 0ustar liggesusers\name{addqtl} \alias{addqtl} \title{Scan for an additional QTL in a multiple-QTL model} \description{ Scan for an additional QTL in the context of a multiple QTL model. } \usage{ addqtl(cross, chr, pheno.col=1, qtl, covar=NULL, formula, method=c("imp","hk"), model=c("normal", "binary"), incl.markers=TRUE, verbose=FALSE, tol=1e-4, maxit=1000, forceXcovar=FALSE, require.fullrank=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to be scanned. If missing, all chromosomes are scanned. Refer to chromosomes by name. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix to be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{An object of class \code{qtl}, as output from \code{\link{makeqtl}}.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are referred to as \code{Q1}, \code{Q2}, etc. Covariates are referred to by their names in the data frame \code{covar}. If the new QTL is not included in the formula, its main effect is added.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid. If \code{\link{calc.genoprob}} or \code{\link{sim.geno}} were run with \code{stepwidth="variable"} or \code{stepwidth="max"}, we force \code{incl.markers=TRUE}.} \item{verbose}{If TRUE, display information about the progress of calculations. If \code{verbose} is an integer > 1, further messages from \code{\link{scanqtl}} are also displayed.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{forceXcovar}{If TRUE, force inclusion of X-chr-related covariates (like sex and cross direction).} \item{require.fullrank}{If TRUE, give LOD=0 when covariate matrix in the linear regression is not of full rank.} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect must also be included. If one wishes to scan for QTL that interact with another QTL, include it in the formula (with an index of one more than the number of QTL in the input \code{qtl} object). } \section{Value}{ An object of class \code{scanone}, as produced by the \code{\link{scanone}} function. LOD scores are relative to the base model (with any terms that include the new QTL omitted). } \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 8, 13) qp <- c(26, 56, 28) fake.f2 <- subset(fake.f2, chr=c(1,2,3,8,13)) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") # scan for an additional QTL out1 <- addqtl(fake.f2, qtl=qtl, formula=y~Q1+Q2+Q3, method="hk") max(out1) # scan for an additional QTL that interacts with the locus on chr 1 out2 <- addqtl(fake.f2, qtl=qtl, formula=y~Q1*Q4+Q2+Q3, method="hk") max(out2) # plot interaction LOD scores plot(out2-out1) } \seealso{ \code{\link{scanone}}, \code{\link{fitqtl}}, \code{\link{scanqtl}}, \code{\link{refineqtl}}, \code{\link{makeqtl}}, \code{\link{addtoqtl}}, \code{\link{addpair}}, \code{\link{addint}} } \keyword{models} qtl/man/movemarker.Rd0000644000176200001440000000206513355127045014274 0ustar liggesusers\name{movemarker} \alias{movemarker} \title{Move a marker to a new chromosome} \description{ Move a specified marker to a different chromosome. } \usage{movemarker(cross, marker, newchr, newpos)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{marker}{The name of the marker to be moved (a character string).} \item{newchr}{The chromosome to which the marker should be moved.} \item{newpos}{The position (in cM) at which the marker should be placed. If missing, the marker is placed at the end of the chromosome.} } \value{ The input \code{cross} object, but with the specified marker moved to the specified chromosome. All intermediate calculations (such as the results of \code{\link{calc.genoprob}} and \code{\link{est.rf}}) are removed. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(badorder) badorder <- movemarker(badorder, "D2M937", 3, 48.15) badorder <- movemarker(badorder, "D3M160", 2, 28.83) } \seealso{ \code{\link{switch.order}} } \keyword{manip} qtl/man/scanqtl.Rd0000644000176200001440000001323112770016226013564 0ustar liggesusers\name{scanqtl} \alias{scanqtl} \title{General QTL scan} \description{ Performs a multiple QTL scan for specified chromosomes and positions or intervals, with the possible inclusion of QTL-QTL interactions and/or covariates. } \usage{ scanqtl(cross, pheno.col=1, chr, pos, covar=NULL, formula, method=c("imp","hk"), model=c("normal", "binary"), incl.markers=FALSE, verbose=TRUE, tol=1e-4, maxit=1000, forceXcovar=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix to be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{chr}{Vector indicating the chromosome for each QTL. (These should be character strings referring to the chromosomes by name.)} \item{pos}{List indicating the positions or intervals on the chromosome to be scanned. Each element should be either a single number (for a specific position) or a pair of numbers (for an interval).} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are indicated as \code{Q1}, \code{Q2}, etc. Covariates are indicated by their names in \code{covar}.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid. If \code{\link{calc.genoprob}} or \code{\link{sim.geno}} were run with \code{stepwidth="variable"} or \code{stepwidth="max"}, we force \code{incl.markers=TRUE}.} \item{verbose}{If TRUE, give feedback about progress.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{forceXcovar}{If TRUE, force inclusion of X-chr-related covariates (like sex and cross direction).} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect are also be included. Only the interaction terms need to be specifed in the formula. The main effects of all input QTLs (as specified by chr and pos) and covariates (as specifed by covar) will be included by default. For example, if the formula is \code{y~Q1*Q2*Sex}, and there are three elements in input \code{chr} and \code{pos} and Sex is one of the column names for input covariates, the formula used in genome scan will be \code{y ~ Q1 + Q2 + Q3 + Sex + Q1:Q2 + Q1:Sex + Q2:Sex + Q1:Q2:Sex}. The input \code{pos} is a list or vector to specify the position/range of the input chromosomes to be scanned. If it is a vector, it gives the precise positions of the QTL on the chromosomes. If it is a list, it will contain either the precise positions or a range on the chromosomes. For example, consider the case that the input \code{chr = c(1, 6, 13)}. If \code{pos = c(9.8, 34.0, 18.6)}, it means to fit a model with QTL on chromosome 1 at 9.8cM, chromosome 6 at 34cM and chromosome 13 at 18.6cM. If \code{pos = list(c(5,15), c(30,36), 18)}, it means to scan chromosome 1 from 5cM to 15cM, chromosome 6 from 30cM to 36cM, fix the QTL on chromosome 13 at 18cM. } \value{ An object of class \code{scanqtl}. It is a multi-dimensional array of LOD scores, with the number of dimension equal to the number of QTLs specifed.} \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Hao Wu} \examples{ data(fake.f2) # take out several QTLs qc <- c(1, 8, 13) fake.f2 <- subset(fake.f2, chr=qc) # imputate genotypes \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=5, err=0.001) # 2-dimensional genome scan with additive 3-QTL model pos <- list(c(15,35), c(45,65), 28) result <- scanqtl(fake.f2, pheno.col=1, chr=qc, pos=pos, formula=y~Q1+Q2+Q3, method="hk") # image of the results # chr locations chr1 <- as.numeric(matrix(unlist(strsplit(colnames(result),"@")), ncol=2,byrow=TRUE)[,2]) chr8 <- as.numeric(matrix(unlist(strsplit(rownames(result),"@")), ncol=2,byrow=TRUE)[,2]) # image plot image(chr1, chr8, t(result), las=1, col=rev(rainbow(256,start=0,end=2/3))) # do the same, allowing the QTLs on chr 1 and 13 to interact result2 <- scanqtl(fake.f2, pheno.col=1, chr=qc, pos=pos, formula=y~Q1+Q2+Q3+Q1:Q3, method="hk") # image plot image(chr1, chr8, t(result2), las=1, col=rev(rainbow(256,start=0,end=2/3))) } \seealso{ \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{refineqtl}} } \keyword{models} qtl/man/cleanGeno.Rd0000644000176200001440000000370313355127045014017 0ustar liggesusers\name{cleanGeno} \alias{cleanGeno} \title{Delete genotypes that are possibly in error} \description{ Delete genotypes from a cross that are indicated to be possibly in error, as they result in apparent tight double-crossovers. } \usage{ cleanGeno(cross, chr, maxdist=2.5, maxmark=2, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{maxdist}{A vector specifying the maximum distance between two crossovers.} \item{maxmark}{A vector specifying the maximum number of typed markers between two crossovers.} \item{verbose}{If TRUE, print information on the numbers of genotypes omitted from each chromosome.} } \details{ We first use \code{\link{locateXO}} to identify crossover locations. If a pair of adjacted crossovers are separated by no more than \code{maxdist} and contain no more than \code{maxmark} genotyped markers, the intervening genotypes are omitted (that is, changed to \code{NA}). The arguments \code{maxdist} and \code{maxmark} may be vectors. (If both have length greater than 1, they must have the same length.) If they are vectors, genotypes are omitted if they satisify any one of the (\code{maxdist}, \code{maxmark}) pairs. } \value{ The input \code{cross} object with suspect genotypes omitted. } \examples{ data(hyper) sum(ntyped(hyper)) hyperc <- cleanGeno(hyper, chr=4, maxdist=c(2.5, 10), maxmark=c(2, 1)) sum(ntyped(hyperc)) } \seealso{ \code{\link{locateXO}}, \code{\link{countXO}}, \code{\link{calc.errorlod}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/nullmarkers.Rd0000644000176200001440000000117013355127045014457 0ustar liggesusers\name{nullmarkers} \alias{nullmarkers} \title{Identify markers without any genotype data} \description{ Identify markers in a cross that have no genotype data. } \usage{ nullmarkers(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ Marker names (a vector of character strings) with no genotype data. } \examples{ # one marker with no data data(hyper) nullmarkers(hyper) # nothing in listeria data(listeria) nullmarkers(listeria) } \seealso{ \code{\link{drop.nullmarkers}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/jittermap.Rd0000644000176200001440000000170113355127045014117 0ustar liggesusers\name{jittermap} \alias{jittermap} \title{Jitter marker positions in a genetic map} \description{ Jitter the marker positions in a genetic map so that no two markers are on top of each other. } \usage{jittermap(object, amount=1e-6)} \arguments{ \item{object}{Either a cross (an object of class \code{cross}; see \code{\link{read.cross}} for details) or a map (an object of class \code{map}; see \code{\link{pull.map}} for details).} \item{amount}{The amount by which markers should be moved.} } \value{ Either the input cross object or the input map, but with marker positions slightly jittered. If the input was a cross, the function \code{\link[=clean.cross]{clean}} is run to strip off any intermediate calculations. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) hyper <- jittermap(hyper) } \seealso{ \code{\link{pull.map}}, \code{\link{replace.map}}, \code{\link{summary.cross}} } \keyword{manip} qtl/man/scanonevar.varperm.Rd0000644000176200001440000000313612770016226015734 0ustar liggesusers\name{scanonevar.varperm} \alias{scanonevar.varperm} \title{Permutation test for variance effect in scanonevar} \description{Executes permutations of the genotypes in the variance-effect part of scanonevar} \usage{ scanonevar.varperm(cross, pheno.col=1, mean_covar=NULL, var_covar=NULL, maxit=25, tol=1e-6, n.var.perm = 2, seed = 27517, quiet=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This must be a single value (integer index or phenotype name) or a numeric vector of phenotype values, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{mean_covar}{Numeric matrix with covariates affecting the mean.} \item{var_covar}{Numeric matrix with covariates affecting the variances.} \item{maxit}{Maximum number of iterations in the algorithm to fit the model at a given position.} \item{tol}{Tolerance for convergence.} \item{n.var.perm}{Numeric vector of length one indicates the number of permutations to execute.} \item{seed}{Numeric vector of length one indicates the random seed to start the permutations.} \item{quiet}{If \code{FALSE}, print some information about the course of the calculations.} } \value{ A vector of length \code{n.var.perm} of the maximum negative log10 p-value that resulted from each permutation. } qtl/man/cbind.scanoneperm.Rd0000644000176200001440000000315613355127045015516 0ustar liggesusers\name{cbind.scanoneperm} \alias{cbind.scanoneperm} \title{Combine columns from multiple scanone permutation results} \description{ Concatenate the columns from different runs of \code{\link{scanone}} with \code{n.perm > 0}. } \usage{ \method{cbind}{scanoneperm}(\dots, labels) } \arguments{ \item{\dots}{A set of objects of class \code{scanoneperm}. These are the permutation results from \code{\link{scanone}} (that is, when \code{n.perm > 0}), generally run with different phenotypes or methods.} \item{labels}{A vector of character strings, of length 1 or of the same length as the input \code{\dots}, to be appended to the column names in the output.} } \value{The concatenated input, as a \code{scanoneperm} object. If different numbers of permutation replicates were used, those columns with fewer replicates are padded with missing values (\code{NA}).} \details{ The aim of this function is to concatenate the results from multiple runs of a permutation test \code{\link{scanone}}, generally for different phenotypes and/or methods, to be used in parallel with \code{\link{c.scanone}}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) fake.f2 <- calc.genoprob(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"))} operm1 <- scanone(fake.f2, method="hk", n.perm=10, perm.Xsp=TRUE) operm2 <- scanone(fake.f2, method="em", n.perm=5, perm.Xsp=TRUE) operm <- cbind(operm1, operm2, labels=c("hk","em")) summary(operm) } \seealso{ \code{\link{summary.scanoneperm}}, \code{\link{scanone}}, \code{\link{c.scanoneperm}}, \code{\link{c.scanone}} } \keyword{manip} qtl/man/cim.Rd0000644000176200001440000000732213355127045012675 0ustar liggesusers\name{cim} \alias{cim} \title{Composite interval mapping} \description{ Composite interval mapping by a scheme from QTL Cartographer: forward selection at the markers (here, with filled-in genotype data) to a fixed number, followed by interval mapping with the selected markers as covariates, dropping marker covariates if they are within some fixed window size of the location under test. } \usage{ cim(cross, pheno.col=1, n.marcovar=3, window=10, method=c("em", "imp", "hk", "ehk"), imp.method=c("imp", "argmax"), error.prob=0.0001, map.function=c("haldane", "kosambi", "c-v", "morgan"), n.perm) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{n.marcovar}{Number of marker covariates to use.} \item{window}{Window size, in cM.} \item{method}{Indicates whether to use the EM algorithm, imputation, Haley-Knott regression, or the extended Haley-Knott method.} \item{imp.method}{Method used to impute any missing marker genotype data.} \item{error.prob}{Genotyping error probability assumed when imputing the missing marker genotype data.} \item{map.function}{Map function used when imputing the missing marker genotype data.} \item{n.perm}{If specified, a permutation test is performed rather than an analysis of the observed data. This argument defines the number of permutation replicates.} } \details{ We first use \code{\link{fill.geno}} to impute any missing marker genotype data, either via a simple random imputation or using the Viterbi algorithm. We then perform forward selection to a fixed number of markers. These will be used (again, with any missing data filled in) as covariates in the subsequent genome scan. } \value{ The function returns an object of the same form as the function \code{\link{scanone}}: If \code{n.perm} is missing, the function returns the scan results as a data.frame with three columns: chromosome, position, LOD score. Attributes indicate the names and positions of the chosen marker covariates. If \code{n.perm} > 0, the function results the results of a permutation test: a vector giving the genome-wide maximum LOD score in each of the permutations. } \references{ Jansen, R. C. (1993) Interval mapping of multiple quantitative trait loci. \emph{Genetics}, \bold{135}, 205--211. Jansen, R. C. and Stam, P. (1994) High resolution of quantitative traits into multiple loci via interval mapping. \emph{Genetics}, \bold{136}, 1447-1455. Zeng, Z. B. (1993) Theoretical basis for separation of multiple linked gene effects in mapping quantitative trait loci. \emph{Proc. Natl. Acad. Sci. USA}, \bold{90}, 10972--10976. Zeng, Z. B. (1994) Precision mapping of quantitative trait loci. \emph{Genetics}, \bold{136}, 1457--1468. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(hyper) hyper <- calc.genoprob(hyper, step=2.5) \dontshow{hyper <- subset(hyper, chr=c(1,4,6,15))} out <- scanone(hyper) out.cim <- cim(hyper, n.marcovar=3) plot(out, out.cim, chr=c(1,4,6,15), col=c("blue", "red")) add.cim.covar(out.cim, chr=c(1,4,6,15)) } \seealso{ \code{\link{add.cim.covar}}, \code{\link{scanone}}, \code{\link{summary.scanone}}, \code{\link{plot.scanone}}, \code{\link{fill.geno}}} \keyword{models} qtl/man/convert2riself.Rd0000644000176200001440000000176713355127045015103 0ustar liggesusers\name{convert2riself} \alias{convert2riself} \title{Convert a cross to RIL by selfing} \description{ Convert a cross to type \code{"riself"} (RIL by selfing). } \usage{ convert2riself(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The input cross object, with genotype codes possibly changed and cross type changed to \code{"riself"}. } \details{ If there are more genotypes with code 3 (BB) than code 2 (AB), we omit the genotypes with code==2 and call those with code==3 the BB genotypes. If, instead, there are more genotypes with code 2 than code 3, we omit the genotypes with code==3 and call those with code==2 the BB genotypes. Any chromosomes with class \code{"X"} (X chromosome) are changed to class \code{"A"} (autosomal). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) hyper.as.riself <- convert2riself(hyper) } \seealso{ \code{\link{convert2risib}} } \keyword{manip} qtl/man/geno.crosstab.Rd0000644000176200001440000000224613355127045014674 0ustar liggesusers\name{geno.crosstab} \alias{geno.crosstab} \title{Create table of two-locus genotypes} \description{ Create a cross tabulation of the genotypes at a pair of markers. } \usage{ geno.crosstab(cross, mname1, mname2, eliminate.zeros=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{mname1}{The name of the first marker (as a character string). (Alternatively, a vector with the two character strings, in which case \code{mname2} should not be given.)} \item{mname2}{The name of the second marker (as a character string).} \item{eliminate.zeros}{If TRUE, don't show the rows and columns that have no data.} } \value{ A matrix containing the number of individuals having each possible pair of genotypes. Genotypes for the first marker are in the rows; genotypes for the second marker are in the columns. } \examples{ data(hyper) geno.crosstab(hyper, "D1Mit123", "D1Mit156") geno.crosstab(hyper, "DXMit22", "DXMit16") geno.crosstab(hyper, c("DXMit22", "DXMit16")) } \seealso{ \code{\link{geno.table}}, \code{\link{find.marker}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/max.scantwo.Rd0000644000176200001440000000532713355127045014372 0ustar liggesusers\name{max.scantwo} \alias{max.scantwo} \title{Maximum peak in two-dimensional genome scan} \description{ Print the pair of loci with the largest LOD score in the results of \code{\link{scantwo}}. } \usage{ \method{max}{scantwo}(object, lodcolumn=1, what=c("best", "full", "add", "int"), na.rm=TRUE, \dots) } \arguments{ \item{object}{An object of class \code{scantwo}, the output of the function \code{\link{scantwo}}.} \item{lodcolumn}{If the scantwo results contain LOD scores for multiple phenotypes, this argument indicates which to use.} \item{what}{Indicates for which LOD score the maximum should be reported.} \item{na.rm}{Ignored.} \item{\dots}{Ignored.} } \value{ An object of class \code{summary.scantwo}, to be printed by \code{print.summary.scantwo}, with the pair of positions with the maximum LOD score. (Which LOD score is considered is indicated by the \code{what} argument.) } \details{ This is very similar to the \code{\link{summary.scantwo}} function, though this pulls out one pair of positions. If \code{what="best"}, we find the pair of positions at which the LOD score for the full model (2 QTL + interaction) is maximized, and then also print the positions on that same pair of chromosomes at which the additive LOD score is maximized. In the other cases, we pull out the pair of positions with the largest LOD score; which LOD score is considered is indicated by the \code{what} argument. } \section{Output of addpair}{ \bold{Note} that, for output from \code{\link{addpair}} in which the new loci are indicated explicitly in the formula, the summary provided by \code{max.scantwo} is somewhat special. All arguments (except, of course, the input \code{object}) are ignored. If the formula is symmetric in the two new QTL, the output has just two LOD score columns: \code{lod.2v0} comparing the full model to the model with neither of the new QTL, and \code{lod.2v1} comparing the full model to the model with just one new QTL. If the formula is \emph{not} symmetric in the two new QTL, the output has three LOD score columns: \code{lod.2v0} comparing the full model to the model with neither of the new QTL, \code{lod.2v1b} comparing the full model to the model in which the first of the new QTL is omitted, and \code{lod.2v1a} comparing the full model to the model with the second of the new QTL omitted. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- calc.genoprob(fake.f2, step=10) out.2dim <- scantwo(fake.f2, method="hk") max(out.2dim) } \seealso{ \code{\link{scantwo}}, \code{\link{plot.scantwo}}, \code{\link{summary.scantwo}} } \keyword{print} qtl/man/readMWril.Rd0000644000176200001440000000604713355127045014016 0ustar liggesusers\name{readMWril} \alias{readMWril} \title{Read data for 4- or 8-way RIL} \description{ Data for a set of 4- or 8-way recombinant inbred lines (RIL) is read from a pair of comma-delimited files and converted into an object of class \code{cross}. We require chromosome assignments for the genetic markers, and assume that markers are in their correct order. } \usage{ readMWril(dir="", rilfile, founderfile, type=c("ri4self", "ri4sib", "ri8self", "ri8selfIRIP1", "ri8sib", "bgmagic16"), na.strings=c("-","NA"), rotate=FALSE, \dots) } \arguments{ \item{dir}{Directory in which the data files will be found. In Windows, use forward slashes (\code{"/"}) or double backslashes (\code{"\\\\"}) to specify directory trees.} \item{rilfile}{Comma-delimited file for the RIL, in the \code{"csv"} format described in the help file for \code{\link{read.cross}}.} \item{founderfile}{File with founder strains' genotypes, in the same orientation as the \code{rilfile}, but with just marker names and the founders' marker genotypes.} \item{type}{The type of RIL.} \item{na.strings}{A vector of strings which are to be interpreted as missing values. For the \code{csv} formats, these are interpreted globally for the entire file, so missing value codes in phenotypes must not be valid genotypes, and vice versa. For the \code{gary} format, these are used only for the phenotype data.} \item{rotate}{If TRUE, the \code{rilfile} and \code{founderfile} are rotated (really transposed), with rows corresponding to markers and columns corresponding to individuals.} \item{\dots}{Additional arguments, passed to the function \code{\link[utils]{read.table}} in the case of \code{csv} and \code{csvr} formats. In particular, one may use the argument \code{sep} to specify the field separator (the default is a comma) and \code{dec} to specify the character used for the decimal point (the default is a period).} } \value{ An object of class \code{cross}; see the help file for \code{\link{read.cross}} for details. An additional component \code{crosses} is included; this is a matrix indicating the crosses used to generate the RIL. } \details{ The \code{rilfile} should include a phenotype \code{cross} containing character strings of the form \code{ABCDEFGH}, indicating the cross used to generate each RIL. The genotypes should be coded as \bold{integers} (e.g., 1 and 2). The founder strains in the \code{founderfile} should be the strains \code{A}, \code{B}, \code{C}, \dots, as indicated in the \code{cross} phenotype. The default arrangement of the files is to have markers as columns and individuals/founders as rows. If \code{rotate=TRUE}, do the opposite: markers as rows and individuals/founders as columns. } \examples{ \dontrun{ ril <- read.cross("../Data", "ril_data.csv", "founder_geno.csv", "ri4self", rotate=TRUE)} } \author{Karl W Broman, \email{broman@wisc.edu}} \seealso{ \code{\link{read.cross}}, \code{\link{sim.cross}} } \keyword{IO} qtl/man/est.map.Rd0000644000176200001440000001247513355127045013501 0ustar liggesusers\name{est.map} \alias{est.map} \title{Estimate genetic maps} \description{ Uses the Lander-Green algorithm (i.e., the hidden Markov model technology) to re-estimate the genetic map for an experimental cross. } \usage{ est.map(cross, chr, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), m=0, p=0, maxit=10000, tol=1e-6, sex.sp=TRUE, verbose=FALSE, omit.noninformative=TRUE, offset, n.cluster=1) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions. (Ignored if m > 0.)} \item{m}{Interference parameter for the chi-square model for interference; a non-negative integer, with m=0 corresponding to no interference. This may be used only for a backcross or intercross.} \item{p}{Proportion of chiasmata from the NI mechanism, in the Stahl model; p=0 gives a pure chi-square model. This may be used only for a backcross or intercross.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} \item{verbose}{If TRUE, print tracing information.} \item{omit.noninformative}{If TRUE, on each chromosome, omit individuals with fewer than two typed markers, since they are not informative for linkage.} \item{offset}{Defines the starting position for each chromosome. If missing, we use the starting positions that are currently present in the input cross object. This should be a single value (to be used for all chromosomes) or a vector with length equal to the number of chromosomes, defining individual starting positions for each chromosome. For a sex-specific map (as in a 4-way cross), we use the same offset for both the male and female maps.} \item{n.cluster}{If the package \code{snow} is available calculations for multiple chromosomes are run in parallel using this number of nodes.} } \details{ By default, the map is estimated assuming no crossover interference, but a map function is used to derive the genetic distances (though, by default, the Haldane map function is used). For a backcross or intercross, inter-marker distances may be estimated using the Stahl model for crossover interference, of which the chi-square model is a special case. In the chi-square model, points are tossed down onto the four-strand bundle according to a Poisson process, and every \eqn{(m+1)}st point is a chiasma. With the assumption of no chromatid interference, crossover locations on a random meiotic product are obtained by thinning the chiasma process. The parameter \eqn{m} (a non-negative integer) governs the strength of crossover interference, with \eqn{m=0} corresponding to no interference. In the Stahl model, chiasmata on the four-strand bundle are a superposition of chiasmata from two mechanisms, one following a chi-square model and one exhibiting no interference. An additional parameter, \eqn{p}, gives the proportion of chiasmata from the no interference mechanism. } \value{ A \code{map} object; a list whose components (corresponding to chromosomes) are either vectors of marker positions (in cM) or matrices with two rows of sex-specific marker positions. The maximized log likelihood for each chromosome is saved as an attribute named \code{loglik}. In the case that estimation was under an interference model (with m > 0), allowed only for a backcross, m and p are also included as attributes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2,chr=18:19)} newmap <- est.map(fake.f2) logliks <- sapply(newmap, attr, "loglik") plotMap(fake.f2, newmap) fake.f2 <- replace.map(fake.f2, newmap) } \references{ Armstrong, N. J., McPeek, M. J. and Speed, T. P. (2006) Incorporating interference into linkage analysis for experimental crosses. \emph{Biostatistics} \bold{7}, 374--386. Lander, E. S. and Green, P. (1987) Construction of multilocus genetic linkage maps in humans. \emph{Proc. Natl. Acad. Sci. USA} \bold{84}, 2363--2367. Lange, K. (1999) \emph{Numerical analysis for statisticians}. Springer-Verlag. Sec 23.3. Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. \emph{Proceedings of the IEEE} \bold{77}, 257--286. Zhao, H., Speed, T. P. and McPeek, M. S. (1995) Statistical analysis of crossover interference using the chi-square model. \emph{Genetics} \bold{139}, 1045--1056. } \seealso{ \code{\link{map2table}}, \code{\link{plotMap}}, \code{\link{replace.map}}, \code{\link{est.rf}}, \code{\link{fitstahl}} } \keyword{utilities} qtl/man/mqmextractmarkers.Rd0000644000176200001440000000261613526005032015667 0ustar liggesusers\name{mqmextractmarkers} \alias{mqmextractmarkers} \title{MQM marker extraction} \description{ Extract the real markers from a cross object that includes pseudo markers } \usage{ mqmextractmarkers(mqmresult) } \arguments{ \item{mqmresult}{result from \code{mqmscan}, including pseudo markers} } \value{ Returns a scanone object with the pseudo markers removed } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) multitrait <- fill.geno(multitrait) result <- mqmscan(multitrait) newresult <- mqmextractmarkers(result) } \keyword{utilities} qtl/man/mqmautocofactors.Rd0000644000176200001440000000430313526005027015503 0ustar liggesusers\name{mqmautocofactors} \alias{mqmautocofactors} \title{Automatic setting of cofactors, taking marker density into account} \description{ Sets cofactors, taking underlying marker density into account. Together with \code{mqmscan} cofactors are selected through backward elimination. } \usage{ mqmautocofactors(cross, num=50, distance=5, dominance=FALSE, plot=FALSE, verbose=FALSE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{num}{ Number of cofactors to set (warns when setting too many cofactors).} \item{distance}{ Minimal distance between two cofactors, in cM.} \item{dominance}{If TRUE, create a cofactor list that is safe to use with the dominance scan mode of MQM. See \code{\link{mqmscan}} for details.} \item{plot}{If TRUE, plots a genetic map displaying the selected markers as cofactors.} \item{verbose}{If TRUE, give verbose output.} } \value{ A list of cofactors to be used with \code{\link{mqmscan}}. } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(hyper) # hyper dataset \dontshow{hyper <- hyper[1:5]} hyperfilled <- fill.geno(hyper) cofactors <- mqmautocofactors(hyperfilled,15) # Set 15 Cofactors result <- mqmscan(hyperfilled,cofactors) # Backward model selection mqmgetmodel(result) } \keyword{ models } qtl/man/arithscan.Rd0000644000176200001440000000275213355127045014103 0ustar liggesusers\name{arithscan} \alias{+.scanone} \alias{-.scanone} \alias{+.scantwo} \alias{-.scantwo} \title{Arithmetic operators for scanone and scantwo results} \description{ Add or subtract LOD scores in results from \code{\link{scanone}} or \code{\link{scantwo}}. } \usage{ \special{scan1+scan2} \special{scan1-scan2} } \arguments{ \item{scan1, scan2}{Genome scan results on the same set of chromosomes and markers, as output by \code{\link{scanone}} or \code{\link{scantwo}}.} } \details{ This is used to calculate the sum or difference of LOD scores of two genome scan results. It is particularly useful for calculating the LOD scores for QTL-by-covariate interactions (see the example, below). Note that the degrees of freedom are also added or subtracted. } \value{ The same type of data structure as the input objects, with LOD scores added or subtracted. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=1:2)} fake.bc <- calc.genoprob(fake.bc, step=2.5) # covariates ac <- pull.pheno(fake.bc, c("sex","age")) ic <- pull.pheno(fake.bc, "sex") # scan with additive but not the interactive covariate out.acovar <- scanone(fake.bc, addcovar=ac) # scan with interactive covariate out.icovar <- scanone(fake.bc, addcovar=ac, intcovar=ic) # plot the difference of with and without the interactive covariate # This is a LOD score for a test of QTL x covariate interaction plot(out.icovar-out.acovar) } \keyword{arith} qtl/man/pickMarkerSubset.Rd0000644000176200001440000000370313355127045015402 0ustar liggesusers\name{pickMarkerSubset} \alias{pickMarkerSubset} \title{Identify the largest subset of markers that are some distance apart} \description{ Identify the largest subset of markers for which no two adjacent markers are separated by less than some specified distance; if weights are provided, find the marker subset for which the sum of the weights is maximized. } \usage{ pickMarkerSubset(locations, min.distance, weights) } \arguments{ \item{locations}{A vector of marker locations.} \item{min.distance}{Minimum distance between adjacent markers in the chosen subset.} \item{weights}{(Optional) vector of weights for the markers. If missing, we take \code{weights == 1}.} } \value{A vector of marker names.} \details{ Let \eqn{d_i}{d[i]} be the location of marker \eqn{i}, for \eqn{i \in 1, \dots, M}{i in 1, \dots, M}. We use the dynamic programming algorithm of Broman and Weber (1999) to identify the subset of markers \eqn{i_1, \dots, i_k}{i[1], \dots, i[k]} for which \eqn{d_{i_{j+1}} - d_{i_j} \le}{d(i[j+1]) - d(i[j]) <=} \code{min.distance} and \eqn{\sum w_{i_j}}{sum w(i[j])} is maximized. If there are multiple optimal subsets, we pick one at random. } \author{Karl W Broman, \email{broman@wisc.edu} } \references{ Broman, K. W. and Weber, J. L. (1999) Method for constructing confidently ordered linkage maps. \emph{Genet. Epidemiol.}, \bold{16}, 337--343. } \examples{ data(hyper) # subset of markers on chr 4 spaced >= 5 cM pickMarkerSubset(pull.map(hyper)[[4]], 5) # no. missing genotypes at each chr 4 marker n.missing <- nmissing(subset(hyper, chr=4), what="mar") # weight by -log(prop'n missing), but don't let 0 missing go to +Inf wts <- -log( (n.missing+1) / (nind(hyper)+1) ) # subset of markers on chr 4 spaced >= 5 cM, with weights = -log(prop'n missing) pickMarkerSubset(pull.map(hyper)[[4]], 5, wts) } \seealso{ \code{\link{drop.markers}}, \code{\link{pull.markers}}, \code{\link{findDupMarkers}} } \keyword{manip} qtl/man/clean.cross.Rd0000644000176200001440000000151713355127045014337 0ustar liggesusers\name{clean.cross} \alias{clean.cross} \title{Remove derived data} \description{ Remove any intermediate calculations from a cross object. } \usage{ \method{clean}{cross}(object, \dots) } \arguments{ \item{object}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{\dots}{Ignored at this point.} } \value{ The input object, with any intermediate calculations (such as is produced by \code{\link{calc.genoprob}}, \code{\link{argmax.geno}} and \code{\link{sim.geno}}) removed. } \examples{ data(fake.f2) names(fake.f2$geno) fake.f2 <- calc.genoprob(fake.f2) names(fake.f2$geno) fake.f2 <- clean(fake.f2) names(fake.f2$geno) } \seealso{ \code{\link{drop.nullmarkers}}, \code{\link{drop.markers}}, \code{\link{clean.scantwo}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{manip} qtl/man/plot.qtl.Rd0000644000176200001440000000367213355127045013706 0ustar liggesusers\name{plot.qtl} \alias{plot.qtl} \title{Plot QTL locations} \description{ Plot the locations of the QTL against a genetic map } \usage{ \method{plot}{qtl}(x, chr, horizontal=FALSE, shift=TRUE, show.marker.names=FALSE, alternate.chrid=FALSE, justdots=FALSE, col="red", \dots) } \arguments{ \item{x}{An object of class \code{"qtl"}, as produced by \code{\link{makeqtl}}.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{horizontal}{Specifies whether the chromosomes should be plotted horizontally.} \item{shift}{If TRUE, shift the first marker on each chromosome to be at 0 cM.} \item{show.marker.names}{If TRUE, marker names are included.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{justdots}{If FALSE, just plot dots at the QTL, rather than arrows and QTL names.} \item{col}{Color used to plot indications of QTL} \item{\dots}{Passed to \code{\link{plotMap}}.} } \value{None.} \details{ Creates a plot, via \code{\link{plotMap}}, and indicates the locations of the QTL in the input QTL object, \code{x}. } \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c("1", "6", "13") qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") plot(qtl) plot(qtl, justdots=TRUE, col="seagreen") } \seealso{ \code{\link{plotMap}}, \code{\link{makeqtl}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/summary.scanoneperm.Rd0000644000176200001440000000745313355127045016140 0ustar liggesusers\name{summary.scanoneperm} \alias{summary.scanoneperm} \title{LOD thresholds from scanone permutation results} \description{ Print the estimated genome-wide LOD thresholds on the basis of permutation results from \code{\link{scanone}} (with \code{n.perm} > 0). } \usage{ \method{summary}{scanoneperm}(object, alpha=c(0.05, 0.10), controlAcrossCol=FALSE, \dots) } \arguments{ \item{object}{Output from the function \code{\link{scanone}} with \code{n.perm} > 0.} \item{alpha}{Genome-wide significance levels.} \item{controlAcrossCol}{If TRUE, control error rate not just across the genome but also across the columns of LOD scores.} \item{\dots}{Ignored at this point.} } \details{ If there were autosomal data only or \code{\link{scanone}} was run with \code{perm.Xsp=FALSE}, genome-wide LOD thresholds are given; these are the 1-\eqn{\alpha}{alpha} quantiles of the genome-wide maximum LOD scores from the permutations. If there were autosomal and X chromosome data and \code{\link{scanone}} was run with \code{perm.Xsp=TRUE}, autosome- and X-chromsome-specific LOD thresholds are given, by the method described in Broman et al. (2006). Let \eqn{L_A} and \eqn{L_X} be total the genetic lengths of the autosomes and X chromosome, respectively, and let \eqn{L_T = L_A + L_X} Then in place of \eqn{\alpha}{alpha}, we use \deqn{\alpha_A = 1 - (1-\alpha)^{L_A/L_T}}{alpha_A = 1 - (1 - alpha)^(L_A/L_T)} as the significance level for the autosomes and \deqn{\alpha_X = 1 - (1-\alpha)^{L_X/L_T}}{alpha_x = 1 - (1 - alpha)^(LX/LT)} as the significance level for the X chromosome. The result is a list with two matrices, one for the autosomes and one for the X chromosome. If \code{controlAcrossCol=TRUE}, we use a trick to control the error rate not just across the genome but also across the LOD score columns. Namely, we convert each column of permutation results to ranks, and then for each permutation replicate we find the maximum rank across the columns. We then find the appropriate quantile of the maximized ranks, and then backtrack to the corresponding LOD score within each of the columns. See Burrage et al. (2010), right column on page 118. } \value{ An object of class \code{summary.scanoneperm}, to be printed by \code{print.summary.scanoneperm}. If there were X chromosome data and \code{scanone} was run with \code{perm.Xsp=TRUE}, there are two matrices in the results, for the autosome and X-chromosome LOD thresholds. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(18:19,"X"))} fake.f2 <- calc.genoprob(fake.f2, step=2.5) operm1 <- scanone(fake.f2, n.perm=100, method="hk") summary(operm1) operm2 <- scanone(fake.f2, n.perm=100, method="hk", perm.Xsp=TRUE) summary(operm2) # Add noise column fake.f2$pheno$noise <- rnorm(nind(fake.f2)) operm3 <- scanone(fake.f2, pheno.col=c("phenotype", "noise"), n.perm=10, method="hk") summary(operm3) summary(operm3, controlAcrossCol=TRUE, alpha=c(0.05, 0.36)) } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanone}}, \code{\link{plot.scanoneperm}} } \references{ Broman KW, Sen \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}, Owens SE, Manichaikul A, Southard-Smith EM, Churchill GA (2006) The X chromosome in quantitative trait locus mapping. \emph{Genetics}, \bold{174}, 2151--2158. Burrage LC, Baskin-Hill AE, Sinasac DS, Singer JB, Croniger CM, Kirby A, Kulbokas EJ, Daly MJ, Lander ES, Broman KW, Nadeau JH (2010) Genetic resistance to diet-induced obesity in chromosome substitution strains of mice. \emph{Mamm Genome}, \bold{21}, 115--129. Churchill GA, Doerge RW (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. } \keyword{print} qtl/man/addloctocross.Rd0000644000176200001440000000426713526005150014765 0ustar liggesusers\name{addloctocross} \alias{addloctocross} \title{Add phenotype location into a cross object} \description{ Add phenotype location(s) into a cross object (with eQTL/pQTL studies) } \usage{ addloctocross(cross, locations=NULL, locfile="locations.txt", verbose=FALSE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{locations}{R variable holding location information} \item{locfile}{ load from a file, see the details section for the layout of the file.} \item{verbose}{If TRUE, give verbose output} } \details{ inputfile layout: Num Name Chr cM 1 X3.Hydroxypropyl 4 50.0 Num is the number of the phenotype in the cross object Name is the name of the phenotype (will be checked against the name already in the cross object at position num Chr Chromosome cM postion from start of chromosome in cM } \value{ The input cross object, with the locations added as an aditional component \code{locations} } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ \item \code{\link{mqmplot.cistrans}} - Cis/trans plot % \input{"inst/docs/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ % See the help file for mqmplot.cistrans \dontrun{ data(multitrait) data(locations) multiloc <- addloctocross(multitrait,locations) results <- scanall(multiloc) mqmplot.cistrans(results, multiloc, 5, FALSE, TRUE) } } \keyword{ utilities } qtl/man/simulateMissingData.Rd0000644000176200001440000000321413526005236016065 0ustar liggesusers\name{simulatemissingdata} \alias{simulatemissingdata} \title{Simulates missing genotype data} \description{ Simulate missing genotype data by removing some genotype data from the cross object } \usage{ simulatemissingdata(cross, percentage = 5) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{percentage}{ How much of the genotype data do we need to randomly drop? } } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \value{ An object of class \code{cross} with \code{percentage} % of (randomly) missing genotype data. See \code{\link{read.cross}} for details } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) multitrait <- fill.geno(multitrait) multimissing5 <- simulatemissingdata(multitrait,perc=5) perc <- (sum(nmissing(multimissing5))/sum(ntyped(multimissing5))) } \keyword{utilities} qtl/man/mqmgetmodel.Rd0000644000176200001440000000452413526005040014427 0ustar liggesusers\name{mqmgetmodel} \alias{mqmgetmodel} \alias{mqmgetmodel} \title{ Retrieve the QTL model used in mapping from the results of an MQM scan } \description{ Retrieves the QTL model used for scanning from the output of an MQM scan. The model only contains the selected cofactors significant at the specified cofactor.significance from the results of an mqm scan } \usage{ mqmgetmodel(scanresult) } \arguments{ \item{scanresult}{ An object returned by \code{mqmscan}, including cofactors and QTL model. % \mqmscanobject } } \value{ The function returns the multiple QTL model created, which consists of the cofactors selected during the modeling phase of the algorithm. This model was used when scanning for additional QTL in the mqmscan function. The format of the model is compatible with the \code{\link{makeqtl}} function. For more information about the format of the model see the \code{\link{makeqtl}} page. When no cofactor was selected in the modeling phase no model was created, then this function will return a NULL value. } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \seealso{ \itemize{ \item \code{\link{mqmsetcofactors}} - Setting multiple cofactors for backward elimination \item \code{\link{makeqtl}} - Make a qtl object % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=1:4)} hyperfilled <- fill.geno(hyper) cofactors <- mqmsetcofactors(hyperfilled,4) result <- mqmscan(hyperfilled,cofactors) mqmgetmodel(result) plot(mqmgetmodel(result)) } \keyword{ utilities } qtl/man/simFounderSnps.Rd0000644000176200001440000000221213355127045015075 0ustar liggesusers\name{simFounderSnps} \alias{simFounderSnps} \title{Simulate founder SNPs for a multiple-strain RIL} \description{ Simulate genotype data for the founding strains for a panel of multiple-strain RIL. } \usage{ simFounderSnps(map, n.str=c("4","8"), pat.freq) } \arguments{ \item{map}{A list whose components are vectors containing the marker locations on each of the chromosomes.} \item{n.str}{Number of founding strains (4 or 8).} \item{pat.freq}{Frequency of SNP genotype patterns in the founder (a vector of length \code{n.str}/2 + 1): (monoallelic, SNP unique to one founder, SNP present in 2 founders, [and, for the case of 8 founders, SNP in 3/8 founders, SNP in 4/8 founders].)} } \details{ The SNPs are simulated to be in linkage equilibrium. } \value{ A vector of the same length as there are chromosomes in \code{map}, with each component being a matrix of 0's and 1's, of dim \code{n.str} x \code{n.mar}. } \author{Karl W Broman, \email{broman@wisc.edu} } \seealso{ \code{\link{sim.map}}, \code{\link{sim.cross}} } \examples{ data(map10) x <- simFounderSnps(map10, "8", c(0, 0.5, 0.2, 0.2, 0.1)) } \keyword{datagen} qtl/man/calc.penalties.Rd0000644000176200001440000000647713355127045015024 0ustar liggesusers\name{calc.penalties} \alias{calc.penalties} \title{Calculate LOD penalties} \description{ Derive penalties for the penalized LOD scores (used by \code{\link{stepwiseqtl}}) on the basis of permutation results from a two-dimensional, two-QTL scan (obtained by \code{\link{scantwo}}). } \usage{calc.penalties(perms, alpha=0.05, lodcolumn)} \arguments{ \item{perms}{Permutation results from \code{\link{scantwo}}.} \item{alpha}{Significance level.} \item{lodcolumn}{If the scantwo permutation results contain LOD scores for multiple phenotypes, this argument indicates which to use in the summary. This may be a vector. If missing, penalties for all phenotypes are calculated.} } \details{ Thresholds derived from \code{\link{scantwo}} permutations (that is, for a two-dimensional, two-QTL genome scan) are used to calculate penalties on main effects and interactions. The main effect penalty is the 1-\code{alpha} quantile of the null distribution of the genome-wide maximum LOD score from a single-QTL genome scan (as with \code{\link{scanone}}). The "heavy" interaction penalty is the 1-\code{alpha} quantile of the null distribution of the maximum interaction LOD score (that is, the \eqn{\log_{10}}{log10} likelihood ratio comparing the best model with two interacting QTL to the best model with two additive QTL) from a two-dimensional, two-QTL genome scan (as with \code{\link{scantwo}}). The "light" interaction penality is the difference between the \code{"fv1"} threshold from the \code{\link{scantwo}} permutations (that is, the 1-\code{alpha} quantile of the LOD score comparing the best model with two interacting QTL to the best single-QTL model) and the main effect penalty. If the permutations results were obtained with \code{perm.Xsp=TRUE}, to give X-chr-specific results, six penalties are calculated: main effect for autosomes, main effect for X chr, heavy penalty on A:A interactions, light penalty on A:A interactions, penalty on A:X interactions, and penalty on X:X interactions. } \value{ Vector of three values indicating the penalty on main effects and heavy and light penalties on interactions, or a matrix of such results, with each row corresponding to a different phenotype. If the input permutations are X-chromosome-specific, the result has six values: main effect for autosomes, main effect for X chr, heavy penalty on A:A interactions, light penalty on A:A interactions, penalty on A:X interactions, and penalty on X:X interactions. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- calc.genoprob(fake.f2, step=5) out.2dim <- scantwo(fake.f2, method="hk") # permutations \dontshow{permo.2dim <- scantwo(fake.f2, method="hk", n.perm=2)} \dontrun{permo.2dim <- scantwo(fake.f2, method="hk", n.perm=1000)} summary(permo.2dim, alpha=0.05) # penalties calc.penalties(permo.2dim) } \references{ Manichaikul, A., Moon, J. Y., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}, Yandell, B. S. and Broman, K. W. (2009) A model selection approach for the identification of quantitative trait loci in experimental crosses, allowing epistasis. \emph{Genetics}, \bold{181}, 1077--1086. } \seealso{ \code{\link{scantwo}}, \code{\link{stepwiseqtl}} } \keyword{utilities} qtl/man/summary.ripple.Rd0000644000176200001440000000302413355127045015107 0ustar liggesusers\name{summary.ripple} \alias{summary.ripple} \title{Print summary of ripple results} \description{ Print marker orders, from the output of the function \code{ripple}, for which the log10 likelihood relative to the initial order is above a specified cutoff. } \usage{ \method{summary}{ripple}(object, lod.cutoff = -1, \dots) } \arguments{ \item{object}{An object of class \code{ripple}, the output of the function \code{\link{ripple}}.} \item{lod.cutoff}{Only marker orders with LOD score (relative to the initial order) above this cutoff will be displayed. For output of \code{\link{ripple}} in the case of minimization of the number of obligate crossovers, we double this argument and treat it as a cutoff for the number of obligate crossovers.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.ripple}, whose rows correspond to marker orders with likelihood (or number of obligate crossovers) within some cutoff of the initial order. If no marker order, other than the initial one, has likelihood within the specified range, the initial and next-best orders are returned. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ % I don't run the following, since they are run in ripple.Rd \dontrun{data(badorder) rip1 <- ripple(badorder, 1, 7) summary(rip1) rip2 <- ripple(badorder, 1, 2, method="likelihood") summary(rip2) badorder <- switch.order(badorder, 1, rip2[2,]) }} \seealso{ \code{\link{ripple}}, \code{\link{est.map}}, \code{\link{est.rf}} } \keyword{print} qtl/man/nmissing.Rd0000644000176200001440000000163113355127045013751 0ustar liggesusers\name{nmissing} \alias{nmissing} \title{Number of missing genotypes} \description{ Count the number of missing genotypes for each individual or each marker in a cross. } \usage{nmissing(cross, what=c("ind","mar"))} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{what}{Indicates whether to count missing genotypes for each individual or each marker.} } \value{ A vector containing the number of missing genotypes for each individual or for each marker. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) # plot number of missing genotypes for each individual plot(nmissing(listeria)) # plot number of missing genotypes for each marker plot(nmissing(listeria, what="mar")) } \seealso{ \code{\link{ntyped}}, \code{\link{summary.cross}}, \code{\link{nind}}, \code{\link{totmar}} } \keyword{utilities} qtl/man/scanPhyloQTL.Rd0000644000176200001440000001143013355127045014441 0ustar liggesusers\name{scanPhyloQTL} \alias{scanPhyloQTL} \title{Single-QTL genome scan to map QTL to a phylogenetic tree} \description{ Jointly consider multiple intercrosses with a single diallelic QTL model, considering all possible partitions of the strains into the two QTL allele groups. } \usage{ scanPhyloQTL(crosses, partitions, chr, pheno.col=1, model=c("normal", "binary"), method=c("em", "imp", "hk"), addcovar, maxit=4000, tol=0.0001, useAllCrosses=TRUE, verbose=FALSE) } \arguments{ \item{crosses}{A list with each component being an intercross, as an object of class \code{cross} (see \code{\link{read.cross}} for details). The names (of the form "AB") indicate the strains in the cross.} \item{partitions}{A vector of character strings of the form "AB|CD" or "A|BCD" indicating the set of paritions of the strains into two allele groups. If missing, all partitions should be considered.} \item{chr}{Optional vector indicating the chromosomes for which LOD scores should be calculated. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers; for methods \code{"hk"} and \code{"imp"} this can be considerably faster than doing them one at a time. One may also give a character strings matching the phenotype names. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{model}{The phenotype model: the usual normal model or a model for binary traits} \item{method}{Indicates whether to use the EM algorithm, imputation, or Haley-Knott regression.} \item{addcovar}{Optional set of additive covariates to include in the analysis, as a list with the same length as \code{crosses}. They must be numeric vectors or matrices, as for \code{\link{scanone}}.} \item{maxit}{Maximum number of iterations for method \code{"em"}.} \item{tol}{Tolerance value for determining convergence for method \code{"em"}.} \item{useAllCrosses}{If TRUE, use all crosses in the analysis of all partitions, with crosses not segregating the QTL included in the estimation of the residual variance.} \item{verbose}{If TRUE, print information about progress.} } \details{ The aim is to jointly consider multiple intercrosses to not just map QTL but to also, under the assumption of a single diallelic QTL, identify the set of strains with each QTL allele. For each partition (of the strains into two groups) that is under consideration, we pull out the set of crosses that are segregating the QTL, re-code the alleles, and combine the crosses into one large cross. Crosses not segregating the QTL are also used, though with no QTL effects. Additive covariate indicators for the crosses are included in the analysis, to allow for the possibility that there are overall shifts in the phenotypes between crosses. } \value{ A data frame, as for the output of \code{\link{scanone}}, though with LOD score columns for each partition that is considered. The result is given class \code{"scanPhyloQTL"}. } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontshow{set.seed(66787403)} # example map; drop X chromosome data(map10) map10 <- map10[1:19] \dontshow{map10 <- map10[1:4]} # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross \dontrun{x <- lapply(x, calc.genoprob, step=2) }\dontshow{x <- lapply(x, calc.genoprob, step=0)} # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # maximum peak max(out, format="lod") # approximate posterior probabilities at peak max(out, format="postprob") # all peaks above a threshold for LOD(best) - LOD(2nd best) summary(out, threshold=1, format="lod") # all peaks above a threshold for LOD(best), showing approx post'r prob summary(out, format="postprob", threshold=3) # plot results plot(out) } \seealso{ \code{\link{plot.scanPhyloQTL}}, \code{\link{summary.scanPhyloQTL}}, \code{\link{max.scanPhyloQTL}}, \code{\link{inferredpartitions}}, \code{\link{simPhyloQTL}} } \keyword{models} qtl/man/read.cross.Rd0000644000176200001440000004670713526005206014174 0ustar liggesusers\name{read.cross} \alias{read.cross} \title{Read data for a QTL experiment} \description{ Data for a QTL experiment is read from a set of files and converted into an object of class \code{cross}. The comma-delimited format (\code{csv}) is recommended. All formats require chromosome assignments for the genetic markers, and assume that markers are in their correct order. } \usage{ read.cross(format=c("csv", "csvr", "csvs", "csvsr", "mm", "qtx", "qtlcart", "gary", "karl", "mapqtl", "tidy"), dir="", file, genfile, mapfile, phefile, chridfile, mnamesfile, pnamesfile, na.strings=c("-","NA"), genotypes=c("A","H","B","D","C"), alleles=c("A","B"), estimate.map=FALSE, convertXdata=TRUE, error.prob=0.0001, map.function=c("haldane", "kosambi", "c-f", "morgan"), BC.gen=0, F.gen=0, crosstype, \dots) } \arguments{ \item{format}{Specifies the format of the data.} \item{dir}{Directory in which the data files will be found. In Windows, use forward slashes (\code{"/"}) or double backslashes (\code{"\\\\"}) to specify directory trees.} \item{file}{The main input file for formats \code{csv}, \code{csvr} and \code{mm}.} \item{genfile}{File with genotype data (formats \code{csvs}, \code{csvsr}, \code{karl}, \code{gary} and \code{mapqtl} only).} \item{mapfile}{File with marker position information (all except the \code{csv} formats).} \item{phefile}{File with phenotype data (formats \code{csvs}, \code{csvsr}, \code{karl}, \code{gary} and \code{mapqtl} only).} \item{chridfile}{File with chromosome ID for each marker (\code{gary} format only).} \item{mnamesfile}{File with marker names (\code{gary} format only).} \item{pnamesfile}{File with phenotype names (\code{gary} format only).} \item{na.strings}{A vector of strings which are to be interpreted as missing values (\code{csv} and \code{gary} formats only). For the \code{csv} formats, these are interpreted globally for the entire file, so missing value codes in phenotypes must not be valid genotypes, and vice versa. For the \code{gary} format, these are used only for the phenotype data.} \item{genotypes}{A vector of character strings specifying the genotype codes (\code{csv} formats only). Generally this is a vector of length 5, with the elements corresponding to AA, AB, BB, not BB (i.e., AA or AB), and not AA (i.e., AB or BB). \bold{Note}: Pay careful attention to the third and fourth of these; the order of these can be confusing. If you are trying to read 4-way cross data, your file must have genotypes coded as described below, and you need to set \code{genotypes=NULL} so that no re-coding gets done.} \item{alleles}{A vector of two one-letter character strings (or four, for the four-way cross), to be used as labels for the two alleles.} \item{estimate.map}{For all formats but \code{qtlcart}, \code{mapqtl}, and \code{karl}: if TRUE and marker positions are not included in the input files, the genetic map is estimated using the function \code{\link{est.map}}.} \item{convertXdata}{If TRUE, any X chromosome genotype data is converted to the internal standard, using columns \code{sex} and \code{pgm} in the phenotype data if they available or by inference if they are not. If FALSE, the X chromsome data is read as is.} \item{error.prob}{In the case that the marker map must be estimated: Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{In the case that the marker map must be estimated: Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions. (Ignored if m > 0.)} \item{BC.gen}{Used only for cross type \code{"bcsft"}.} \item{F.gen}{Used only for cross type \code{"bcsft"}.} \item{crosstype}{Optional character string to force a particular cross type.} \item{\dots}{Additional arguments, passed to the function \code{\link[utils]{read.table}} in the case of \code{csv} and \code{csvr} formats. In particular, one may use the argument \code{sep} to specify the field separator (the default is a comma), \code{dec} to specify the character used for the decimal point (the default is a period), and \code{comment.char} to specify a character to indicate comment lines.} } \value{ An object of class \code{cross}, which is a list with two components: \item{geno}{This is a list with elements corresponding to chromosomes. \code{names(geno)} contains the names of the chromsomes. Each chromosome is itself a list, and is given class \code{A} or \code{X} according to whether it is autosomal or the X chromosome. There are two components for each chromosome: \code{data}, a matrix whose rows are individuals and whose columns are markers, and \code{map}, either a vector of marker positions (in cM) or a matrix of dim (\code{2 x n.mar}) where the rows correspond to marker positions in female and male genetic distance, respectively. The genotype data gets converted into numeric codes, as follows. The genotype data for a backcross is coded as NA = missing, 1 = AA, 2 = AB. For an F2 intercross, the coding is NA = missing, 1 = AA, 2 = AB, 3 = BB, 4 = not BB (i.e. AA or AB; D in Mapmaker/qtl), 5 = not AA (i.e. AB or BB; C in Mapmaker/qtl). For a 4-way cross, the mother and father are assumed to have genotypes AB and CD, respectively. The genotype data for the progeny is assumed to be phase-known, with the following coding scheme: NA = missing, 1 = AC, 2 = BC, 3 = AD, 4 = BD, 5 = A = AC or AD, 6 = B = BC or BD, 7 = C = AC or BC, 8 = D = AD or BD, 9 = AC or BD, 10 = AD or BC, 11 = not AC, 12 = not BC, 13 = not AD, 14 = not BD. } \item{pheno}{data.frame of size (\code{n.ind x n.phe}) containing the phenotypes. If a phenotype with the name \code{id} or \code{ID} is included, these identifiers will be used in \code{\link{top.errorlod}}, \code{\link{plotErrorlod}}, and \code{\link{plotGeno}} as identifiers for the individual.} While the data format is complicated, there are a number of functions, such as \code{\link{subset.cross}}, to assist in pulling out portions of the data. } \details{ The available formats are comma-delimited (\code{csv}), rotated comma-delimited (\code{csvr}), comma-delimited with separate files for genotype and phenotype data (\code{csvs}), rotated comma-delimited with separate files for genotype and phenotype data (\code{csvsr}), Mapmaker (\code{mm}), Map Manager QTX (\code{qtx}), Gary Churchill's format (\code{gary}), Karl Broman's format (\code{karl}) and MapQTL/JoinMap (\code{mapqtl}). The required files and their specification for each format appears below. The comma-delimited formats are recommended. Note that most of these formats work only for backcross and intercross data. The \code{sampledata} directory in the package distribution contains sample data files in multiple formats. Also see \url{https://rqtl.org/sampledata}. The \code{\dots} argument enables additional arguments to be passed to the function \code{\link[utils]{read.table}} in the case of \code{csv} and \code{csvr} formats. In particular, one may use the argument \code{sep} to specify the field separator (the default is a comma), \code{dec} to specify the character used for the decimal point (the default is a period), and \code{comment.char} to specify a character to indicate comment lines. } \section{X chromosome}{ \bold{The genotypes for the X chromosome require special care!} The X chromosome should be given chromosome identifier \code{X} or \code{x}. If it is labeled by a number or by \code{Xchr}, it will be interpreted as an autosome. The phenotype data should contain a column named \code{"sex"} which indicates the sex of each individual, either coded as \code{0}=female and \code{1}=male, or as a factor with levels \code{female}/\code{male} or \code{f}/\code{m}. Case will be ignored both in the name and in the factor levels. If no such phenotype column is included, it will be assumed that all individuals are of the same sex. In the case of an intercross, the phenotype data may also contain a column named \code{"pgm"} (for "paternal grandmother") indicating the direction of the cross. It should be coded as 0/1 with 0 indicating the cross (AxB)x(AxB) or (BxA)x(AxB) and 1 indicating the cross (AxB)x(BxA) or (BxA)x(BxA). If no such phenotype column is included, it will be assumed that all individuals come from the same direction of cross. The internal storage of X chromosome data is quite different from that of autosomal data. Males are coded 1=AA and 2=BB; females with pgm==0 are coded 1=AA and 2=AB; and females with pgm==1 are coded 1=BB and 2=AB. If the argument \code{convertXdata} is TRUE, conversion to this format is made automatically; if FALSE, no conversion is done, \code{\link{summary.cross}} will likely return a warning, and most analyses will not work properly. Use of \code{convertXdata=FALSE} (in which case the X chromosome genotypes will not be converted to our internal standard) can be useful for diagnosing problems in the data, but will require some serious mucking about in the internal data structure. } \section{CSV format}{ The input file is a comma-delimited text file. A different field separator may be specified via the argument \code{sep}, which will be passed to the function \code{\link[utils]{read.table}}). For example, in Europe, it is common to use a comma in place of the decimal point in numbers and so a semi-colon in place of a comma as the field separator; such data may be read by using \code{sep=";"} and \code{dec=","}. The first line should contain the phenotype names followed by the marker names. \bold{At least one phenotype must be included}; for example, include a numerical index for each individual. The second line should contain blanks in the phenotype columns, followed by chromosome identifiers for each marker in all other columns. If a chromosome has the identifier \code{X} or \code{x}, it is assumed to be the X chromosome; otherwise, it is assumed to be an autosome. An optional third line should contain blanks in the phenotype columns, followed by marker positions, in cM. Marker order is taken from the cM positions, if provided; otherwise, it is taken from the column order. Subsequent lines should give the data, with one line for each individual, and with phenotypes followed by genotypes. If possible, phenotypes are made numeric; otherwise they are converted to factors. The genotype codes must be the same across all markers. For example, you can't have one marker coded AA/AB/BB and another coded A/H/B. This includes genotypes for the X chromosome, for which hemizygous individuals should be coded as if they were homoyzogous. The cross is determined to be a backcross if only the first two elements of the \code{genotypes} string are found; otherwise, it is assumed to be an intercross. } \section{CSVr format}{ This is just like the \code{csv} format, but rotated (or really transposed), so that rows are columns and columns are rows. } \section{CSVs format}{ This is like the \code{csv} format, but with separate files for the genotype and phenotype data. The first column in the genotype data must specify individuals' identifiers, and there must be a column in the phenotype data with precisely the same information (and with the same name). These IDs will be included in the data as a phenotype. If the name \code{id} or \code{ID} is used, these identifiers will be used in \code{\link{top.errorlod}}, \code{\link{plotErrorlod}}, and \code{\link{plotGeno}} as identifiers for the individual. The first row in each file contains the column names. For the phenotype file, these are the names of the phenotypes. For the genotype file, the first cell will be the name of the identifier column (\code{id} or \code{ID}) and the subsequent fields will be the marker names. In the genotype data file, the second row gives the chromosome IDs. The cell in the second row, first column, must be blank. A third row giving cM positions of markers may be included, in which case the cell in the third row, first column, must be blank. There need be no blank rows in the phenotype data file. } \section{CSVsr format}{ This is just like the \code{csvs} format, but with each file rotated (or really transposed), so that rows are columns and columns are rows. } \section{Mapmaker format}{ This format requires two files. The so-called rawfile, specified by the argument \code{file}, contains the genotype and phenotype data. Rows beginning with the symbol \code{#} are ignored. The first line should be either \code{data type f2 intercross} or \code{data type f2 backcross}. The second line should begin with three numbers indicating the numbers of individuals, markers and phenotypes in the file. This line may include the word \code{symbols} followed by symbol assignments (see the documentation for mapmaker, and cross your fingers). The rest of the lines give genotype data followed by phenotype data, with marker and phenotype names always beginning with the \code{*} symbol. A second file contains the genetic map information, specified with the argument \code{mapfile}. The map file may be in one of two formats. The function will determine which format of map file is presented. The simplest format for the map file is not standard for the Mapmaker software, but is easy to create. The file contains two or three columns separated by white space and with no header row. The first column gives the chromosome assignments. The second column gives the marker names, with markers listed in the order along the chromosomes. An optional third column lists the map positions of the markers. Another possible format for the map file is the \code{.maps} format, which is produced by Mapmaker. The code for reading this format was written by Brian Yandell. Marker order is taken from the map file, either by the order they are presented or by the cM positions, if specified. } \section{Map Manager QTX format}{ This format requires a single file (that produced by the Map Manager QTX program). } \section{QTL Cartographer format}{ This format requires two files: the \code{.cro} and \code{.map} files for QTL Cartographer (produced by the QTL Cartographer sub-program, Rmap and Rcross). Note that the QTL Cartographer cross types are converted as follows: RF1 to riself, RF2 to risib, RF0 (doubled haploids) to bc, B1 or B2 to bc, RF2 or SF2 to f2. } \section{Tidy format}{ This format requires three simple CSV files, separating the genotype, phenotype, and marker map information so that each file may be of a simple form. } \section{Gary format}{ This format requires the six files. All files have default names, and so the file names need not be specified if the default names are used. \code{genfile} (default = \code{"geno.dat"}) contains the genotype data. The file contains one line per individual, with genotypes for the set of markers separated by white space. Missing values are coded as 9, and genotypes are coded as 0/1/2 for AA/AB/BB. \code{mapfile} (default = \code{"markerpos.txt"}) contains two columns with no header row: the marker names in the first column and their cM position in the second column. If marker positions are not available, use \code{mapfile=NULL}, and a dummy map will be inserted. \code{phefile} (default = \code{"pheno.dat"}) contains the phenotype data, with one row for each mouse and one column for each phenotype. There should be no header row, and missing values are coded as \code{"-"}. \code{chridfile} (default = \code{"chrid.dat"}) contains the chromosome identifier for each marker. \code{mnamesfile} (default = \code{"mnames.txt"}) contains the marker names. \code{pnamesfile} (default = \code{"pnames.txt"}) contains the names of the phenotypes. If phenotype names file is not available, use \code{pnamesfile=NULL}; arbitrary phenotype names will then be assigned. } \section{Karl format}{ This format requires three files; all files have default names, and so need not be specified if the default name is used. \code{genfile} (default = \code{"gen.txt"}) contains the genotype data. The file contains one line per individual, with genotypes separated by white space. Missing values are coded 0; genotypes are coded as 1/2/3/4/5 for AA/AB/BB/not BB/not AA. \code{mapfile} (default = \code{"map.txt"}) contains the map information, in the following complicated format: \cr \cr \code{n.chr} \cr \code{n.mar(1) rf(1,1) rf(1,2) \ldots rf(1,n.mar(1)-1)}\cr \code{mar.name(1,1)}\cr \code{mar.name(1,2)}\cr \code{\ldots}\cr \code{mar.name(1,n.mar(1))}\cr \code{n.mar(2)}\cr \code{\ldots}\cr \code{etc.} \cr \code{phefile} (default = \code{"phe.txt"}) contains a matrix of phenotypes, with one individual per line. The first line in the file should give the phenotype names. } \section{MapQTL format}{ This format requires three files, described in the manual of the MapQTL program (same as JoinMap). \code{genfile} corresponds to the loc file containing the genotype data. Each marker and its genotypes should be on a single line. \code{mapfile} corresponds to the map file containing the linkage group assignment, marker names and their map positions. \code{phefile} corresponds to the qua file containing the phenotypes. For the moment, only 4-way crosses are supported (CP population type in MapQTL). } \examples{ \dontrun{ # CSV format dat1 <- read.cross("csv", dir="Mydata", file="mydata.csv") # CSVS format dat2 <- read.cross("csvs", dir="Mydata", genfile="mydata_gen.csv", phefile="mydata_phe.csv") # you can read files directly from the internet datweb <- read.cross("csv", "https://rqtl.org/sampledata", "listeria.csv") # Mapmaker format dat3 <- read.cross("mm", dir="Mydata", file="mydata.raw", mapfile="mydata.map") # Map Manager QTX format dat4 <- read.cross("qtx", dir="Mydata", file="mydata.qtx") # QTL Cartographer format dat5 <- read.cross("qtlcart", dir="Mydata", file="qtlcart.cro", mapfile="qtlcart.map") # Gary format dat6 <- read.cross("gary", dir="Mydata", genfile="geno.dat", mapfile="markerpos.txt", phefile="pheno.dat", chridfile="chrid.dat", mnamesfile="mnames.txt", pnamesfile="pnames.txt") # Karl format dat7 <- read.cross("karl", dir="Mydata", genfile="gen.txt", phefile="phe.txt", mapfile="map.txt")} } \author{Karl W Broman, \email{broman@wisc.edu}; Brian S. Yandell; Aaron Wolen} \references{ Broman, K. W. and Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. (2009) \emph{A guide to QTL mapping with R/qtl.} Springer. \url{https://rqtl.org/book} } \seealso{ \code{\link{subset.cross}}, \code{\link{summary.cross}}, \code{\link{plot.cross}}, \code{\link{c.cross}}, \code{\link{clean.cross}}, \code{\link{write.cross}}, \code{\link{sim.cross}}, \code{\link[utils]{read.table}}. The \code{sampledata} directory in the package distribution contains sample data files in multiple formats. Also see \url{https://rqtl.org/sampledata}. } \keyword{IO} qtl/man/scantwo.Rd0000644000176200001440000003042413355127045013602 0ustar liggesusers\name{scantwo} \alias{scantwo} \title{Two-dimensional genome scan with a two-QTL model} \description{ Perform a two-dimensional genome scan with a two-QTL model, with possible allowance for covariates. } \usage{ scantwo(cross, chr, pheno.col=1, model=c("normal","binary"), method=c("em","imp","hk","mr","mr-imp","mr-argmax"), addcovar=NULL, intcovar=NULL, weights=NULL, use=c("all.obs", "complete.obs"), incl.markers=FALSE, clean.output=FALSE, clean.nmar=1, clean.distance=0, maxit=4000, tol=1e-4, verbose=TRUE, n.perm, perm.Xsp=FALSE, perm.strata=NULL, assumeCondIndep=FALSE, batchsize=250, n.cluster=1) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes for which LOD scores should be calculated. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix which should be used as the phenotype. This can be a vector of integers; for methods \code{"hk"} and \code{"imp"} this can be considerably faster than doing them one at a time. One may also give character strings matching the phenotype names. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{model}{The phenotype model: the usual normal model or a model for binary traits.} \item{method}{Indicates whether to use the the EM algorithm, imputation, Haley-Knott regression, or marker regression. Marker regression is performed either by dropping individuals with missing genotypes (\code{"mr"}), or by first filling in missing data using a single imputation (\code{"mr-imp"}) or by the Viterbi algorithm (\code{"mr-argmax"}).} \item{addcovar}{Additive covariates.} \item{intcovar}{Interactive covariates (interact with QTL genotype).} \item{weights}{Optional weights of individuals. Should be either NULL or a vector of length n.ind containing positive weights. Used only in the case \code{model="normal"}.} \item{use}{In the case that multiple phenotypes are selected to be scanned, this argument indicates whether to use all individuals, including those missing some phenotypes, or just those individuals that have data on all selected phenotypes.} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid. If \code{\link{calc.genoprob}} or \code{\link{sim.geno}} were run with \code{stepwidth="variable"} or \code{stepwidth="max"}, we force \code{incl.markers=TRUE}.} \item{clean.output}{If TRUE, clean the output with \code{\link{clean.scantwo}}, replacing LOD scores for pairs of positions that are not well separated with 0. In permutations, this will be done for each permutation replicate. This can be important for the case of \code{method="em"}, as there can be difficulty with algorithm convergence in these regions.} \item{clean.nmar}{If \code{clean.output=TRUE}, this is the number of markers that must separate two positions.} \item{clean.distance}{If \code{clean.output=TRUE}, this is the cM distance that must separate two positions.} \item{maxit}{Maximum number of iterations; used only with method \code{"em"}.} \item{tol}{Tolerance value for determining convergence; used only with method \code{"em"}.} \item{verbose}{If TRUE, display information about the progress of calculations. For method \code{"em"}, if \code{verbose} is an integer above 1, further details on the progress of the algorithm will be displayed.} \item{n.perm}{If specified, a permutation test is performed rather than an analysis of the observed data. This argument defines the number of permutation replicates.} \item{perm.Xsp}{If \code{n.perm} > 0, so that a permutation test will be performed, this indicates whether separate permutations should be performed for the autosomes and the X chromosome, in order to get an X-chromosome-specific LOD threshold. In this case, additional permutations are performed for the X chromosome.} \item{perm.strata}{If \code{n.perm} > 0, this may be used to perform a stratified permutation test. This should be a vector with the same number of individuals as in the cross data. Unique values indicate the individual strata, and permutations will be performed within the strata.} \item{assumeCondIndep}{If TRUE, assume conditional independence of QTL genotypes given marker genotypes. This is an approximation, but it may speed things up.} \item{batchsize}{The number of phenotypes (or permutations) to be run as a batch; used only for methods \code{"hk"} and \code{"imp"}.} \item{n.cluster}{If the package \code{snow} is available and \code{n.perm} > 0, permutations are run in parallel using this number of nodes.} } \details{ Standard interval mapping (\code{method="em"}) and Haley-Knott regression (\code{method="hk"}) require that multipoint genotype probabilities are first calculated using \code{\link{calc.genoprob}}. The imputation method uses the results of \code{\link{sim.geno}}. The method \code{"em"} is standard interval mapping by the EM algorithm (Dempster et al. 1977; Lander and Botstein 1989). Marker regression (\code{method="mr"}) is simply linear regression of phenotypes on marker genotypes (individuals with missing genotypes are discarded). Haley-Knott regression (\code{method="hk"}) uses the regression of phenotypes on multipoint genotype probabilities. The imputation method (\code{method="imp"}) uses the pseudomarker algorithm described by Sen and Churchill (2001). Individuals with missing phenotypes are dropped. In the presence of covariates, the full model is \deqn{y = \mu + \beta_{q_1} + \beta_{q_2} + \beta_{q_1 \times q_2} + A \gamma + Z \delta_{q_1} + Z \delta_{q_2} + Z \delta_{q_1 \times q_2} + \epsilon}{y = m + b[q1] + b[q2] + b[q1 x q2] + A g + Z d[q1] + Z d[q2] + Z d[q1 x q2] + e} where \eqn{q_1}{q1} and \eqn{q_2}{q2} are the unknown QTL genotypes at two locations, \emph{A} is a matrix of covariates, and \emph{Z} is a matrix of covariates that interact with QTL genotypes. The columns of \emph{Z} are forced to be contained in the matrix \emph{A}. The above full model is compared to the additive QTL model, \deqn{y = \mu + \beta_{q_1} + \beta_{q_2} + A \gamma + Z \delta_{q_1} + Z \delta_{q_2} + \epsilon}{y = m + b[q1] + b[q2] + A g + Z d[q1] + Z d[q2] + e} and also to the null model, with no QTL, \deqn{y = \mu + A \gamma + \epsilon}{y = m + A g + e} In the case that \code{n.perm} is specified, the R function \code{scantwo} is called repeatedly. For \code{model="binary"}, a logistic regression model is used. } \section{X chromosome}{ The X chromosome must be treated specially in QTL mapping. As in \code{\link{scanone}}, if both males and females are included, male hemizygotes are allowed to be different from female homozygotes, and the null hypothesis must be changed in order to ensure that sex- or pgm-differences in the phenotype do not results in spurious linkage to the X chromosome. (See the help file for \code{\link{scanone}}.) If \code{n.perm} is specified and \code{perm.Xsp=TRUE}, X-chromosome-specific permutations are performed, to obtain separate thresholds for the regions A:A, A:X, and X:X. } \value{ If \code{n.perm} is missing, the function returns a list with class \code{"scantwo"} and containing three components. The first component is a matrix of dimension [tot.pos x tot.pos]; the upper triangle contains the LOD scores for the additive model, and the lower triangle contains the LOD scores for the full model. The diagonal contains the results of \code{\link{scanone}}. The second component of the output is a data.frame indicating the locations at which the two-QTL LOD scores were calculated. The first column is the chromosome identifier, the second column is the position in cM, the third column is a 1/0 indicator for ease in later pulling out only the equally spaced positions, and the fourth column indicates whether the position is on the X chromosome or not. The final component is a version of the results of \code{\link{scanone}} including sex and/or cross direction as additive covariates, which is needed for a proper calculation of conditional LOD scores. If \code{n.perm} is specified, the function returns a list with six different LOD scores from each of the permutation replicates. First, the maximum LOD score for the full model (two QTLs plus an interaction). Second, for each pair of chromosomes, we take the difference between the full LOD and the maximum single-QTL LOD for those two chromosomes, and then maximize this across chromosome pairs. Third, for each pair of chromosomes we take the difference between the maximum full LOD and the maximum additive LOD, and then maximize this across chromosome pairs. Fourth, the maximum LOD score for the additive QTL model. Fifth, for each pair of chromosomes, we take the difference between the additive LOD and the maximum single-QTL LOD for those two chromosomes, and then maximize this across chromosome pairs. Finally, the maximum single-QTL LOD score (that is, from a single-QTL scan). The latter is not used in \code{\link{summary.scantwo}}, but does get calculated at each permutation, so we include it for the sake of completeness. If \code{n.perm} is specified and \code{perm.Xsp=TRUE}, the result is a list with the permutation results for the regions A:A, A:X, and X:X, each of which is a list with the six different LOD scores. Independent permutations are performed in each region, \code{n.perm} is the number of permutations for the A:A region; additional permutations are are used for the A:X and X:X parts, as estimates of quantiles farther out into the tails are needed. } \references{ Churchill, G. A. and Doerge, R. W. (1994) Empirical threshold values for quantitative trait mapping. \emph{Genetics} \bold{138}, 963--971. Dempster, A. P., Laird, N. M. and Rubin, D. B. (1977) Maximum likelihood from incomplete data via the EM algorithm. \emph{J. Roy. Statist. Soc.} B, \bold{39}, 1--38. Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Lander, E. S. and Botstein, D. (1989) Mapping Mendelian factors underlying quantitative traits using RFLP linkage maps. \emph{Genetics} \bold{121}, 185--199. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. Soller, M., Brody, T. and Genizi, A. (1976) On the power of experimental designs for the detection of linkage between marker loci and quantitative loci in crosses between inbred lines. \emph{Theor. Appl. Genet.} \bold{47}, 35--39. } \author{Karl W Broman, \email{broman@wisc.edu}; Hao Wu} \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} fake.f2 <- calc.genoprob(fake.f2, step=5) out.2dim <- scantwo(fake.f2, method="hk") plot(out.2dim) # permutations \dontshow{permo.2dim <- scantwo(fake.f2, method="hk", n.perm=2)} \dontrun{permo.2dim <- scantwo(fake.f2, method="hk", n.perm=1000)} summary(permo.2dim, alpha=0.05) # summary with p-values summary(out.2dim, perms=permo.2dim, pvalues=TRUE, alphas=c(0.05, 0.10, 0.10, 0.05, 0.10)) # covariates data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=16:17)} fake.bc <- calc.genoprob(fake.bc, step=10) ac <- pull.pheno(fake.bc, c("sex","age")) ic <- pull.pheno(fake.bc, "sex") out <- scantwo(fake.bc, method="hk", pheno.col=1, addcovar=ac, intcovar=ic) plot(out) } \seealso{ \code{\link{plot.scantwo}}, \code{\link{summary.scantwo}}, \code{\link{scanone}}, \code{\link{max.scantwo}}, \code{\link{summary.scantwoperm}}, \code{\link{c.scantwoperm}} } \keyword{models} qtl/man/argmax.geno.Rd0000644000176200001440000000730713615343302014331 0ustar liggesusers\name{argmax.geno} \alias{argmax.geno} \title{Reconstruct underlying genotypes} \description{ Uses the Viterbi algorithm to identify the most likely sequence of underlying genotypes, given the observed multipoint marker data, with possible allowance for genotyping errors. } \usage{ argmax.geno(cross, step=0, off.end=0, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), stepwidth=c("fixed", "variable", "max")) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{step}{Maximum distance (in cM) between positions at which the genotypes are reconstructed, though for \code{step=0}, genotypes are reconstructed only at the marker locations.} \item{off.end}{Distance (in cM) past the terminal markers on each chromosome to which the genotype reconstructions will be carried.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer or Morgan map function when converting genetic distances into recombination fractions.} \item{stepwidth}{Indicates whether the intermediate points should with fixed or variable step sizes. We recommend using \code{"fixed"}; \code{"variable"} was included for the qtlbim package (\url{https://cran.r-project.org/src/contrib/Archive/qtlbim}). The \code{"max"} option inserts the minimal number of intermediate points so that the maximum distance between points is \code{step}.} } \details{ We use the Viterbi algorithm to calculate \eqn{\arg \max_v \Pr(g = v | O)}{arg max_v Pr(g = v | O)} where \eqn{g} is the underlying sequence of genotypes and \eqn{O} is the observed marker genotypes. This is done by calculating \eqn{\gamma_k(v_k) = \max_{v_1, \ldots, v_{k-1}} \Pr(g_1 = v_1, \ldots, g_k = v_k, O_1, \ldots, O_k)}{% Q[k](v[k]) = max{v[1], \ldots, v[k-1]} Pr(g[1] = v[1], \ldots, g[k] = v[k], O[1], \ldots, O[k])} for \eqn{k = 1, \ldots, n} and then tracing back through the sequence. } \value{ The input \code{cross} object is returned with a component, \code{argmax}, added to each component of \code{cross$geno}. The \code{argmax} component is a matrix of size [n.ind x n.pos], where n.pos is the number of positions at which the reconstructed genotypes were obtained, containing the most likely sequences of underlying genotypes. Attributes \code{"error.prob"}, \code{"step"}, and \code{"off.end"} are set to the values of the corresponding arguments, for later reference. } \section{Warning}{ The Viterbi algorithm can behave badly when \code{step} is small but positive. One may observe quite different results for different values of \code{step}. The problem is that, in the presence of data like \code{A----H}, the sequences \code{AAAAAA} and \code{HHHHHH} may be more likely than any one of the sequences \code{AAAAAH}, \code{AAAAHH}, \code{AAAHHH}, \code{AAHHHH}, \code{AHHHHH}, \code{AAAAAH}. The Viterbi algorithm produces a single "most likely" sequence of underlying genotypes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2,chr=18:19) }fake.f2 <- argmax.geno(fake.f2, step=2, off.end=5, err=0.01) } \references{ Lange, K. (1999) \emph{Numerical analysis for statisticians}. Springer-Verlag. Sec 23.3. Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. \emph{Proceedings of the IEEE} \bold{77}, 257--286. } \seealso{ \code{\link{sim.geno}}, \code{\link{calc.genoprob}}, \code{\link{fill.geno}} } \keyword{utilities} qtl/man/typingGap.Rd0000644000176200001440000000377513355127045014077 0ustar liggesusers\name{typingGap} \alias{typingGap} \title{Maximum distance between genotyped markers} \description{ Calculates, for each individual on each chromosome, the maximum distance between genotyped markers. } \usage{ typingGap(cross, chr, terminal=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{terminal}{If TRUE, just look at terminal typing gaps (from the terminal markers to the first typed marker).} } \details{ We consider not just the distances between internal genotypes, but also distances from the beginning of the chromosome to the first typed marker, and similarly for the end of the chromosome. (The start and end of a chromosome are taken to be the locations of the initial and final markers.) If \code{terminal=TRUE}, we look only at those beginning and end distances. } \value{ A matrix with rows corresponding to individuals and columns corresponding to chromosomes. (If there is just one chromosome, it is a numeric vector rather than a matrix.) } \examples{ data(hyper) plot(typingGap(hyper, chr=5), ylab="Maximum gap between typed markers (cM)", ylim=c(0, diff(range(pull.map(hyper,chr=5)[[1]])))) plot(typingGap(hyper, chr=4), ylab="Maximum gap between typed markers (cM)", ylim=c(0, diff(range(pull.map(hyper,chr=4)[[1]])))) plot(typingGap(hyper, chr=4, terminal=TRUE), ylab="Maximum gap between chr end and typed marker (cM)", ylim=c(0, diff(range(pull.map(hyper,chr=4)[[1]])))) } \seealso{ \code{\link{ntyped}}, \code{\link{nmissing}}, \code{\link{locateXO}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{utilities} qtl/man/pull.argmaxgeno.Rd0000644000176200001440000000277613355127045015240 0ustar liggesusers\name{pull.argmaxgeno} \alias{pull.argmaxgeno} \title{Pull out the results of the Viterbi algorithm from a cross} \description{ Pull out the results of \code{\link{argmax.geno}} from a cross as a matrix. } \usage{pull.argmaxgeno(cross, chr, include.pos.info=FALSE, rotate=FALSE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{include.pos.info}{If TRUE, include columns with marker name, chromosmoe ID, and cM position. (If \code{include.pos.info=TRUE}, we take \code{rotate=TRUE}.)} \item{rotate}{If TRUE, return matrix with individuals as columns and positions as rows. If FALSE, rows correspond to individuals.} } \value{ A matrix containing numeric indicators of the inferred genotypes. Multiple chromosomes are pasted together. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) listeria <- argmax.geno(listeria, step=1, stepwidth="max") amg <- pull.argmaxgeno(listeria, chr=c(5,13), include.pos.info=TRUE, rotate=TRUE) amg[1:5,1:10] } \seealso{ \code{\link{pull.geno}}, \code{\link{pull.genoprob}}, \code{\link{pull.draws}}, \code{\link{argmax.geno}} } \keyword{utilities} qtl/man/markerlrt.Rd0000644000176200001440000000155613355127045014133 0ustar liggesusers\name{markerlrt} \alias{markerlrt} \title{General likelihood ratio test for association between marker pairs} \description{ Calculate a LOD score for a general likelihood ratio test for each pair of markers, to assess their association. } \usage{ markerlrt(cross) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ The input \code{cross} object is returned with a component, \code{rf}, added. This is a matrix of size (tot.mar x tot.mar). The diagonal contains the number of typed meioses per marker, the upper and lower triangles each contain the LOD scores. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(badorder) badorder <- markerlrt(badorder) plotRF(badorder) } \seealso{ \code{\link{plotRF}}, \code{\link{est.rf}}, \code{\link{badorder}} } \keyword{utilities} qtl/man/chrnames.Rd0000644000176200001440000000105513355127045013722 0ustar liggesusers\name{chrnames} \alias{chrnames} \title{Pull out the chromosome names from a cross} \description{ Pull out the chromosome names from a cross object as one big vector. } \usage{chrnames(cross)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} } \value{ A vector of character strings (the chromosome names). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) chrnames(listeria) } \seealso{ \code{\link{markernames}}, \code{\link{phenames}} } \keyword{utilities} qtl/man/tryallpositions.Rd0000644000176200001440000000631713355127045015407 0ustar liggesusers\name{tryallpositions} \alias{tryallpositions} \title{Test all possible positions for a marker} \description{ Try all possible positions for a marker, keeping all other markers fixed, and evaluate the log likelihood and estimate the chromosome length. } \usage{ tryallpositions(cross, marker, chr, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), m=0, p=0, maxit=4000, tol=1e-6, sex.sp=TRUE, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{marker}{Character string with name of the marker to move about.} \item{chr}{A vector specifying which chromosomes to test for the position of the marker. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions. (Ignored if m > 0.)} \item{m}{Interference parameter for the chi-square model for interference; a non-negative integer, with m=0 corresponding to no interference. This may be used only for a backcross or intercross.} \item{p}{Proportion of chiasmata from the NI mechanism, in the Stahl model; p=0 gives a pure chi-square model. This may be used only for a backcross or intercross.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} \item{verbose}{If TRUE, print information on progress.} } \value{ A data frame (actually, an object of class \code{"scanone"}, so that one may use \code{\link{plot.scanone}}, \code{\link{summary.scanone}}, etc.) with each row being a possible position for the marker. The first two columns are the chromosome ID and position. The third column is a LOD score comparing the hypotheses that the marker is in that position versus the hypothesis that it is not linked to that chromosome. In the case of a 4-way cross, with \code{sex.sp=TRUE}, there are two additional columns with the estimated female and male genetic lengths of the respective chromosome, when the marker is in that position. With \code{sex.sp=FALSE}, or for other types of crosses, there is one additional column, with the estimated genetic length of the respective chromosome, when the marker is in that position. The row names indicate the nearest flanking markers for each interval. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) tryallpositions(fake.bc, "D7M301", 7, error.prob=0, verbose=FALSE) } \seealso{ \code{\link{droponemarker}}, \code{\link{est.map}}, \code{\link{ripple}}, \code{\link{est.rf}}, \code{\link{switch.order}}, \code{\link{movemarker}} } \keyword{utilities} qtl/man/droponemarker.Rd0000644000176200001440000000707413355127045015001 0ustar liggesusers\name{droponemarker} \alias{droponemarker} \title{Drop one marker at a time and determine effect on genetic map} \description{ Drop one marker at a time from a genetic map and calculate the change in log likelihood and in the chromosome length, in order to identify problematic markers. } \usage{ droponemarker(cross, chr, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), m=0, p=0, maxit=4000, tol=1e-6, sex.sp=TRUE, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{A vector specifying which chromosomes to test for the position of the marker. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions. (Ignored if m > 0.)} \item{m}{Interference parameter for the chi-square model for interference; a non-negative integer, with m=0 corresponding to no interference. This may be used only for a backcross or intercross.} \item{p}{Proportion of chiasmata from the NI mechanism, in the Stahl model; p=0 gives a pure chi-square model. This may be used only for a backcross or intercross.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} \item{verbose}{If TRUE, print information on progress; if > 1, print even more information.} } \value{ A data frame (actually, an object of class \code{"scanone"}, so that one may use \code{\link{plot.scanone}}, \code{\link{summary.scanone}}, etc.) with each row being a marker. The first two columns are the chromosome ID and position. The third column is a LOD score comparing the hypothesis that the marker is not linked to the hypothesis that it belongs at that position. In the case of a 4-way cross, with \code{sex.sp=TRUE}, there are two additional columns with the change in the estimated female and male genetic lengths of the respective chromosome, upon deleting that marker. With \code{sex.sp=FALSE}, or for other types of crosses, there is one additional column, with the change in estimated genetic length of the respective chromosome, when the marker is omitted. A well behaved marker will have a negative LOD score and a small change in estimated genetic length. A poorly behaved marker will have a large positive LOD score and a large change in estimated genetic length. But note that dropping the first or last marker on a chromosome could result in a large change in estimated length, even if they are not badly behaved; for these markers one should focus on the LOD scores, with a large positive LOD score being bad. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) droponemarker(fake.bc, 7, error.prob=0, verbose=FALSE) } \seealso{ \code{tryallpositions}, \code{\link{est.map}}, \code{\link{ripple}}, \code{\link{est.rf}}, \code{\link{switch.order}}, \code{\link{movemarker}}, \code{\link{drop.markers}} } \keyword{utilities} qtl/man/plot.cross.Rd0000644000176200001440000000313413355127045014230 0ustar liggesusers\name{plot.cross} \alias{plot.cross} \title{Plot various features of a cross object} \description{ Plots grid of the missing genotypes, genetic map, and histograms or barplots of phenotypes for the data from an experimental cross. } \usage{ \method{plot}{cross}(x, auto.layout=TRUE, pheno.col, alternate.chrid=TRUE, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{auto.layout}{If TRUE, \code{par(mfrow)} is set so that all plots fit within one figure.} \item{pheno.col}{Vector of numbers or character strings corresponding to phenotypes that should be plotted. If unspecified, all phenotypes are plotted.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{\dots}{Ignored at this point.} } \value{None.} \details{ Calls \code{\link{plotMissing}}, \code{\link{plotMap}} and \code{\link{plotPheno}} to plot the missing genotypes, genetic map, and histograms or barplots of all phenotypes. If \code{auto.format=TRUE}, \code{par(mfrow)} is used with \code{ceiling(sqrt(n.phe+2))} rows and the minimum number of columns so that all plots fit on the plotting device. Numeric phenotypes are displayed as histograms or barplots by calling \code{\link{plotPheno}}. } \examples{ data(fake.bc) plot(fake.bc) } \seealso{ \code{\link{plotMissing}}, \code{\link{plotMap}}, \code{\link{plotPheno}} } \author{Karl W Broman, \email{broman@wisc.edu}; Brian Yandell } \keyword{hplot} qtl/man/addpair.Rd0000644000176200001440000001710413355127045013530 0ustar liggesusers\name{addpair} \alias{addpair} \title{Scan for an additional pair of QTL in a multiple-QTL model} \description{ Scan for an additional pair of QTL in the context of a multiple QTL model. } \usage{ addpair(cross, chr, pheno.col=1, qtl, covar=NULL, formula, method=c("imp","hk"), model=c("normal", "binary"), incl.markers=FALSE, verbose=TRUE, tol=1e-4, maxit=1000, forceXcovar=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to be scanned. If missing, all chromosomes are scanned. Refer to chromosomes by name. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{pheno.col}{Column number in the phenotype matrix to be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{An object of class \code{qtl}, as output from \code{\link{makeqtl}}.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are referred to as \code{Q1}, \code{Q2}, etc. Covariates are referred to by their names in the data frame \code{covar}. If the new QTL are not included in the formula, a two-dimensional scan as in \code{\link{scantwo}} is performed.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{incl.markers}{If FALSE, do calculations only at points on an evenly spaced grid. If \code{\link{calc.genoprob}} or \code{\link{sim.geno}} were run with \code{stepwidth="variable"} or \code{stepwidth="max"}, we force \code{incl.markers=TRUE}.} \item{verbose}{If TRUE, display information about the progress of calculations. If \code{verbose} is an integer > 1, further messages from \code{\link{scanqtl}} are also displayed.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{forceXcovar}{If TRUE, force inclusion of X-chr-related covariates (like sex and cross direction).} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect must also be included. If neither of the two new QTL are indicated in the \code{formula}, we perform a two-dimensional scan as in \code{\link{scantwo}}. That is, for each pair of QTL positions, we fit two models: two additive QTL added to the \code{formula}, and two interacting QTL added to the \code{formula}. If the both of the new QTL are indicated in the \code{formula}, that particular model is fit, with the positions of the new QTL allowed to vary across the genome. If just one of the QTL is indicated in the \code{formula}, a main effect for the other is added, and that particular model is fit, again with the positions of both QTL varying. Note that in this case the LOD scores are not analogous to those produced by \code{\link{scantwo}}. Thus, there slightly modified forms for the plots (produced by \code{\link{plot.scantwo}}) and summaries (produced by \code{\link{summary.scantwo}} and \code{\link{max.scantwo}}). In the plot, the x-axis is to be interpreted as the position of the first of the new QTL, and the y-axis is to be interpreted as the position of the second of the new QTL. In the summaries, we give the single best pair of positions on each pair of chromosomes, and give LOD scores comparing that pair of positions to the base model (without each of these QTL), and to the base model plus one additional QTL on one or the other of the chromosomes. } \section{Value}{ An object of class \code{scantwo}, as produced by \code{\link{scantwo}}. If neither of the new QTL were indicated in the \code{formula}, the result is just as in \code{\link{scantwo}}, though with LOD scores relative to the base model (omitting the new QTL). Otherwise, the results are contained in what would ordinarily be in the full and additive LOD scores, with the additive LOD scores corresponding to the case that the first of the new QTL is to the left of the second of the new QTL, and the full LOD scores corresponding to the case that the first of the new QTL is to the right of the second of the new QTL. Because the structure of the LOD scores in this case is different from those output by \code{\link{scantwo}}, we include, in this case, an attribute \code{"addpair"=TRUE}. (We also require results of single-dimensional scans, omitting each of the two new QTL from the formula, one at a time; these are included as attributes \code{"lod.minus1"} and \code{"lod.minus2"}.) The results are then treated somewhat differently by \code{\link{summary.scantwo}}, \code{\link{max.scantwo}}, and \code{\link{plot.scantwo}}. See the Details section. } \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ # A totally contrived example to show some of what you can do # simulate backcross data with 3 chromosomes (names "17", "18", "19") # one QTL on chr 17 at 40 cM # one QTL on chr 18 at 30 cM # two QTL on chr 19, at 10 and 40 cM data(map10) model <- rbind(c(1,40,0), c(2,30,0), c(3,10,0), c(3,40,0)) \dontrun{fakebc <- sim.cross(map10[17:19], model=model, type="bc", n.ind=250)} \dontshow{fakebc <- sim.cross(map10[17:19], model=model, type="bc", n.ind=25)} # het at QTL on 17 and 1st QTL on 19 increases phenotype by 1 unit # het at QTL on 18 and 2nd QTL on 19 decreases phenotype by 1 unit qtlgeno <- fakebc$qtlgeno phe <- rnorm(nind(fakebc)) w <- qtlgeno[,1]==2 & qtlgeno[,3]==2 phe[w] <- phe[w] + 1 w <- qtlgeno[,2]==2 & qtlgeno[,4]==2 phe[w] <- phe[w] - 1 fakebc$pheno[,1] <- phe \dontrun{fakebc <- calc.genoprob(fakebc, step=2, err=0.001) }\dontshow{fakebc <- calc.genoprob(fakebc, step=0, err=0.001)} # base model has QTLs on chr 17 and 18 qtl <- makeqtl(fakebc, chr=c("17", "18"), pos=c(40,30), what="prob") # scan for an additional pair of QTL, one interacting with the locus # on 17 and one interacting with the locus on 18 out.ap <- addpair(fakebc, qtl=qtl, formula = y~Q1*Q3 + Q2*Q4, method="hk") max(out.ap) summary(out.ap) plot(out.ap) } \seealso{ \code{\link{addint}}, \code{\link{addqtl}}, \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}}, \code{\link{refineqtl}}, \code{\link{makeqtl}}, \code{\link{scantwo}}, \code{\link{addtoqtl}} } \keyword{models} qtl/man/find.pheno.Rd0000644000176200001440000000121512770016226014146 0ustar liggesusers\name{find.pheno} \alias{find.pheno} \title{Find column number for a particular phenotype} \description{ Find the column number corresponding to a particular phenotype name. } \usage{find.pheno(cross, pheno)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno}{Vector of phenotype names (as character strings).} } \value{ A vector of numbers, corresponding to the column numbers of the phenotype in the input cross with the specified names. } %\details{ %} \author{Brian Yandell} \examples{ data(fake.bc) find.pheno(fake.bc, "sex") } %\seealso{ } \keyword{utilities} qtl/man/compareorder.Rd0000644000176200001440000000404513355127045014606 0ustar liggesusers\name{compareorder} \alias{compareorder} \title{Compare two orderings of markers on a chromosome} \description{ Compare the likelihood of an alternative order for markers on a chromosome to the current order. } \usage{ compareorder(cross, chr, order, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), maxit=4000, tol=1e-6, sex.sp=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{The chromosome to investigate. Only one chromosome is allowed. (This should be a character string referring to the chromosomes by name.)} \item{order}{The alternate order of markers on the chromosome: a numeric vector that is a permutation of the integers from 1 to the number of markers on the chromosome.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi, Carter-Falconer, or Morgan map function when converting genetic distances into recombination fractions.} \item{maxit}{Maximum number of EM iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{sex.sp}{Indicates whether to estimate sex-specific maps; this is used only for the 4-way cross.} } \value{ A data frame with two rows: the current order in the input cross object, and the revised order. The first column is the log10 likelihood of the new order relative to the original one (positive values indicate that the new order is better supported). The second column is the estimated genetic length of the chromosome for each order. In the case of sex-specific maps, there are separate columns for the female and male genetic lengths. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(badorder) compareorder(badorder, chr=1, order=c(1:8,11,10,9,12)) } \seealso{ \code{\link{ripple}}, \code{\link{switch.order}}, \code{\link{movemarker}} } \keyword{utilities} qtl/man/subset.scanone.Rd0000644000176200001440000000253213355127045015055 0ustar liggesusers\name{subset.scanone} \alias{subset.scanone} \title{Subsetting the results of a genome scan} \description{ Pull out a specified set of chromosomes and/or LOD columns from \code{\link{scanone}} output. } \usage{ \method{subset}{scanone}(x, chr, lodcolumn, \dots) } \arguments{ \item{x}{An object of class \code{scanone}, output from \code{\link{scanone}}.} \item{chr}{Optional vector specifying which chromosomes to keep. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{lodcolumn}{A vector specifying which LOD columns to keep (or, if negative), omit. These should be between 1 and the number of LOD columns in the input \code{x}.} \item{\dots}{Ignored at this point.} } \value{The input \code{scanone} object, but with only the specified subset of the data.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=16:19)} fake.bc <- calc.genoprob(fake.bc, step=2.5) out <- scanone(fake.bc, method="hk", pheno.col=1:2) summary(subset(out, chr=18:19), format="allpeaks") } \seealso{ \code{\link{summary.scanone}}, \code{\link{scanone}} } \keyword{manip} qtl/man/nqtl.Rd0000644000176200001440000000157513355127045013107 0ustar liggesusers\name{nqtl} \alias{nqtl} \title{Determine the number of QTL in a QTL object} \description{ Determine the number of QTL in a QTL object. } \usage{ nqtl(qtl) } \arguments{ \item{qtl}{An object of class \code{qtl}. See \code{\link{makeqtl}} for details.} } \value{ The number of QTL in the input QTL object. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c("1", "6", "13") qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0) qtl <- makeqtl(fake.f2, qc, qp, what="prob") nqtl(qtl) } \seealso{ \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{dropfromqtl}}, \code{\link{replaceqtl}}, \code{\link{addtoqtl}}, \code{\link{summary.qtl}}, \code{\link{reorderqtl}} } \keyword{print} qtl/man/mqmaugment.Rd0000644000176200001440000001141513526005022014264 0ustar liggesusers\name{mqmaugment} \alias{mqmaugment} \title{MQM augmentation} \description{ Fill in missing genotypes for MQM mapping. For each missing or incomplete marker it fills in (or `augments') all possible genotypes, thus creating new candidate `individuals'. The probability of each indidual is calculated using information on neighbouring markers and recombination frequencies. When a genotype of an augmented genotype is less likely than the \code{minprob} parameter it is dropped from the dataset. The \emph{augmented} list of individuals is returned in a new cross object. For a full discussion on augmentation see the MQM tutorial online. } \usage{ mqmaugment(cross, maxaugind=82, minprob=0.1, strategy=c("default","impute","drop"), verbose=FALSE) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{maxaugind}{ Maximum number of augmentations per individual. The default of 82 allows for six missing markers for an individual in a BC cross (\eqn{2^6=64}) and four missing markers in an F2 (\eqn{3^4=81}). When a large number of markers are missing this default number is quickly reached. } \item{minprob}{ Return individuals with augmented genotypes that have at least this probability of occurring. \code{minprob} is a value between 0 and 1. For example a value of 0.5 will drop all genotypes that are half as likely as the most likely genotype (candidate of the individual). The default value of 0.1 will drop all genotypes that are less likely of ocurring than 1 in 10, compared against the most likely genotype. Use a value of 1.0 to return a single filled in genotype for each individual. } \item{strategy}{ When individuals have too much missing data and augmentation fails three options are provided: 1. \code{"default"}: Calculate genotypes at missing marker positions, accounting for \code{minprob}, and add this individual to the set. 2. \code{"impute"}: Calculate the most likely genotypes at missing marker positions and impute \code{maxaugind} individual-variants around the most likely genotype. 3. \code{"drop"}: Drop individuals that cannot be augmented from the dataset, this option is not advised because information from the dropped individuals will be lost. } \item{verbose}{ If TRUE, give verbose output } } \value{ Returns the cross object with augmented individuals (many individuals from the data set will be repeated multiple times). Some individuals may have been dropped completely when the probability falls below \code{minprob}. An added component to the cross object named \code{mqm} contains information on exactly which individuals are retained and repeated. } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \note{ The sex chromosome 'X' is treated like autosomes during augmentation. With an F2 the sex chromosome is not considered. This will change in a future version of MQM. Run with \code{verbose=TRUE} to verify how many individuals are augmented versus moved to the second augmentation round. This could have an effect on the resulting dataset or check the return \code{cross$mqm} values. Compare results by using \code{minprob=1}. } \seealso{ \itemize{ \item \code{\link{fill.geno}} - Alternative routine for estimating missing data % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ % \input{"inst/doc/Sources/MQM/mqm/standard_example.txt"} data(map10) # Genetic map modeled after mouse # simulate a cross (autosomes 1-10) qtl <- c(3,15,1,0) # QTL model: chr, pos'n, add've & dom effects cross <- sim.cross(map10[1:10],qtl,n=100,missing.prob=0.01) # MQM crossaug <- mqmaugment(cross) # Augmentation cat(crossaug$mqm$Nind,'real individuals retained in dataset', crossaug$mqm$Naug,'individuals augmented\n') result <- mqmscan(crossaug) # Scan # show LOD interval of the QTL on chr 3 lodint(result,chr=3) % -----^^ inst/doc/Sources/MQM/mqm/standard_example.txt ^^----- } \keyword{utilities} qtl/man/replace.map.Rd0000644000176200001440000000211613355127045014310 0ustar liggesusers\name{replace.map} \alias{replace.map} \alias{replacemap.cross} \title{Replace the genetic map of a cross} \description{ Replace the map portion of a cross object. } \usage{ replace.map(cross, map) \method{replacemap}{cross}(object, map) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{object}{Same as \code{cross}.} \item{map}{A list containing the new genetic map. This must be the same length and with the same marker names as that contained in \code{cross}. } } \value{The input \code{cross} object with the genetic map replaced by the input \code{map}. Maps for results from \code{\link{calc.genoprob}}, \code{\link{sim.geno}} and \code{\link{argmax.geno}} are also replaced, using interpolation if necessary.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=18:19)} newmap <- est.map(fake.f2) plotMap(fake.f2, newmap) fake.f2 <- replace.map(fake.f2, newmap) } \seealso{ \code{\link{pull.map}}, \code{\link{est.map}} } \keyword{manip} qtl/man/switchAlleles.Rd0000644000176200001440000000301313355127045014721 0ustar liggesusers\name{switchAlleles} \alias{switchAlleles} \title{Switch alleles at selected markers} \description{ Switch alleles at selected markers in a cross object. } \usage{switchAlleles(cross, markers, switch=c("AB", "CD", "ABCD", "parents"))} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{markers}{Names of markers whose alleles are to be switched.} \item{switch}{For a 4-way cross, indicates how to switch the alleles (A for B, C for D, both A for B and C for D), or both A for C and B for D (\code{parents}).} } \value{ The input cross object, with alleles at selected markers switched. } \details{ For a backcross, we exchange homozygotes (AA) and heterozygotes (AB). For doubled haploids and recombinant inbred lines, we exchange the two homozygotes. For an intercross, we exchange the two homozygotes, and exchange C (i.e., not AA) and D (i.e., not BB). (The heterozygotes in an intercross are left unchanged.) For a 4-way cross, we consider the argument \code{switch}, and the exchanges among the genotypes are more complicated. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) geno.crosstab(fake.f2, "D5M391", "D5M81") # switch homozygotes at marker D5M391 fake.f2 <- switchAlleles(fake.f2, "D5M391") geno.crosstab(fake.f2, "D5M391", "D5M81") \dontrun{fake.f2 <- est.rf(fake.f2) checkAlleles(fake.f2) } } \seealso{ \code{\link{checkAlleles}}, \code{\link{est.rf}}, \code{\link{geno.crosstab}} } \keyword{utilities} qtl/man/summary.cross.Rd0000644000176200001440000000144413355127045014751 0ustar liggesusers\name{summary.cross} \alias{summary.cross} \title{Print summary of QTL experiment} \description{ Print summary information about a \code{cross} object. } \usage{ \method{summary}{cross}(object, \dots) } \arguments{ \item{object}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.cross} containing a variety of summary information about the cross (this is generally printed automatically). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) summary(fake.f2) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{nind}}, \code{\link{nmar}}, \code{\link{nchr}}, \code{\link{totmar}}, \code{\link{nphe}} } \keyword{print} qtl/man/map10.Rd0000644000176200001440000000146513355127045013045 0ustar liggesusers\name{map10} \alias{map10} \docType{data} \title{An example genetic map} \description{ A genetic map corresponding approximately to the mouse genome with a 10 cM marker spacing. } \usage{data(map10)} \format{ An object of class \code{map}: a list whose components are vectors of marker locations. This map approximates the mouse genome, with 20 chromosomes (including the X chromosome) and 187 markers at an approximately 10 cM spacing. The markers are equally spaced on each chromosome, but the spacings are a bit above or below 10 cM, so that the lengths match those in the Mouse Genome Database.} \examples{ data(map10) plot(map10) mycross <- sim.cross(map10, type="f2", n.ind=100) } \seealso{ \code{\link{sim.map}}, \code{\link{plotMap}}, \code{\link{pull.map}} } \keyword{datasets} qtl/man/pull.genoprob.Rd0000644000176200001440000000332213355127045014707 0ustar liggesusers\name{pull.genoprob} \alias{pull.genoprob} \title{Pull out the genotype probabilities from a cross} \description{ Pull out the results of \code{\link{calc.genoprob}} from a cross as a matrix. } \usage{pull.genoprob(cross, chr, omit.first.prob=FALSE, include.pos.info=FALSE, rotate=FALSE)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{omit.first.prob}{If TRUE, omit the probabilities for the first genotype at each position (since they sum to 1).} \item{include.pos.info}{If TRUE, include columns with marker name, genotype, chromosome ID, and cM position. (If \code{include.pos.info=TRUE}, we take \code{rotate=TRUE}.)} \item{rotate}{If TRUE, return matrix with individuals as columns and positions/genotypes as rows. If FALSE, rows correspond to individuals.} } \value{ A matrix containing genotype probabilities. Multiple chromosomes and the multiple genotypes at each position are pasted together. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) listeria <- calc.genoprob(listeria, step=1, stepwidth="max") pr <- pull.genoprob(listeria, chr=c(5,13), omit.first.prob=TRUE, include.pos.info=TRUE, rotate=TRUE) pr[1:5,1:10] } \seealso{ \code{\link{pull.geno}}, \code{\link{pull.argmaxgeno}}, \code{\link{pull.draws}}, \code{\link{calc.genoprob}} } \keyword{utilities} qtl/man/bristle3.Rd0000644000176200001440000000315213355127045013651 0ustar liggesusers\name{bristle3} \alias{bristle3} \docType{data} \title{Data on bristle number in Drosophila} \description{ Data from bristle number in chromosome 3 recombinant isogenic lines of \emph{Drosophila melanogaster}. } \usage{data(bristle3)} \format{ An object of class \code{cross}. See \code{\link{read.cross}} for details. } \details{ There are 66 chromosome 3 recombinant isogenic lines, derived from inbred lines that were selected for low (A) and high (B) abdominal bristle numbers. A recombinant chromosome 3 was placed in an isogenic low background. There are eight phenotypes: the average and SD of the number of abdominal and sternopleural bristles in males and females for each line. Each line is typed at 29 genetic markers on chromosome 3. } \references{ Long, A. D., Mullaney, S. L., Reid, L. A., Fry, J. D., Langley, C. H. and MacKay, T. F. C. (1995) High resolution mapping of genetic factors affecting abdominal bristle number in \emph{Drosophila melanogaster}. \emph{Genetics} \bold{139}, 1273--1291. } %\source{ %} \examples{ data(bristle3) # Summaries summary(bristle3) plot(bristle3) # genome scan for each of the average phenotypes bristle3 <- calc.genoprob(bristle3, step=2) out <- scanone(bristle3, pheno.col=c(1,3,5,7)) # Plot the results # maximum LOD score among four phenotypes ym <- max(apply(out[,-(1:2)], 2, max)) plot(out, lod=1:3, ylim=c(0,ym)) plot(out, lod=4, add=TRUE, col="green") } \seealso{ \code{\link{bristleX}}, \code{\link{listeria}}, \code{\link{fake.bc}}, \code{\link{fake.f2}}, \code{\link{fake.4way}}, \code{\link{hyper}} } \keyword{datasets} qtl/man/nqrank.Rd0000644000176200001440000000133413355127045013414 0ustar liggesusers\name{nqrank} \alias{nqrank} \title{Transform a vector of quantitative values to the corresponding normal quantiles} \description{ Transform a vector of quantitative values to the corresponding normal quantiles (preserving the mean and SD). } \usage{ nqrank(x, jitter) } \arguments{ \item{x}{A numeric vector} \item{jitter}{If TRUE, randomly jitter the values to break ties.} } \value{ A numeric vector; the input \code{x} is converted to ranks and then to normal quantiles. } \author{ Karl W Broman, \email{broman@wisc.edu} } \seealso{ \code{\link{rank}}, \code{\link{qnorm}}, \code{transformPheno} } \examples{ data(hyper) hyper <- transformPheno(hyper, pheno.col=1, transf=nqrank) } \keyword{ utilities } qtl/man/plot.rfmatrix.Rd0000644000176200001440000000234713355127045014740 0ustar liggesusers\name{plot.rfmatrix} \alias{plot.rfmatrix} \title{Plot recombination fractions or LOD scores for a single marker} \description{ Plot a slice (corresponding to a single marker) through the pairwise recombination fractions or LOD scores calculated by \code{\link{est.rf}} and extracted with \code{\link{pull.rf}}. } \usage{ \method{plot}{rfmatrix}(x, marker, \dots) } \arguments{ \item{x}{An object of class \code{rfmatrix}, as output by \code{\link{pull.rf}}.} \item{marker}{A single marker name, as a character string.} \item{\dots}{Optional arguments passed to \code{\link{plot.scanone}}.} } \value{ An object of class \code{"scanone"} (as output by \code{\link{scanone}}, and which may be summarized by \code{\link{summary.scanone}} or plotted with \code{\link{plot.scanone}}), containing the estimated recombination fractions or LOD scores for the input marker against all others. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=5)} fake.f2 <- est.rf(fake.f2) marker <- markernames(fake.f2, chr=5)[6] lod <- pull.rf(fake.f2, "lod") plot(lod, marker, bandcol="gray70") } \seealso{ \code{\link{pull.rf}}, \code{\link{est.rf}}, \code{\link{plotRF}} } \keyword{hplot} qtl/man/convert2sa.Rd0000644000176200001440000000240013355127045014203 0ustar liggesusers\name{convert2sa} \alias{convert2sa} \title{Convert a sex-specific map to a sex-averaged one} \description{ Convert a sex-specific map to a sex-averaged one, assuming that the female and male maps are actually the same (that is, that the map was estimated assuming a common recombination rate in females and males). } \usage{ convert2sa(map, tol=1e-4) } \arguments{ \item{map}{A map object with sex-specific locations (but assuming that the female and male maps are the same), as output by the function \code{\link{est.map}} for a 4-way cross, with argument \code{sex.sp=FALSE}.} \item{tol}{Tolerance value for inspecting the differences between the female and male maps; if they differ by more than this tolerance, a warning is issued.} } \value{ A map object, with sex-averaged distances. } \details{ We pull out just the female marker locations, and give a warning if there are large differences between the female and male maps. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.4way) \dontrun{fake.4way <- subset(fake.4way, chr="-X")} \dontshow{fake.4way <- subset(fake.4way, chr=18:19)} nm <- est.map(fake.4way, sex.sp=FALSE) plot(convert2sa(nm)) } \seealso{ \code{\link{est.map}}, \code{\link{plotMap}} } \keyword{manip} qtl/man/plot.scanPhyloQTL.Rd0000644000176200001440000000600013355127045015413 0ustar liggesusers\name{plot.scanPhyloQTL} \alias{plot.scanPhyloQTL} \title{Plot LOD curves from single-QTL scan to map QTL to a phylogenetic tree} \description{ Plot the LOD curves for each partition for a genome scan with a single diallelic QTL (the output of \code{\link{scanPhyloQTL}}). } \usage{ \method{plot}{scanPhyloQTL}(x, chr, incl.markers=TRUE, col, xlim, ylim, lwd=2, gap=25, mtick=c("line", "triangle"), show.marker.names=FALSE, alternate.chrid=FALSE, legend=TRUE, \dots) } \arguments{ \item{x}{An object of class \code{"scanPhyloQTL"}, as output by \code{\link{scanPhyloQTL}}.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{incl.markers}{Indicate whether to plot line segments at the marker locations.} \item{col}{Optional vector of colors to use for each partition.} \item{xlim}{Limits for x-axis (optional).} \item{ylim}{Limits for y-axis (optional).} \item{lwd}{Line width.} \item{gap}{Gap separating chromosomes (in cM).} \item{mtick}{Tick mark type for markers (line segments or upward-pointing triangels).} \item{show.marker.names}{If TRUE, show the marker names along the x axis.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{legend}{Indicates whether to include a legend in the plot.} \item{\dots}{Passed to the function \code{\link{plot.scanone}} when it is called.} } \value{None.} %\details{ %} \examples{ \dontrun{ # example map; drop X chromosome data(map10) map10 <- map10[1:19] # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross x <- lapply(x, calc.genoprob, step=2) # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # maximum peak max(out, format="lod") # approximate posterior probabilities at peak max(out, format="postprob") # all peaks above a threshold for LOD(best) - LOD(2nd best) summary(out, threshold=1, format="lod") # all peaks above a threshold for LOD(best), showing approx post'r prob summary(out, format="postprob", threshold=3) # plot of results plot(out) } } \seealso{ \code{\link{scanPhyloQTL}}, \code{\link{max.scanPhyloQTL}}, \code{\link{summary.scanPhyloQTL}}, \code{\link{plot.scanone}}, \code{\link{inferredpartitions}}, \code{\link{simPhyloQTL}}, \code{\link[graphics]{par}}, \code{\link[grDevices]{colors}} } \author{Karl W Broman, \email{broman@wisc.edu} } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \keyword{hplot} qtl/man/nmar.Rd0000644000176200001440000000142113355127045013054 0ustar liggesusers\name{nmar} \alias{nmar} \title{Determine the numbers of markers on each chromosome} \description{ Determine the number of markers on each chromosome in a cross or map object. } \usage{ nmar(object) } \arguments{ \item{object}{An object of class \code{cross} (see \code{\link{read.cross}} for details) or \code{map} (see \code{\link{sim.map}} for details).} } \value{ A vector with the numbers of markers on each chromosome in the input. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) nmar(fake.f2) map <- pull.map(fake.f2) nmar(map) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{summary.cross}}, \code{\link{nind}}, \code{\link{nchr}}, \code{\link{totmar}}, \code{\link{nphe}} } \keyword{print} qtl/man/ntyped.Rd0000644000176200001440000000154213355127045013426 0ustar liggesusers\name{ntyped} \alias{ntyped} \title{Number of genotypes} \description{ Count the number of genotypes for each individual or each marker in a cross. } \usage{ntyped(cross, what=c("ind","mar"))} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{what}{Indicates whether to count genotypes for each individual or each marker.} } \value{ A vector containing the number of genotypes for each individual or for each marker. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) # plot number of genotypes for each individual plot(ntyped(listeria)) # plot number of genotypes for each marker plot(ntyped(listeria, what="mar")) } \seealso{ \code{\link{nmissing}}, \code{\link{summary.cross}}, \code{\link{nind}}, \code{\link{totmar}} } \keyword{utilities} qtl/man/pull.geno.Rd0000644000176200001440000000241313355127045014024 0ustar liggesusers\name{pull.geno} \alias{pull.geno} \title{Pull out the genotype data from a cross} \description{ Pull out the genotype data from a cross object, as a single big matrix. } \usage{pull.geno(cross, chr)} \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} } \value{ A matrix of size n.ind x tot.mar. The raw genotype data in the input cross object, with the chromosomes pasted together. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(listeria) dat <- pull.geno(listeria) # image of the genotype data image(1:ncol(dat),1:nrow(dat),t(dat),ylab="Individuals",xlab="Markers", col=c("red","yellow","blue","green","violet")) abline(v=cumsum(c(0,nmar(listeria)))+0.5) abline(h=nrow(dat)+0.5) } \seealso{ \code{\link{pull.pheno}}, \code{\link{pull.map}} \code{\link{pull.draws}}, \code{\link{pull.genoprob}}, \code{\link{pull.argmaxgeno}} } \keyword{utilities} qtl/man/lodint.Rd0000644000176200001440000000265413355127045013421 0ustar liggesusers\name{lodint} \alias{lodint} \title{LOD support interval} \description{ Calculate a LOD support interval for a particular chromosome, using output from scanone. } \usage{lodint(results, chr, qtl.index, drop=1.5, lodcolumn=1, expandtomarkers=FALSE)} \arguments{ \item{results}{Output from \code{\link{scanone}}, or a qtl object as output from \code{\link{refineqtl}}.} \item{chr}{A chromosome ID (if input \code{results} are from \code{\link{scanone}} (should have length 1).} \item{qtl.index}{Numeric index for a QTL (if input \code{results} are from \code{\link{refineqtl}} (should have length 1).} \item{drop}{LOD units to drop to form the interval.} \item{lodcolumn}{An integer indicating which of the LOD score columns should be considered (if input \code{results} are from \code{\link{scanone}}).} \item{expandtomarkers}{If TRUE, the interval is expanded to the nearest flanking markers.} } \value{ An object of class \code{scanone} indicating the estimated QTL position and the approximate endpoints for the LOD support interval. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=c(1,4))} hyper <- calc.genoprob(hyper, step=0.5) out <- scanone(hyper, method="hk") lodint(out, chr=1) lodint(out, chr=4) lodint(out, chr=4, drop=2) lodint(out, chr=4, expandtomarkers=TRUE) } \seealso{ \code{\link{scanone}}, \code{\link{bayesint}} } \keyword{utilities} qtl/man/summary.scanPhyloQTL.Rd0000644000176200001440000000637313355127045016147 0ustar liggesusers\name{summary.scanPhyloQTL} \alias{summary.scanPhyloQTL} \title{Summarize the results a genome scan to map a QTL to a phylogenetic tree} \description{ Print the maximum LOD scores for each partition on each chromosome, from the results of \code{\link{scanPhyloQTL}}. } \usage{ \method{summary}{scanPhyloQTL}(object, format=c("postprob", "lod"), threshold, \dots) } \arguments{ \item{object}{An object output by the function \code{\link{scanPhyloQTL}}.} \item{format}{Indicates whether to provide LOD scores or approximate posterior probabilities; see Details below.} \item{threshold}{A threshold determining which chromosomes should be output; see Details below.} \item{\dots}{Ignored at this point.} } \details{ This function is used to report chromosomes deemed interesting from a one-QTL genome scan to map QTL to a phylogenetic tree (by \code{\link{scanPhyloQTL}}). For \code{format="lod"}, the output contains the maximum LOD score for each partition on each chromosome (which do not necessarily occur at the same position). The position corresponds to the peak location for the partition with the largest LOD score on that chromosome. The last column is the overall maximum LOD (across partitions) on that chromosome. The second-to-last column is the inferred partition (i.e., that with the largest LOD score. The third-to-last column is the difference between the LOD score for the best partition and that for the second-best. For \code{format="postprob"}, the final column contains the maximum LOD score across partitions. But instead of providing the LOD scores for each partition, these are converted to approximate posterior probabilities under the assumption of a single diallelic QTL on that chromosome: on each chromosome, we take \eqn{10^{LOD}}{10^LOD} for the partitions and rescale them to sum to 1. The \code{threshold} argument is applied to the last column (the maximum LOD score across partitions). } \value{ An object of class \code{summary.scanPhyloQTL}, to be printed by \code{print.summary.scanPhyloQTL}. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontrun{ # example map; drop X chromosome data(map10) map10 <- map10[1:19] # simulate data x <- simPhyloQTL(4, partition="AB|CD", crosses=c("AB", "AC", "AD"), map=map10, n.ind=150, model=c(1, 50, 0.5, 0)) # run calc.genoprob on each cross x <- lapply(x, calc.genoprob, step=2) # scan genome, at each position trying all possible partitions out <- scanPhyloQTL(x, method="hk") # maximum peak max(out, format="lod") # approximate posterior probabilities at peak max(out, format="postprob") # all peaks above a threshold for LOD(best) - LOD(2nd best) summary(out, threshold=1, format="lod") # all peaks above a threshold for LOD(best), showing approx post'r prob summary(out, format="postprob", threshold=3) # plot of results plot(out) } } \seealso{ \code{\link{scanPhyloQTL}}, \code{\link{plot.scanPhyloQTL}}, \code{\link{max.scanPhyloQTL}}, \code{\link{summary.scanone}}, \code{\link{inferredpartitions}}, \code{\link{simPhyloQTL}} } \references{ Broman, K. W., Kim, S., An\'e, C. and Payseur, B. A. Mapping quantitative trait loci to a phylogenetic tree. In preparation. } \keyword{print} qtl/man/addint.Rd0000644000176200001440000001111213355127045013360 0ustar liggesusers\name{addint} \alias{addint} \title{Add pairwise interaction to a multiple-QTL model} \description{ Try adding all possible pairwise interactions, one at a time, to a multiple QTL model. } \usage{ addint(cross, pheno.col=1, qtl, covar=NULL, formula, method=c("imp","hk"), model=c("normal", "binary"), qtl.only=FALSE, verbose=TRUE, pvalues=TRUE, simple=FALSE, tol=1e-4, maxit=1000, require.fullrank=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{pheno.col}{Column number in the phenotype matrix to be used as the phenotype. One may also give a character string matching a phenotype name. Finally, one may give a numeric vector of phenotypes, in which case it must have the length equal to the number of individuals in the cross, and there must be either non-integers or values < 1 or > no. phenotypes; this last case may be useful for studying transformations.} \item{qtl}{An object of class \code{qtl}, as output from \code{\link{makeqtl}}.} \item{covar}{A matrix or data.frame of covariates. These must be strictly numeric.} \item{formula}{An object of class \code{\link[stats]{formula}} indicating the model to be fitted. (It can also be the character string representation of a formula.) QTLs are referred to as \code{Q1}, \code{Q2}, etc. Covariates are referred to by their names in the data frame \code{covar}. If the new QTL is not included in the formula, its main effect is added.} \item{method}{Indicates whether to use multiple imputation or Haley-Knott regression.} \item{model}{The phenotype model: the usual model or a model for binary traits} \item{qtl.only}{If TRUE, only test QTL:QTL interactions (and not interactions with covariates).} \item{verbose}{If TRUE, will print a message if there are no interactions to test.} \item{pvalues}{If FALSE, p-values will not be included in the results.} \item{simple}{If TRUE, don't include p-values or sums of squares in the summary.} \item{tol}{Tolerance for convergence for the binary trait model.} \item{maxit}{Maximum number of iterations for fitting the binary trait model.} \item{require.fullrank}{If TRUE, give LOD=0 when covariate matrix in the linear regression is not of full rank.} } \details{ The formula is used to specified the model to be fit. In the formula, use \code{Q1}, \code{Q2}, etc., or \code{q1}, \code{q2}, etc., to represent the QTLs, and the column names in the covariate data frame to represent the covariates. We enforce a hierarchical structure on the model formula: if a QTL or covariate is in involved in an interaction, its main effect must also be included. } \section{Value}{ An object of class \code{addint}, with results as in the drop-one-term analysis from \code{\link{fitqtl}}. This is a data frame (given class \code{"addint"}, with the following columns: degrees of freedom (df), Type III sum of squares (Type III SS), LOD score(LOD), percentage of variance explained (\%var), F statistics (F value), and P values for chi square (Pvalue(chi2)) and F distribution (Pvalue(F)). Note that the degree of freedom, Type III sum of squares, the LOD score and the percentage of variance explained are the values comparing the full to the sub-model with the term dropped. Also note that for imputation method, the percentage of variance explained, the the F values and the P values are approximations calculated from the LOD score. Pairwise interactions already included in the input \code{formula} are not tested. } \references{ Haley, C. S. and Knott, S. A. (1992) A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. \emph{Heredity} \bold{69}, 315--324. Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}. and Churchill, G. A. (2001) A statistical framework for quantitative trait mapping. \emph{Genetics} \bold{159}, 371--387. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 8, 13) qp <- c(26, 56, 28) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") # try all possible pairwise interactions, one at a time addint(fake.f2, pheno.col=1, qtl, formula=y~Q1+Q2+Q3, method="hk") } \seealso{ \code{\link{addcovarint}}, \code{\link{fitqtl}}, \code{\link{makeqtl}}, \code{\link{scanqtl}}, \code{\link{refineqtl}}, \code{\link{addqtl}}, \code{\link{addpair}} } \keyword{models} qtl/man/plot.info.Rd0000644000176200001440000001035513355127045014035 0ustar liggesusers\name{plotInfo} \alias{plotInfo} \title{Plot the proportion of missing genotype information} \description{ Plot a measure of the proportion of missing information in the genotype data. } \usage{ plotInfo(x, chr, method=c("entropy","variance","both"), step=1, off.end=0, error.prob=0.001, map.function=c("haldane","kosambi","c-f","morgan"), alternate.chrid=FALSE, fourwaycross=c("all", "AB", "CD"), include.genofreq=FALSE, \dots) } \arguments{ \item{x}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{method}{Indicates whether to plot the entropy version of the information, the variance version, or both.} \item{step}{Maximum distance (in cM) between positions at which the missing information is calculated, though for \code{step=0}, it is are calculated only at the marker locations.} \item{off.end}{Distance (in cM) past the terminal markers on each chromosome to which the genotype probability calculations will be carried.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{fourwaycross}{For a phase-known four-way cross, measure missing genotype information overall (\code{"all"}), or just for the alleles from the first parent (\code{"AB"}) or from the second parent (\code{"CD"}).} \item{include.genofreq}{If TRUE, estimated genotype frequencies (from the results of \code{\link{calc.genoprob}} averaged across the individuals) are included as additional columns in the output.} \item{\dots}{Passed to \code{\link{plot.scanone}}.} } \details{ The entropy version of the missing information: for a single individual at a single genomic position, we measure the missing information as \eqn{H = \sum_g p_g \log p_g / \log n}{H = sum p[g] log p[g] / log n}, where \eqn{p_g}{p[g]} is the probability of the genotype \eqn{g}, and \eqn{n} is the number of possible genotypes, defining \eqn{0 \log 0 = 0}{0 log 0 = 0}. This takes values between 0 and 1, assuming the value 1 when the genotypes (given the marker data) are equally likely and 0 when the genotypes are completely determined. We calculate the missing information at a particular position as the average of \eqn{H} across individuals. For an intercross, we don't scale by \eqn{\log n} but by the entropy in the case of genotype probabilities (1/4, 1/2, 1/4). The variance version of the missing information: we calculate the average, across individuals, of the variance of the genotype distribution (conditional on the observed marker data) at a particular locus, and scale by the maximum such variance. Calculations are done in C (for the sake of speed in the presence of little thought about programming efficiency) and the plot is created by a call to \code{\link{plot.scanone}}. Note that \code{\link{summary.scanone}} may be used to display the maximum missing information on each chromosome. } \value{ An object with class \code{scanone}: a data.frame with columns the chromosome IDs and cM positions followed by the entropy and/or variance version of the missing information. } \examples{ data(hyper) \dontshow{hyper <- subset(hyper,chr=1:4)} plotInfo(hyper,chr=c(1,4)) # save the results and view maximum missing info on each chr info <- plotInfo(hyper) summary(info) plotInfo(hyper, bandcol="gray70") } \seealso{ \code{\link{plot.scanone}}, \code{\link{plotMissing}}, \code{\link{calc.genoprob}}, \code{\link{geno.table}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} \keyword{univar} qtl/man/plot.scanone.Rd0000644000176200001440000001077013355127045014531 0ustar liggesusers\name{plot.scanone} \alias{plot.scanone} \title{Plot LOD curves} \description{ Plot the LOD curve for a genome scan with a single-QTL model (the output of \code{\link{scanone}}). } \usage{ \method{plot}{scanone}(x, x2, x3, chr, lodcolumn=1, incl.markers=TRUE, xlim, ylim, lty=1, col=c("black","blue","red"), lwd=2, add=FALSE, gap=25, mtick = c("line", "triangle"), show.marker.names=FALSE, alternate.chrid=FALSE, bandcol=NULL, type="l", cex=1, pch=1, bg="transparent", bgrect=NULL, \dots) } \arguments{ \item{x}{An object of class \code{"scanone"}, as output by \code{\link{scanone}}.} \item{x2}{Optional second \code{scanone} object.} \item{x3}{Optional third \code{scanone} object.} \item{chr}{Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{lodcolumn}{An integer, or vector of 3 integers, indicating which of the LOD score columns should be plotted (generally this is 1).} \item{incl.markers}{Indicate whether to plot line segments at the marker locations.} \item{xlim}{Limits for x-axis (optional).} \item{ylim}{Limits for y-axis (optional).} \item{lty}{Line types; a vector of length 1 or 3.} \item{col}{Line colors; a vector of length 1 or 3.} \item{lwd}{Line widths; a vector of length 1 or 3.} \item{add}{If TRUE, add to a current plot.} \item{gap}{Gap separating chromosomes (in cM).} \item{mtick}{Tick mark type for markers (line segments or upward-pointing triangels).} \item{show.marker.names}{If TRUE, show the marker names along the x axis.} \item{alternate.chrid}{If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.} \item{bandcol}{Optional color for alternating bands to indicate chromosomes. If NULL (the default), no bands are plotted. A good choice might be \code{bandcol="gray70"}.} \item{type}{Type of plot (see \code{\link[graphics]{plot}}): for example, \code{type="l"} for lines or \code{type="p"} for points only, may be of length 1 or 3.} \item{cex}{Point size expansion, for example if \code{type="p"} is used. May be of length 1 or 3.} \item{pch}{Point type, for example if \code{type="p"} is used. See \code{\link[graphics]{points}}. May be of length 1 or 3.} \item{bg}{Background color for points, for example if \code{type="p"} and \code{pch=21} are used. See \code{\link[graphics]{points}}. May be of length 1 or 3.} \item{bgrect}{Optional background color for the rectangular plotting region.} \item{\dots}{Passed to the function \code{\link[graphics]{plot}} when it is called.} } \value{None.} \details{ This function allows you to plot the results of up to three genome scans against one another. Such objects must conform with each other. One may alternatively use the argument \code{add} to add the plot of an additional genome scan to the current figure, but some care is required: the same chromosomes should be selected, and the results must concern crosses with the same genetic maps. If a single \code{scanone} object containing multiple LOD score columns (for example, from different phenotypes) is input, up to three LOD curves may be plotted, by providing a vector in the argument \code{lodcolumn}. If multiple \code{scanone} objects are input (via \code{x}, \code{x2} and \code{x3}), the LOD score columns to be plotted are chosen from the corresponding element of the \code{lodcolumn} argument. } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2, chr=c(1,13))} fake.f2 <- calc.genoprob(fake.f2,step=2.5) out.mr <- scanone(fake.f2, method="mr") out.em <- scanone(fake.f2, method="em") plot(out.mr) plot(out.mr, out.em, chr=c(1,13), lty=1, col=c("violetred","black")) out.hk <- scanone(fake.f2, method="hk") plot(out.hk, chr=c(1,13), add=TRUE, col="slateblue") plot(out.hk, chr=13, show.marker.names=TRUE) plot(out.hk, bandcol="gray70") # plot points rather than lines plot(out.hk, bandcol="gray70", type="p", cex=0.3, pch=21, bg="slateblue") } \seealso{ \code{\link{scanone}}, \code{\link{summary.scanone}}, \code{\link[graphics]{par}}, \code{\link[grDevices]{colors}}, \code{\link{add.threshold}}, \code{\link{xaxisloc.scanone}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/c.scantwo.Rd0000644000176200001440000000253313355127045014023 0ustar liggesusers\name{c.scantwo} \alias{c.scantwo} \alias{cbind.scantwo} \title{Combine columns from multiple scantwo results} \description{ Concatenate the columns from different runs of \code{\link{scantwo}}. } \usage{ \method{c}{scantwo}(\dots) \method{cbind}{scantwo}(\dots) } \arguments{ \item{\dots}{A set of objects of class \code{scantwo}. (This can also be a list of \code{scantwo} objects.) These are the results from \code{\link{scantwo}} (with \code{n.perm=0}), generally run with different phenotypes or methods. All must conform with each other, meaning that \code{\link{calc.genoprob}} and/or \code{\link{sim.geno}} were run with the same values for \code{step} and \code{off.end} and with data having the same genetic map.} } \value{The concatenated input, as a \code{scantwo} object.} \details{ The aim of this function is to concatenate the results from multiple runs \code{\link{scantwo}}, generally for different phenotypes and/or methods. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) fake.bc <- calc.genoprob(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=18:19)} out2a <- scantwo(fake.bc, method="hk") out2b <- scantwo(fake.bc, pheno.col=2, method="hk") out2 <- c(out2a, out2b) } \seealso{ \code{\link{summary.scantwo}}, \code{\link{scantwo}}, \code{\link{c.scanone}} } \keyword{manip} qtl/man/plot.scantwoperm.Rd0000644000176200001440000000245413355127045015445 0ustar liggesusers\name{plot.scantwoperm} \alias{plot.scantwoperm} \title{Plot permutation results for a 2d, 2-QTL genome scan} \description{ Plot a histogram of the permutation results from a two-dimensional, two-QTL genome scan. } \usage{ \method{plot}{scantwoperm}(x, lodcolumn=1, include_rug=TRUE, \dots) } \arguments{ \item{x}{An object of class \code{"scantwoperm"}, as output by \code{\link{scantwo}} when \code{n.perm} is specified.} \item{lodcolumn}{This indicates the LOD score column to plot. This should be a single number between 1 and the number of LOD columns in the object input.} \item{include_rug}{If TRUE, include a call to \code{\link[graphics]{rug}}.} \item{\dots}{Passed to the function \code{\link[graphics]{hist}} when it is called.} } \value{None.} \details{ The function plots a histogram of the permutation results obtained by \code{\link{scantwo}} when \code{n.perm} is specified. Separate histograms are provided for the five LOD scores, \code{full}, \code{fv1}, \code{int}, \code{add}, and \code{av1}. } \examples{ data(fake.bc) fake.bc <- calc.genoprob(fake.bc) operm2 <- scantwo(fake.bc, method="hk", n.perm=10) plot(operm2) } \seealso{ \code{\link{scantwo}}, \code{\link{summary.scantwoperm}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/plotModel.Rd0000644000176200001440000000467213355127045014071 0ustar liggesusers\name{plotModel} \alias{plotModel} \title{Plot a QTL model} \description{ Plot a graphical representation of a QTL model, with nodes representing QTL and line segments representing pairwise interactions. } \usage{ plotModel(qtl, formula, circrad.rel=0.25, circrad.abs, cex.name=1, chronly=FALSE, order, \dots) } \arguments{ \item{qtl}{A QTL object (as created by \code{\link{makeqtl}}) or vector of character strings indicating the names for the QTL. This is also allowed to be a list that contains a component named \code{"chr"} (and, optionally, components names \code{"pos"} and \code{"formula"}).} \item{formula}{Optional formula defining the QTL model. If missing, we look for an attribute \code{"formula"} to the input QTL object or a item named \code{"formula"} within the QTL object.} \item{circrad.rel}{Radius of the circles that indicate the QTL, relative to the distance between the circles.} \item{circrad.abs}{Optional radius of the circles that indicate the QTL; note that the plotting region will have x- and y-axis limits spanning 3 units.} \item{cex.name}{Character expansion for the QTL names.} \item{chronly}{If TRUE and a formal QTL object is given, only the chromosome IDs are used to identify the QTL.} \item{order}{Optional vector indicating a permutation of the QTL to define where they are to appear in the plot. QTL are placed around a circle, starting at the top and going clockwise.} \item{\dots}{Passed to the function \code{\link[graphics]{plot}}.} } %\details{ % %} \value{None.} \examples{ # plot a QTL model, using a vector of character strings to define the QTL plotModel(c("1","4","6","15"), formula=y~Q1+Q2+Q3*Q4) # plot an additive QTL model data(hyper) hyper <- calc.genoprob(hyper) qtl <- makeqtl(hyper, chr=c(1,4,6,15), pos=c(68.3,30,60,18), what="prob") plotModel(qtl) # include an interaction plotModel(qtl, formula=y~Q1+Q2+Q3*Q4) # alternatively, include the formula as an attribute to the QTL object attr(qtl, "formula") <- y~Q1+Q2+Q3*Q4 plotModel(qtl) # if formula given, the attribute within the object is ignored plotModel(qtl, y~Q1+Q2+Q3+Q4) # NULL formula indicates additive QTL model plotModel(qtl, NULL) # reorder the QTL in the figure plotModel(qtl, order=c(1,3,4,2)) # show just the chromosome numbers plotModel(qtl, chronly=TRUE) } \seealso{ \code{\link{stepwiseqtl}}, \code{\link{makeqtl}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/summary.scanoneboot.Rd0000644000176200001440000000212413355127045016126 0ustar liggesusers\name{summary.scanoneboot} \alias{summary.scanoneboot} \title{Bootstrap confidence interval for QTL location} \description{ Calculates a bootstrap confidence interval for QTL location, using the bootstrap results from \code{\link{scanoneboot}}. } \usage{ \method{summary}{scanoneboot}(object, prob=0.95, expandtomarkers=FALSE, \dots) } \arguments{ \item{object}{Output from \code{\link{scanoneboot}}.} \item{prob}{Desired coverage.} \item{expandtomarkers}{If TRUE, the interval is expanded to the nearest flanking markers.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{scanone}, indicating the position with the maximum LOD, and indicating endpoints for the estimated bootstrap confidence interval. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ \dontrun{data(fake.f2) fake.f2 <- calc.genoprob(fake.f2, step=1, err=0.001) bootoutput <- scanoneboot(fake.f2, chr=13, method="hk") summary(bootoutput)} } \seealso{ \code{\link{scanoneboot}}, \code{\link{plot.scanoneboot}}, \code{\link{lodint}}, \code{\link{bayesint}} } \keyword{utilities} qtl/man/replacemap.scantwo.Rd0000644000176200001440000000325013355127045015707 0ustar liggesusers\name{replacemap.scantwo} \alias{replacemap.scantwo} \title{Replace the genetic map in QTL mapping results with an alternate map} \description{ Replace the positions of LOD scores in output from \code{\link{scantwo}} with values based on an alternative map (such as a physical map), with pseudomarker locations determined by linear interpolation. } \usage{ \method{replacemap}{scantwo}(object, map) } \arguments{ \item{object}{An object of class \code{"scantwo"}, as output by the function \code{\link{scantwo}}.} \item{map}{A list containing the alternative genetic map. All chromosomes in \code{object} should have corresponding chromosomes in \code{map}, and markers must be in the same order in the two maps. There must be at least two markers on each chromosome in \code{map} that appear in \code{object}.} } \value{The input \code{object} with the positions of LOD scores revised to match those in the input \code{map}.} \details{ The positions of pseudomarkers are determined by linear interpolation between markers. In the case of pseudomarkers beyond the ends of the terminal markers on chromosomes, we use the overall lengths of the chromosome in \code{object} and \code{map} to determine the new spacing. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) \dontshow{hyper <- subset(hyper, chr=18:19)} origmap <- pull.map(hyper) newmap <- est.map(hyper) hyper <- replacemap(hyper, newmap) hyper <- calc.genoprob(hyper, step=0) out <- scantwo(hyper, method="hk") out.rev <- replacemap(out, origmap) } \seealso{ \code{\link[=replace.map]{replacemap.cross}}, \code{\link{est.map}}, \code{\link{replacemap.scanone}} } \keyword{manip} qtl/man/summary.scanone.Rd0000644000176200001440000002055013355127045015245 0ustar liggesusers\name{summary.scanone} \alias{summary.scanone} \title{Summarize the results of a genome scans} \description{ Print the rows of the output from \code{\link{scanone}} that correspond to the maximum LOD for each chromosome, provided that they exceed some specified thresholds. } \usage{ \method{summary}{scanone}(object, threshold, format=c("onepheno", "allpheno", "allpeaks", "tabByCol", "tabByChr"), perms, alpha, lodcolumn=1, pvalues=FALSE, ci.function=c("lodint", "bayesint"), \dots) } \arguments{ \item{object}{An object output by the function \code{\link{scanone}}.} \item{threshold}{LOD score thresholds. Only peaks with LOD score above this value will be returned. This could be a single number or (for formats other than \code{"onepheno"}) a threshold for each LOD score column. If \code{alpha} is specified, \code{threshold} should not be.} \item{format}{Format for the output. See Details, below.} \item{perms}{Optional permutation results used to derive thresholds or to calculate genome-scan-adjusted p-values. This must be consistent with the \code{object} input, in that it must have the same number of LOD score columns, though it can have just one column of permutation results, in which case they are reused for all LOD score columns in the \code{\link{scanone}} output, \code{object}. (These can also be permutation results from \code{\link{scantwo}}, which permutations for a one-dimensional scan.)} \item{alpha}{If perms are included, this is the significance level used to calculate thresholds for determining which peaks to pull out. If \code{threshold} is specified, \code{alpha} should not be.} \item{lodcolumn}{If \code{format="onepheno"}, this indicates the LOD score column to focus on. This should be a single number between 1 and the number of LOD columns in the object input.} \item{pvalues}{If TRUE, include columns with genome-scan-adjusted p-values in the results. This requires that \code{perms} be provided.} \item{ci.function}{For formats \code{"tabByCol"} and \code{"tabByChr"}, indicates the function to use to get approximate confidence intervals for QTL location.} \item{\dots}{For formats \code{"tabByCol"} and \code{"tabByChr"}, additional arguments are passed to the function indicated by \code{ci.function} (for example, \code{drop} for \code{\link{lodint}} or \code{prob} for \code{\link{bayesint}}, or \code{expandtomarkers} for either).} } \details{ This function is used to report loci deemed interesting from a one-QTL genome scan (by \code{\link{scanone}}). For \code{format="onepheno"}, we focus on a single LOD score column, indicated by \code{lodcolumn}. The single largest LOD score peak on each chromosome is extracted. If \code{threshold} is specified, only those peaks with LOD meeting the threshold will be returned. If \code{perms} and \code{alpha} are specified, a threshold is calculated based on the permutation results in \code{perms} for the significance level \code{alpha}. If neither \code{threshold} nor \code{alpha} are specified, the peak on each chromosome is returned. Again note that with this format, only the LOD score column indicated by \code{lodcolumn} is considered in deciding which chromosomes to return, but the LOD scores from other columns, at the position with maximum LOD score in the \code{lodcolumn} column, are also returned. For \code{format="allpheno"}, we consider all LOD score columns, and pull out the position, on each chromosome, showing the largest LOD score. The output thus may contain multiple rows for a chromosome. Here \code{threshold} may be a vector of LOD score thresholds, one for each LOD score column, in which case only those positions for which a LOD score column exceeded its threshold are given. If \code{threshold} is a single number, it is applied to all of the LOD score columns. If \code{alpha} is specified, it must be a single significance level, applied for all LOD score columns, and again \code{perms} must be specified, and these are used to calculate the LOD score threshold for the significance level \code{alpha}. For \code{format="allpeaks"}, the output will contain, for each chromosome, the maximum LOD score for each LOD score column, at the position at which it achieved its maximum. Thus, the output will contain no more than one row per chromosome, but will contain the position and maximum LOD score for each of the LOD score columns. The arguments \code{threshold} and \code{alpha} may be specified as for the \code{"allpheno"} format. The results for a chromosome are returned if at least one of the LOD score columns exceeded its threshold. For \code{format="tabByCol"}, there will be a separate table for each LOD score column, with a single peak per chromosome. Included are columns indicating chromosome, peak position, lower and upper limits of the confidence interval calculated via \code{\link{lodint}} or \code{\link{bayesint}}, and lod score. The output for \code{format="tabByChr"}, is similar to that of \code{format="tabByCol"}, but with results organized by chromosome rather than by LOD score column. If \code{pvalues=TRUE}, and \code{perms} is specified, genome-scan-adjusted p-values are calculated for each LOD score column, and there are additional columns in the output containing these p-values. In the case that X-chromosome specific permutations were performed (with \code{perm.Xsp=TRUE} in \code{\link{scanone}}), autosome- and X-chromosome specific thresholds and p-values are calculated by the method in Broman et al. (2006). } \value{ An object of class \code{summary.scanone}, to be printed by \code{print.summary.scanone}. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ \dontshow{set.seed(70377314)} data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=c(2,5,6))} fake.bc <- calc.genoprob(fake.bc, step=5) # genome scan by Haley-Knott regression out <- scanone(fake.bc, method="hk") # permutation tests \dontrun{operm <- scanone(fake.bc, method="hk", n.perm=1000) }\dontshow{operm <- scanone(fake.bc, method="hk", n.perm=100) } # peaks for all chromosomes summary(out) # results with LOD >= 3 summary(out, threshold=3) # the same, but also showing the p-values summary(out, threshold=3, perms=operm, pvalues=TRUE) # results with LOD meeting the 0.05 threshold from the permutation results summary(out, perms=operm, alpha=0.05) # the same, also showing the p-values summary(out, perms=operm, alpha=0.05, pvalues=TRUE) ##### summary with multiple phenotype results out2 <- scanone(fake.bc, pheno.col=1:2, method="hk") # permutations \dontrun{operm2 <- scanone(fake.bc, pheno.col=1:2, method="hk", n.perm=1000) }\dontshow{operm2 <- scanone(fake.bc, pheno.col=1:2, method="hk", n.perm=100) } # results with LOD >= 2 for the 1st phenotype and >= 1 for the 2nd phenotype # using format="allpheno" summary(out2, thr=c(2, 1), format="allpheno") # The same with format="allpeaks" summary(out2, thr=c(2, 1), format="allpeaks") # The same with p-values summary(out2, thr=c(2, 1), format="allpeaks", perms=operm2, pvalues=TRUE) # results with LOD meeting the 0.05 significance level by the permutations # using format="allpheno" summary(out2, format="allpheno", perms=operm2, alpha=0.05) # The same with p-values summary(out2, format="allpheno", perms=operm2, alpha=0.05, pvalues=TRUE) # The same with format="allpeaks" summary(out2, format="allpeaks", perms=operm2, alpha=0.05, pvalues=TRUE) # format="tabByCol" summary(out2, format="tabByCol", perms=operm2, alpha=0.05, pvalues=TRUE) # format="tabByChr", but using bayes intervals summary(out2, format="tabByChr", perms=operm2, alpha=0.05, pvalues=TRUE, ci.function="bayesint") # format="tabByChr", but using 99% bayes intervals summary(out2, format="tabByChr", perms=operm2, alpha=0.05, pvalues=TRUE, ci.function="bayesint", prob=0.99) } \seealso{ \code{\link{scanone}}, \code{\link{plot.scanone}}, \code{\link{max.scanone}}, \code{\link{subset.scanone}}, \code{\link{c.scanone}}, \code{\link{summary.scanoneperm}} \code{\link{c.scanoneperm}} } \references{ Broman, K. W., Sen, \if{latex}{\out{\'S}}\if{html}{\out{Ś}}\if{text}{S}, Owens, S. E., Manichaikul, A., Southard-Smith, E. M. and Churchill G. A. (2006) The X chromosome in quantitative trait locus mapping. \emph{Genetics}, \bold{174}, 2151--2158. } \keyword{print} qtl/man/convert.scanone.Rd0000644000176200001440000000156113355127045015231 0ustar liggesusers\name{convert.scanone} \alias{convert.scanone} \title{Convert output from scanone for R/qtl version 0.98} \description{ Convert the output from scanone from the format used in R/qtl version 0.97 and earlier to that used in version 0.98 and later. } \usage{ \method{convert}{scanone}(object, \dots) } \arguments{ \item{object}{Output from the function \code{\link{scanone}}, for R/qtl version 0.97 and earlier.} \item{\dots}{Ignored at this point.} } \value{ The same scanone output, but revised for use with R/qtl version 0.98 and later. } \details{ Previously, inter-marker locations were named as, for example, \code{loc7.5.c3}; these were changed to \code{c3.loc7.5}. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ \dontrun{out.new <- convert(out.old)} } \seealso{ \code{\link{scanone}}, \code{\link{convert.scantwo}} } \keyword{manip} qtl/man/subset.scantwoperm.Rd0000644000176200001440000000260313355127045015770 0ustar liggesusers\name{subset.scantwoperm} \alias{subset.scantwoperm} \alias{[.scantwoperm} \title{Subsetting two-dimensional permutation test results} \description{ Pull out results for a specified set LOD columns from permutation results from \code{\link{scantwo}}. } \usage{ \method{subset}{scantwoperm}(x, repl, lodcolumn, \dots) \method{[}{scantwoperm}(x, repl, lodcolumn) } \arguments{ \item{x}{Permutation results from \code{\link{scantwo}}, run with \code{n.perm}>0.} \item{repl}{A vector specifying which permutation replicates to keep or (if negative) omit. Ignored in case of X-chr specific permutations} \item{lodcolumn}{A vector specifying which LOD columns to keep or (if negative) omit. These should be between 1 and the number of LOD columns in the input \code{x}.} \item{\dots}{Ignored at this point.} } \value{The input \code{scantwo} permutation results, but with only the specified subset of the data.} \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.bc) \dontshow{fake.bc <- subset(fake.bc, chr=18:19)} fake.bc <- calc.genoprob(fake.bc, step=0) operm <- scantwo(fake.bc, method="hk", pheno.col=1:2, n.perm=5) operm2 <- subset(operm, lodcolumn=2) # alternatively operm2alt <- operm[,2] } \seealso{ \code{\link{summary.scantwoperm}}, \code{\link{scantwo}}, \code{\link{c.scantwoperm}}, \code{\link[=c.scantwoperm]{rbind.scantwoperm}} } \keyword{manip} qtl/man/mqmplotpermutations.Rd0000644000176200001440000000376213526005071016267 0ustar liggesusers\name{mqmplot.permutations} \alias{mqmplot.permutations} \title{Plot results from mqmpermutation} \description{ Plotting routine to display the results from a permutation QTL scan. (the output of \code{\link{mqmpermutation}}) } \usage{ mqmplot.permutations(permutationresult, \dots) } \arguments{ \item{permutationresult}{ \code{mqmmulti} object returned by \code{\link{mqmpermutation}} permutation analysis. } \item{\dots}{ Extra arguments passed to \code{\link{polyplot}}} } %\details{ % ~~ If necessary, more details than the description above ~~ %} \value{ No value returned (plotting routine) } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor , Rutger Brouwer } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ # Simulated F2 Population # QTL at chromosome 3 f2qtl <- c(3,15,1,0) # Mouse genetic map data(map10) \dontshow{map10 <- map10[1:3]} # Simulate a F2 Cross f2cross <- sim.cross(map10,f2qtl,n=100,type="f2") f2cross <- calc.genoprob(f2cross) \dontrun{# Permutations to obtain significance threshold f2result <- mqmpermutation(f2cross, n.perm=1000, method="permutation") }\dontshow{f2result <- mqmpermutation(f2cross, n.perm=2, batchsize=2, method="permutation")} # Plot results mqmplot.permutations(f2result) } \keyword{ hplot } qtl/man/nchr.Rd0000644000176200001440000000132413355127045013053 0ustar liggesusers\name{nchr} \alias{nchr} \title{Determine the number of chromosomes} \description{ Determine the number of chromosomes in a cross or map object. } \usage{ nchr(object) } \arguments{ \item{object}{An object of class \code{cross} (see \code{\link{read.cross}} for details) or \code{map} (see \code{\link{sim.map}} for details).} } \value{ The number of chromosomes in the input. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) nchr(fake.f2) map <- pull.map(fake.f2) nchr(map) } \seealso{ \code{\link{read.cross}}, \code{\link{plot.cross}}, \code{\link{summary.cross}}, \code{\link{nind}}, \code{\link{totmar}}, \code{\link{nmar}}, \code{\link{nphe}} } \keyword{print} qtl/man/calc.genoprob.Rd0000644000176200001440000000737613615343311014645 0ustar liggesusers\name{calc.genoprob} \alias{calc.genoprob} \title{Calculate conditional genotype probabilities} \description{ Uses the hidden Markov model technology to calculate the probabilities of the true underlying genotypes given the observed multipoint marker data, with possible allowance for genotyping errors. } \usage{ calc.genoprob(cross, step=0, off.end=0, error.prob=0.0001, map.function=c("haldane","kosambi","c-f","morgan"), stepwidth=c("fixed", "variable", "max")) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{step}{Maximum distance (in cM) between positions at which the genotype probabilities are calculated, though for \code{step = 0}, probabilities are calculated only at the marker locations.} \item{off.end}{Distance (in cM) past the terminal markers on each chromosome to which the genotype probability calculations will be carried.} \item{error.prob}{Assumed genotyping error rate used in the calculation of the penetrance Pr(observed genotype | true genotype).} \item{map.function}{Indicates whether to use the Haldane, Kosambi or Carter-Falconer map function when converting genetic distances into recombination fractions.} \item{stepwidth}{Indicates whether the intermediate points should with fixed or variable step sizes. We recommend using \code{"fixed"}; \code{"variable"} was included for the qtlbim package (\url{https://cran.r-project.org/src/contrib/Archive/qtlbim}). The \code{"max"} option inserts the minimal number of intermediate points so that the maximum distance between points is \code{step}.} } \details{ Let \eqn{O_k}{O[k]} denote the observed marker genotype at position \eqn{k}, and \eqn{g_k}{g[k]} denote the corresponding true underlying genotype. We use the forward-backward equations to calculate \eqn{\alpha_{kv} = \log Pr(O_1, \ldots, O_k, g_k = v)}{% a[k][v] = log Pr(O[1], \ldots, O[k], g[k] = v)} and \eqn{\beta_{kv} = \log Pr(O_{k+1}, \ldots, O_n | g_k = v)}{% b[k][v] = log Pr(O[k+1], \ldots, O[n] | g[k] = v)} We then obtain \eqn{Pr(g_k | O_1, \ldots, O_n) = \exp(\alpha_{kv} + \beta_{kv}) / s}{% Pr(g[k] | O[1], \ldots, O[n] = exp(a[k][v] + b[k][v]) / s} where \eqn{s = \sum_v \exp(\alpha_{kv} + \beta_{kv})}{% s = sum_v exp(a[k][v] + b[k][v])} In the case of the 4-way cross, with a sex-specific map, we assume a constant ratio of female:male recombination rates within the inter-marker intervals. } \value{ The input \code{cross} object is returned with a component, \code{prob}, added to each component of \code{cross$geno}. \code{prob} is an array of size [n.ind x n.pos x n.gen] where n.pos is the number of positions at which the probabilities were calculated and n.gen = 3 for an intercross, = 2 for a backcross, and = 4 for a 4-way cross. Attributes \code{"error.prob"}, \code{"step"}, \code{"off.end"}, and \code{"map.function"} are set to the values of the corresponding arguments, for later reference (especially by the function \code{\link{calc.errorlod}}). } \references{ Lange, K. (1999) \emph{Numerical analysis for statisticians}. Springer-Verlag. Sec 23.3. Rabiner, L. R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. \emph{Proceedings of the IEEE} \bold{77}, 257--286. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) \dontshow{fake.f2 <- subset(fake.f2,chr=18:19) }fake.f2 <- calc.genoprob(fake.f2, step=2, off.end=5) data(fake.bc) \dontshow{fake.bc <- subset(fake.bc,chr=18:19) }fake.bc <- calc.genoprob(fake.bc, step=0, off.end=0, err=0.01) } \seealso{ \code{\link{sim.geno}}, \code{\link{argmax.geno}}, \code{\link{calc.errorlod}} } \keyword{utilities} qtl/man/chrlen.Rd0000644000176200001440000000124713355127045013400 0ustar liggesusers\name{chrlen} \alias{chrlen} \title{Chromosome lengths in QTL experiment} \description{ Obtain the chromosome lengths in a \code{cross} or \code{map} object. } \usage{ chrlen(object) } \arguments{ \item{object}{An object of class \code{map} or of class \code{cross}.} } \value{ Returns a vector of chromosome lengths. If the cross has sex-specific maps, it returns a 2-row matrix with the two lengths for each chromosome. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) chrlen(fake.f2) map <- pull.map(fake.f2) chrlen(map) } \seealso{ \code{\link{summaryMap}}, \code{\link{pull.map}}, \code{\link{summary.cross}} } \keyword{print} qtl/man/summary.comparegeno.Rd0000644000176200001440000000200713576462636016130 0ustar liggesusers\name{summary.comparegeno} \alias{summary.comparegeno} \title{Print pairs of individuals with similar genotype data.} \description{ Prints a summary the output from \code{\link{comparegeno}} that includes pairs of individuals whose proportion of matching genotypes is above a chosen threshold. } \usage{ \method{summary}{comparegeno}(object, thresh=0.9, \dots) } \arguments{ \item{object}{An object of class \code{comparegeno}, the output of the function \code{\link{comparegeno}}.} \item{thresh}{Threshold on the proportion of matching genotypes.} \item{\dots}{Ignored at this point.} } \value{ A data frame with each row being a pair of individuals and columns including the individual identifiers (via \code{getid}, or just as numeric indexes) along with the proportion of matching genotypes. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) cg <- comparegeno(fake.f2) summary(cg, 0.7) } \seealso{ \code{\link{comparegeno}}, \code{\link{plot.comparegeno}} } \keyword{print} qtl/man/MQM.Rd0000644000176200001440000001303613526005101012542 0ustar liggesusers\name{MQM} \alias{MQM} \title{Introduction to Multiple QTL Model (MQM) mapping} \description{ Overview of the MQM mapping functions } %\usage{ %} \section{Introduction}{ % \input{"inst/doc/Sources/MQM/mqm/description.txt"} Multiple QTL Mapping (MQM) provides a sensitive approach for mapping quantititive trait loci (QTL) in experimental populations. MQM adds higher statistical power compared to many other methods. The theoretical framework of MQM was introduced and explored by Ritsert Jansen, explained in the `Handbook of Statistical Genetics' (see references), and used effectively in practical research, with the commercial `mapqtl' software package. Here we present the first free and open source implementation of MQM, with extra features like high performance parallelization on multi-CPU computers, new plots and significance testing. MQM is an automatic three-stage procedure in which, in the first stage, missing data is `augmented'. In other words, rather than guessing one likely genotype, multiple genotypes are modeled with their estimated probabilities. In the second stage important markers are selected by multiple regression and backward elimination. In the third stage a QTL is moved along the chromosomes using these pre-selected markers as cofactors, except for the markers in the window around the interval under study. QTL are (interval) mapped using the most `informative' model through maximum likelihood. A refined and automated procedure for cases with large numbers of marker cofactors is included. The method internally controls false discovery rates (FDR) and lets users test different QTL models by elimination of non-significant cofactors. % -----^^ inst/doc/Sources/MQM/mqm/description.txt ^^----- % \input{"inst/doc/Sources/MQM/mqm/advantages_Rd.txt"} R/qtl-MQM has the following advantages: \itemize{ \item Higher power to detect linked as well as unlinked QTL, as long as the QTL explain a reasonable amount of variation \item Protection against overfitting, because it fixes the residual variance from the full model. For this reason more parameters (cofactors) can be used compared to, for example, CIM \item Prevention of ghost QTL (between two QTL in coupling phase) \item Detection of negating QTL (QTL in repulsion phase)} % -----^^ inst/doc/Sources/MQM/mqm/advantages_Rd.txt ^^----- } \author{ Ritsert C Jansen; Danny Arends; Pjotr Prins; Karl W Broman \email{broman@wisc.edu} % \mqmauthors } \note{ % \input{"inst/doc/Sources/MQM/mqm/limitations.txt"} The current implementation of R/qtl-MQM has the following limitations: (1) MQM is limited to experimental crosses F2, BC, and selfed RIL, (2) MQM does not treat sex chromosomes differently from autosomal chromosomes - though one can introduce sex as a cofactor. Future versions of R/qtl-MQM may improve on these points. Check the website and change log (\url{https://github.com/kbroman/qtl/blob/master/NEWS.md}) for updates. % -----^^ inst/doc/Sources/MQM/mqm/limitations.txt ^^----- } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ % \input{"inst/doc/Sources/MQM/mqm/standard_example.txt"} data(map10) # Genetic map modeled after mouse # simulate a cross (autosomes 1-10) qtl <- c(3,15,1,0) # QTL model: chr, pos'n, add've & dom effects cross <- sim.cross(map10[1:10],qtl,n=100,missing.prob=0.01) # MQM crossaug <- mqmaugment(cross) # Augmentation cat(crossaug$mqm$Nind,'real individuals retained in dataset', crossaug$mqm$Naug,'individuals augmented\n') result <- mqmscan(crossaug) # Scan # show LOD interval of the QTL on chr 3 lodint(result,chr=3) % -----^^ inst/doc/Sources/MQM/mqm/standard_example.txt ^^----- } \references{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_references.txt"} \item Arends D, Prins P, Jansen RC. R/qtl: High-throughput multiple QTL mapping. \emph{Bioinformatics}, to appear \item Jansen RC, (2007) Quantitative trait loci in inbred lines. Chapter 18 of \emph{Handbook of Stat. Genetics} 3rd edition. John Wiley & Sons, Ltd. \item Jansen RC, Nap JP (2001), Genetical genomics: the added value from segregation. \emph{Trends in Genetics}, \bold{17}, 388--391. \item Jansen RC, Stam P (1994), High resolution of quantitative traits into multiple loci via interval mapping. \emph{Genetics}, \bold{136}, 1447--1455. \item Jansen RC (1993), Interval mapping of multiple quantitative trait loci. \emph{Genetics}, \bold{135}, 205--211. \item Swertz MA, Jansen RC. (2007), Beyond standardization: dynamic software infrastructures for systems biology. \emph{Nat Rev Genet.} \bold{3}, 235--243. \item Dempster, A. P., Laird, N. M. and Rubin, D. B. (1977) Maximum likelihood from incomplete data via the EM algorithm. \emph{J. Roy. Statist. Soc.} B, \bold{39}, 1--38. % -----^^ inst/doc/Sources/MQM/mqm/standard_references.txt ^^----- } } \keyword{models} qtl/man/fitstahl.Rd0000644000176200001440000001067013355127045013743 0ustar liggesusers\name{fitstahl} \alias{fitstahl} \title{Fit Stahl interference model} \description{ Fit the Stahl model for crossover inference (or the chi-square model, which is a special case). } \usage{ fitstahl(cross, chr, m, p, error.prob=0.0001, maxit=4000, tol=1e-4, maxm=15, verbose=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Optional vector indicating the chromosomes to consider. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding \code{-} to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.} \item{m}{Interference parameter (a non-negative integer); if unspecified, this is estimated.} \item{p}{The proportion of chiasmata coming from the no interference mechanism in the Stahl model (0 <= p <= 1). p=0 gives the chi-square model. If unspecified, this is estimated.} \item{error.prob}{The genotyping error probability. If = NULL, it is estimated.} \item{maxit}{Maximum number of iterations to perform.} \item{tol}{Tolerance for determining convergence.} \item{maxm}{Maximum value of m to consider, if m is unspecified.} \item{verbose}{Logical; indicates whether to print tracing information.} } \details{ This function is currently only available for backcrosses and intercrosses. The Stahl model of crossover interference (of which the chi-square model is a special case) is fit. In the chi-square model, points are tossed down onto the four-strand bundle according to a Poisson process, and every \eqn{(m+1)}st point is a chiasma. With the assumption of no chromatid interference, crossover locations on a random meiotic product are obtained by thinning the chiasma process. The parameter \eqn{m} (a non-negative integer) governs the strength of crossover interference, with \eqn{m=0} corresponding to no interference. In the Stahl model, chiasmata on the four-strand bundle are a superposition of chiasmata from two mechanisms, one following a chi-square model and one exhibiting no interference. An additional parameter, \eqn{p}, gives the proportion of chiasmata from the no interference mechanism. If all of \code{m}, \code{p}, and \code{error.prob} are specified, any of them with length > 1 must all have the same length. If \code{m} is unspecified, we do a grid search starting at 0 and stop when the likelihood decreases (thus assuming a single mode), or \code{maxm} is reached. } \value{ A matrix with four columns: m, p, error.prob, and the log likelihood. If specific values for m, p, error.prob are provided, the log likelihood for each set are given. If some are left unspecified, the maximum likelihood estimates are provided in the results. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ \dontshow{set.seed(12201969)} # Simulate genetic map: one chromosome of length 200 cM with # a 2 cM marker spacing mymap <- sim.map(200, 51, anchor.tel=TRUE, include.x=FALSE, sex.sp=FALSE, eq.spacing=TRUE) # Simulate data under the chi-square model, no errors mydata <- sim.cross(mymap, n.ind=250, type="bc", error.prob=0, m=3, p=0) # Fit the chi-square model for specified m's \dontrun{output <- fitstahl(mydata, m=1:5, p=0, error.prob=0) }\dontshow{output <- fitstahl(mydata, m=1, p=0, error.prob=0,tol=0.001)} plot(output$m, output$loglik, lwd=2, type="b") # Find the MLE of m in the chi-square model \dontrun{mle <- fitstahl(mydata, p=0, error.prob=0)} \dontrun{ # Simulate data under the Stahl model, no errors mydata <- sim.cross(mymap, n.ind=250, type="bc", error.prob=0, m=3, p=0.1) # Find MLE of m for the Stahl model with known p mle.stahl <- fitstahl(mydata, p=0.1, error.prob=0) # Fit the Stahl model with unknown p and m, # get results for m=0, 1, 2, ..., 8 output <- fitstahl(mydata, m=0:8, error.prob=0) plot(output$m, output$loglik, type="b", lwd=2)} } \references{ Armstrong, N. J., McPeek, M. J. and Speed, T. P. (2006) Incorporating interference into linkage analysis for experimental crosses. \emph{Biostatistics} \bold{7}, 374--386. Zhao, H., Speed, T. P. and McPeek, M. S. (1995) Statistical analysis of crossover interference using the chi-square model. \emph{Genetics} \bold{139}, 1045--1056. } \seealso{ \code{\link{est.map}}, \code{\link{sim.cross}}} \keyword{models} qtl/man/plot.comparegeno.Rd0000644000176200001440000000221713576462636015414 0ustar liggesusers\name{plot.comparegeno} \alias{plot.comparegeno} \title{Plot genotype comparison} \description{ Plot the results of the comparison of all pairs of individuals' genotypes. A histogram of the proportion of matching genotypes, with tick marks at individual values below, via \code{\link[graphics]{rug}}. } \usage{ \method{plot}{comparegeno}(x, breaks=NULL, main="", xlab="Proportion matching genotypes", \dots) } \arguments{ \item{x}{An object of class \code{"comparegeno"}, as produced by \code{\link{comparegeno}}.} \item{breaks}{Passed to \code{\link[graphics]{hist}}, with the default \eqn{2 \sqrt{n}} where \eqn{n} is the number of pairs of individuals.} \item{main}{Title for the plot.} \item{xlab}{x-axis label for the plot.} \item{\dots}{Passed to \code{\link{hist}}.} } \value{None.} \details{ Creates a histogram with \code{\link[graphics]{hist}} with ticks at individual values using \code{\link[graphics]{rug}}. } \examples{ data(fake.f2) cg <- comparegeno(fake.f2) plot(cg) } \seealso{ \code{\link{comparegeno}}, \code{\link{summary.comparegeno}} } \author{Karl W Broman, \email{broman@wisc.edu} } \keyword{hplot} qtl/man/groupclusteredheatmap.Rd0000644000176200001440000000440713526005242016527 0ustar liggesusers\name{groupclusteredheatmap} \alias{groupclusteredheatmap} \title{Retrieving groups of traits after clustering} \description{ Retrieving groups of clustered traits from the output of mqmplot.clusteredheatmap. } \usage{ groupclusteredheatmap(cross, clusteredheatmapresult, height) } \arguments{ \item{cross}{ An object of class \code{cross}. See \code{\link{read.cross}} for details. % \crossobject } \item{clusteredheatmapresult}{ Resultint dendrogram object from \code{\link{mqmplot.clusteredheatmap}} } \item{height}{ Height at which to 'cut' the dendrogram, a higher cut-off gives less but larger groups. Height represents the maximum distance between two traits clustered together using hclust. the 'normal' behaviour of bigger groups when using a higher heigh cut-off depends on the tree stucture and the amount of traits clustered using \code{\link{mqmplot.clusteredheatmap}} } } \value{ A list containing groups of traits which were clustered together with a distance less that \code{height} } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ data(multitrait) \dontshow{multitrait <- subset(multitrait, chr=1:2, ind=!apply(multitrait$pheno, 1, function(a) any(is.na(a)))) multitrait$pheno <- multitrait$pheno[,1:3]} multitrait <- fill.geno(multitrait) # impute missing genotype data result <- mqmscanall(multitrait, logtransform=TRUE) cresults <- mqmplot.clusteredheatmap(multitrait,result) groupclusteredheatmap(multitrait,cresults,10) } \keyword{utilities} qtl/man/c.cross.Rd0000644000176200001440000000252713355127045013501 0ustar liggesusers\name{c.cross} \alias{c.cross} \title{Combine data for QTL experiments} \description{ Concatenate the data for multiple QTL experiments. } \usage{ \method{c}{cross}(\dots) } \arguments{ \item{\dots}{A set of objects of class \code{cross}. See \code{\link{read.cross}} for details. These must all either be of the same cross type or be a combination of backcrosses and intercrosses. All crosses must have the same number of chromosomes and chromosome names, and the same marker orders and positions, though the set of markers need not be precisely the same.} } \value{ The concatenated input, as a \code{cross} object. Additional columns are added to the phenotype data indicating which cross an individual comes from; another column indicates cross type (0=BC, 1=intercross), if there are crosses of different types. The crosses are not required to have exactly the same set of phenotypes; phenotypes with the same names are assumed to be the same. If the crosses have different sets of markers, we interpolate marker order, but the cM positions of markers that are in common between crosses must be precisely the same in the different crosses. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) junk <- fake.f2 junk <- c(fake.f2,junk) } \seealso{ \code{\link{subset.cross}} } \keyword{manip} qtl/man/mqmplotsingletrait.Rd0000644000176200001440000000351013526005073016053 0ustar liggesusers\name{mqmplot.singletrait} \alias{mqmplot.singletrait} \title{Plot LOD curves of a multiple-QTL model} \description{ Plot the LOD curve for a genome scan for a single trait, with a multiple-QTL model (the output of \code{\link{mqmscan}}). } \usage{ mqmplot.singletrait(result, extended = 0 ,\dots) } \arguments{ \item{result}{ \code{\link{mqmscan}} result.} \item{extended}{ Extended plotting of the information content } \item{\dots}{ Extra arguments passed to \code{\link{plot.scanone}} } } \author{ Danny Arends \email{danny.arends@gmail.com} % \dannyauthor } \seealso{ \itemize{ % \input{"inst/doc/Sources/MQM/mqm/standard_seealso.txt"} \item The MQM tutorial: \url{https://rqtl.org/tutorials/MQM-tour.pdf} \item \code{\link{MQM}} - MQM description and references \item \code{\link{mqmscan}} - Main MQM single trait analysis \item \code{\link{mqmscanall}} - Parallellized traits analysis \item \code{\link{mqmaugment}} - Augmentation routine for estimating missing data \item \code{\link{mqmautocofactors}} - Set cofactors using marker density \item \code{\link{mqmsetcofactors}} - Set cofactors at fixed locations \item \code{\link{mqmpermutation}} - Estimate significance levels \item \code{\link{scanone}} - Single QTL scanning % -----^^ inst/doc/Sources/MQM/mqm/standard_seealso.txt ^^----- } } \examples{ #Simulated F2 Population f2qtl <- c(3,15,1,0) # QTL at chromosome 3 data(map10) # Mouse genetic map \dontshow{map10 <- map10[1:3]} f2cross <- sim.cross(map10,f2qtl,n=100,type="f2") # Simulate a F2 Cross f2cross <- mqmaugment(f2cross) f2result <- mqmscan(f2cross) # Do a MQM scan of the genome mqmplot.singletrait(f2result) # Use our fancy plotting routine } \keyword{ hplot } qtl/man/addmarker.Rd0000644000176200001440000000230513355127045014053 0ustar liggesusers\name{addmarker} \alias{addmarker} \title{Add a marker to a cross} \description{ Add a marker to a cross object. } \usage{ addmarker(cross, genotypes, markername, chr, pos) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{genotypes}{Vector of numeric genotypes.} \item{markername}{Marker name as character string.} \item{chr}{Chromosome ID as character string.} \item{pos}{Position of marker, as numeric value.} } \details{ Use this function with caution. It would be best to incorporate new data into a single file to be imported with \code{\link{read.cross}}. But if you have genotypes on one or two additional markers that you want to add, you might load them with \code{\link[utils]{read.csv}} and incorporate them with this function. } \value{ The input \code{cross} object with the single marker added. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # genotypes for new marker gi <- pull.geno(fill.geno(fake.f2))[,"D5M197"] # add marker to cross fake.f2 <- addmarker(fake.f2, gi, "D5M197imp", "5", 11) } \seealso{ \code{\link{pull.markers}}, \code{\link{drop.markers}} } \keyword{utilities} qtl/man/summary.qtl.Rd0000644000176200001440000000162413355127045014420 0ustar liggesusers\name{summary.qtl} \alias{summary.qtl} \title{Print summary of a QTL object} \description{ Print summary information about a \code{qtl} object. } \usage{ \method{summary}{qtl}(object, \dots) } \arguments{ \item{object}{An object of class \code{qtl}, created by \code{\link{makeqtl}}.} \item{\dots}{Ignored at this point.} } \value{ An object of class \code{summary.qtl}, which is just a data.frame containing the chromosomes, positions, and number of possible genotypes for each QTL. } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 6, 13) qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") summary(qtl) } \seealso{ \code{\link{makeqtl}} } \keyword{print} qtl/man/replaceqtl.Rd0000644000176200001440000000350013355127045014253 0ustar liggesusers\name{replaceqtl} \alias{replaceqtl} \title{Replace a QTL in a qtl object with a different position} \description{ This function replaces a QTL or QTLs in a qtl object with a different position. } \usage{ replaceqtl(cross, qtl, index, chr, pos, qtl.name, drop.lod.profile=TRUE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{qtl}{A qtl object, as created by \code{\link{makeqtl}}.} \item{index}{Numeric index indicating the QTL to be replaced.} \item{chr}{Vector (of same length as \code{index}) indicating the chromosomes for the new QTL.} \item{pos}{Vector (of same length as \code{index}) indicating the positions for the new QTL. If there is no marker or pseudomarker at a position, the nearest position is used.} \item{qtl.name}{Optional vector (of same length as \code{index}) of user-specified names for each new QTL, used in the drop-one-term ANOVA table in \code{\link{fitqtl}}. If unspecified, the names will be of the form \code{"Chr1@10"} for a QTL on Chromsome 1 at 10 cM.} \item{drop.lod.profile}{If TRUE, remove any LOD profiles from the object.} } \value{ The input \code{qtl} object, but with some QTL replaced by new ones. See \code{\link{makeqtl}} for details on the format. } \author{Karl W Broman, \email{broman@wisc.edu}} \examples{ data(fake.f2) # take out several QTLs and make QTL object qc <- c(1, 6, 13) qp <- c(25.8, 33.6, 18.63) fake.f2 <- subset(fake.f2, chr=qc) \dontshow{fake.f2 <- subset(fake.f2, ind=1:50)} fake.f2 <- calc.genoprob(fake.f2, step=2, err=0.001) qtl <- makeqtl(fake.f2, qc, qp, what="prob") qtl <- replaceqtl(fake.f2, qtl, 2, 6, 48.1) } \seealso{ \code{\link{makeqtl}}, \code{\link{fitqtl}}, \code{\link{dropfromqtl}}, \code{\link{addtoqtl}}, \code{\link{reorderqtl}} } \keyword{utilities} qtl/man/locateXO.Rd0000644000176200001440000000356413355127045013647 0ustar liggesusers\name{locateXO} \alias{locateXO} \title{Estimate locations of crossovers} \description{ Estimate the locations of crossovers for each individual on a given chromosome. } \usage{ locateXO(cross, chr, full.info=FALSE) } \arguments{ \item{cross}{An object of class \code{cross}. See \code{\link{read.cross}} for details.} \item{chr}{Chromosome to investigate (if unspecified, the first chromosome is considered). This should be a character string referring to a chromosome by name; numeric values are converted to strings.} \item{full.info}{If TRUE, output will include information on the left and right endpoints of the intervals to which recombination events are known, as well as the corresponding marker indices.} } \details{ For each individual we detemine the locations of obligate crossovers, and estimate their location to be at the midpoint between the nearest flanking typed markers. The function currently only works for a backcross, intercross, or recombinant inbred line. } \value{ A list with one component per individual. Each component is either NULL or is a numeric vector with the estimated crossover locations. If \code{full.info=TRUE}, in place of a numeric vector with estimated locations, there is a matrix that includes those locations, the left and right endpoints of the intervals to which crossovers can be placed, the marker indices corresponding to those endpoint, and genotype codes for the genotypes to the left and right of each crossover. The final column indicates the number of typed markers between the current crossover and the next one (useful for identifying potential genotyping errors). } \author{Karl W Broman, \email{broman@wisc.edu} } \examples{ data(hyper) xoloc <- locateXO(hyper, chr=4) table(sapply(xoloc, length)) } \seealso{ \code{\link{countXO}}, \code{\link{cleanGeno}} } \keyword{utilities} qtl/DESCRIPTION0000644000176200001440000000176313615575545012607 0ustar liggesusersPackage: qtl Version: 1.45-11 Date: 2020-02-01 Title: Tools for Analyzing QTL Experiments Author: Karl W Broman and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from Danny Arends, Robert Corty, Timothee Flutre, Ritsert Jansen, Pjotr Prins, Lars Ronnegard, Rohan Shah, Laura Shannon, Quoc Tran, Aaron Wolen, and Brian Yandell Maintainer: Karl W Broman Description: Analysis of experimental crosses to identify genes (called quantitative trait loci, QTLs) contributing to variation in quantitative traits. Broman et al. (2003) . Depends: R (>= 2.14.0) Imports: parallel, graphics, stats, utils, grDevices Suggests: testthat License: GPL-3 URL: https://rqtl.org, https://github.com/kbroman/qtl BugReports: https://github.com/kbroman/qtl/issues Encoding: UTF-8 ByteCompile: true NeedsCompilation: yes Packaged: 2020-02-01 18:45:36 UTC; kbroman Repository: CRAN Date/Publication: 2020-02-02 16:40:05 UTC qtl/build/0000755000176200001440000000000013615343513012155 5ustar liggesusersqtl/build/vignette.rds0000644000176200001440000000034013615343513014511 0ustar liggesusersmQ @^k{;btasmwc֓gi|3߰'!d"1iAh`lwϙ(dWJ+,p2'`덈$Nū ~ b_m*cCR*oqhَ{쨤d؛aԇFsL `ЌB?S|,qtl/tests/0000755000176200001440000000000013615343520012216 5ustar liggesusersqtl/tests/listeria2.map0000644000176200001440000000241212770016226014613 0ustar liggesusers1 D10M44 1 D1M3 1 D1M75 1 D1M215 1 D1M309 1 D1M218 1 D1M451 1 D1M504 1 D1M113 1 D1M355 1 D1M291 1 D1M209 1 D1M155 2 D2M365 2 D2M37 2 D2M396 2 D2M493 2 D2M226 2 D2M148 3 D3M265 3 D3M51 3 D3M106 3 D3M257 3 D3M147 3 D3M19 4 D4M2 4 D4M178 4 D4M187 4 D4M251 5 D5M148 5 D5M232 5 D5M257 5 D5M83 5 D5M307 5 D5M357 5 D5M205 5 D5M398 5 D5M91 5 D5M338 5 D5M188 5 D5M29 5 D5M168 6 D6M223 6 D6M188 6 D6M284 6 D6M39 6 D6M254 6 D6M194 6 D6M290 6 D6M25 6 D6M339 6 D6M59_ 6 D6M201 6 D6M15 6 D6M294 7 D7M246 7 D7M145 7 D7M62 7 D7M126 7 D7M105 7 D7M259 8 D8M94 8 D8M339 8 D8M178 8 D8M242 8 D8M213 8 D8M156 9 D9M247 9 D9M328 9 D9M106 9 D9M269 9 D9M346 9 D9M55 9 D9M18 10 D10M298 10 D10M294 10 D10M42_ 10 D10M10 10 D10M233 11 D11M78 11 D11M20 11 D11M242 11 D11M356 11 D11M327 11 D11M333 12 D12M105 12 D12M46 12 D12M34 12 D12M5 12 D12M99 12 D12M150 13 D13M59 13 D13M88 13 D13M21 13 D13M39 13 D13M167 13 D13M99 13 D13M233 13 D13M106 13 D13M147 13 D13M226 13 D13M290 13 D13M151 14 D14M14 14 D14M115 14 D14M265 14 D14M266 15 D15M226 15 D15M100 15 D15M209 15 D15M144 15 D15M68 15 D15M239 15 D15M241 15 D15M34 16 D16M154 16 D16M4 16 D16M139 16 D16M86 17 D17M260 17 D17M66 17 D17M88 17 D17M129 18 D18M94 18 D18M58 18 D18M106 18 D18M186 19 D19M68 19 D19M117 19 D19M65 19 D19M10 X DXM186 X DXM64 qtl/tests/test_scanonevar.Rout.save0000644000176200001440000000576512770016226017242 0ustar liggesusers R version 3.1.1 (2014-07-10) -- "Sock it to Me" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.1.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(qtl) > data(map10) > map10 <- map10[1:2] > set.seed(8789993) > simcross <- sim.cross(map10, n.ind=125, type="bc", + model=rbind(c(1, 50, 1.5), c(2, 50, 0))) > simcross$pheno[,1] <- simcross$pheno[,1] + rnorm(nind(simcross), 0, 2*simcross$qtlgeno[,2]) > simcross <- calc.genoprob(simcross) > out <- scanonevar(simcross, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 58.6 1.65 107.5 0.841 2 2 62.2 1.17 51.8 5.817 > > #### > > data(fake.bc) > fake.bc <- fake.bc[1:2,1:150] # only chr 1 and 2, and first 100 individuals > fake.bc <- calc.genoprob(fake.bc, step=5) > out <- scanonevar(fake.bc, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 9.8 0.995 20 0.514 2 2 30.0 2.200 50 1.702 > covar <- fake.bc$pheno[,c("sex", "age")] > out <- scanonevar(fake.bc, mean_covar=covar, var_covar=covar, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 5 0.725 37.1 2.31 2 2 30 5.202 30.0 2.28 > > #########Simulate a vQTL on Chromosome 1######## > > chromo=1 > qtl.position=14 # 50 cM > N=nind(fake.bc) > a1<-fake.bc$geno[[chromo]]$prob[,,1] > y <- fake.bc$pheno$pheno1 > y <- y + rnorm(N,0,exp(a1[,qtl.position])) > out <- scanonevar(fake.bc, y, mean_covar=covar, var_covar=covar) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 45 0.784 70.0 5.781 2 2 0 0.368 21.8 0.672 > > out <- scanonevar(fake.bc, y, mean_covar=covar, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 45 0.746 70.0 6.012 2 2 0 0.380 72.1 0.617 > > out <- scanonevar(fake.bc, y, var_covar=covar, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 45.0 0.896 70.0 3.41 2 2 72.1 0.645 21.8 0.53 > > out <- scanonevar(fake.bc, y, + tol=0.01) > summary(out, format="allpeaks") chr pos neglogP_mean pos neglogP_disp 1 1 45.0 0.838 70.0 3.486 2 2 72.1 0.654 21.8 0.486 > > proc.time() user system elapsed 8.548 0.071 8.682 qtl/tests/gen.txt0000644000176200001440000007626012770016226013544 0ustar liggesusers3 3 3 2 2 2 3 3 2 2 2 2 2 2 1 1 0 1 1 3 3 3 3 3 3 1 2 1 2 1 1 2 2 2 2 2 0 2 2 2 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0 0 2 2 0 3 5 2 2 0 0 2 2 2 2 2 2 2 0 3 3 0 2 2 2 0 3 3 3 0 0 2 0 0 0 0 2 3 0 2 2 2 0 0 0 0 1 1 qtl/tests/test_tidyIO.R0000644000176200001440000000051312770016226014601 0ustar liggesuserslibrary(qtl) data(hyper) # write to tidy format write.cross(hyper, "tidy", "hyper_tidy") # read back in x <- read.cross("tidy", "", genfile="hyper_tidy_gen.csv", mapfile="hyper_tidy_map.csv", phefile="hyper_tidy_phe.csv", genotypes=c("BB", "BA", "AA")) # compare results comparecrosses(x, hyper) qtl/tests/map.txt0000644000176200001440000000345412770016226013543 0ustar liggesusers20 13 0.0100 0.2219 0.1508 0.0947 0.0280 0.1665 0.0069 0.0969 0.0077 0.0353 0.0769 0.0096 D10M44 D1M3 D1M75 D1M215 D1M309 D1M218 D1M451 D1M504 D1M113 D1M355 D1M291 D1M209 D1M155 6 0.2536 0.1828 0.1913 0.1000 0.1314 D2M365 D2M37 D2M396 D2M493 D2M226 D2M148 6 0.2857 0.1126 0.1333 0.0557 0.0759 D3M265 D3M51 D3M106 D3M257 D3M147 D3M19 4 0.1827 0.1562 0.2877 D4M2 D4M178 D4M187 D4M251f 13 0.0574 0.1154 0.0033 0.0400 0.0175 0.0513 0.0000 0.0197 0.0490 0.0562 0.0650 0.0979 D5M148 D5M232 D5M257 D5M83 D5M307 D5M357 D5M205 D5M398 D5M91 D5M338 D5M188 D5M29 D5M168 13 0.0755 0.0537 0.0672 0.0963 0.0324 0.0233 0.0358 0.0040 0.0352 0.0357 0.0036 0.0137 D6M233 D6M188 D6M284 D6M39 D6M254 D6M194 D6M290 D6M25 D6M339 D6M59_ D6M201 D6M15 D6M294 6 0.1795 0.1559 0.0609 0.1821 0.1175 D7M246 D7M145 D7M62 D7M126 D7M105 D7M259 6 0.0134 0.0995 0.1522 0.0582 0.1715 D8M94 D8M339 D8M178 D8M242 D8M213 D8M156 7 0.0421 0.1035 0.1235 0.0561 0.1213 0.0712 D9M247 D9M328 D9M106 D9M269 D9M346 D9M55 D9M18 5 0.1952 0.1366 0.0741 0.1093 D10M298 D10M294 D10M42_ D10M10 D10M233 6 0.1471 0.1108 0.1187 0.0363 0.2083 D11M78 D11M20 D11M242 D11M356 D11M327 D11M333 6 0.0615 0.1493 0.0745 0.1244 0.1240 D12M105 D12M46 D12M34 D12M5 D12M99 D12M150 12 0.0029 0.0912 0.0262 0.0000 0.0552 0.0206 0.0372 0.0126 0.0218 0.0000 0.0705 D13M59 D13M88 D13M21 D13M39 D13M167 D13M99 D13M233 D13M106 D13M147 D13M226 D13M290 D13M151 4 0.2224 0.0879 0.1249 D14M14 D14M115 D14M265 D14M266 8 0.1315 0.0531 0.0057 0.0454 0.0121 0.0612 0.1149 D15M226 D15M100 D15M209 D15M144 D15M68 D15M239 D15M241 D15M34 4 0.1617 0.0935 0.1508 D16M154 D16M4 D16M139 D16M86 4 0.1152 0.0558 0.2028 D17M260 D17M66 D17M88 D17M129 4 0.0068 0.1391 0.0377 D18M94 D18M58 D18M106 D18M186 4 0.1580 0.1589 0.1146 D19M68 D19M117 D19M65 D19M10 2 0.3447 DXM186 DXM64 qtl/tests/listeria2.csv0000644000176200001440000010216512770016226014637 0ustar liggesusersT264,D10M44,D1M3,D1M75,D1M215,D1M309,D1M218,D1M451,D1M504,D1M113,D1M355,D1M291,D1M209,D1M155,D2M365,D2M37,D2M396,D2M493,D2M226,D2M148,D3M265,D3M51,D3M106,D3M257,D3M147,D3M19,D4M2,D4M178,D4M187,D4M251,D5M148,D5M232,D5M257,D5M83,D5M307,D5M357,D5M205,D5M398,D5M91,D5M338,D5M188,D5M29,D5M168,D6M223,D6M188,D6M284,D6M39,D6M254,D6M194,D6M290,D6M25,D6M339,D6M59_,D6M201,D6M15,D6M294,D7M246,D7M145,D7M62,D7M126,D7M105,D7M259,D8M94,D8M339,D8M178,D8M242,D8M213,D8M156,D9M247,D9M328,D9M106,D9M269,D9M346,D9M55,D9M18,D10M298,D10M294,D10M42_,D10M10,D10M233,D11M78,D11M20,D11M242,D11M356,D11M327,D11M333,D12M105,D12M46,D12M34,D12M5,D12M99,D12M150,D13M59,D13M88,D13M21,D13M39,D13M167,D13M99,D13M233,D13M106,D13M147,D13M226,D13M290,D13M151,D14M14,D14M115,D14M265,D14M266,D15M226,D15M100,D15M209,D15M144,D15M68,D15M239,D15M241,D15M34,D16M154,D16M4,D16M139,D16M86,D17M260,D17M66,D17M88,D17M129,D18M94,D18M58,D18M106,D18M186,D19M68,D19M117,D19M65,D19M10,DXM186,DXM64 ,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,X,X 118.317,B,B,B,H,H,H,B,B,H,H,H,H,H,H,A,A,-,A,A,B,B,B,B,B,B,A,H,A,H,A,A,H,H,H,H,H,-,H,H,H,B,B,A,A,H,H,H,H,H,H,H,B,B,B,B,B,B,H,H,H,H,H,H,H,H,B,B,B,B,H,H,H,H,H,H,H,B,B,B,H,H,H,A,A,H,B,B,B,B,B,B,C,-,H,H,H,A,A,A,A,A,A,A,B,B,H,H,A,H,H,H,H,H,H,H,A,A,A,A,H,H,H,H,B,B,B,B,H,H,H,C,H,H 264,-,B,B,B,H,H,H,H,H,H,H,H,H,B,B,H,-,H,A,B,B,B,H,H,H,H,H,H,H,H,H,H,H,H,H,H,-,H,H,B,B,B,A,A,A,A,A,A,A,A,A,H,H,H,H,H,B,B,B,B,B,H,H,H,B,B,B,H,A,A,H,H,H,H,A,A,A,A,A,A,A,A,A,A,A,A,A,H,B,B,H,A,A,H,H,H,H,-,H,H,H,H,H,A,B,B,B,B,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-,B,C,H,H,-,-,H,H,H,H,H,H,H,-,B,B,-,H,H,H,-,B,B,B,-,-,H,-,-,-,-,H,B,-,H,H,H,-,-,-,-,A,A qtl/tests/testthat/0000755000176200001440000000000013615575545014074 5ustar liggesusersqtl/tests/testthat/test-stepwiseqtl.R0000644000176200001440000000235012770016226017543 0ustar liggesuserscontext("stepwiseqtl") test_that("stepwiseqtl works with X-chr-specific perms", { data(fake.f2) fake.f2 <- calc.genoprob(fake.f2) set.seed(17370120) operm1 <- scantwopermhk(fake.f2, n.perm=10, verbose=FALSE) set.seed(17370120) operm2 <- scantwopermhk(fake.f2, n.perm=10, perm.Xsp=TRUE, verbose=FALSE) pen1 <- calc.penalties(operm1) pen2 <- calc.penalties(operm2) out.sq1 <- stepwiseqtl(fake.f2, max.qtl=4, penalties=pen1, method="hk", verbose=FALSE) expect_equal(out.sq1$chr, c("1", "8", "13", "X")) expect_equal(out.sq1$pos, c(37.11, 61.20, 24.03, 14.20)) out.sq2 <- stepwiseqtl(fake.f2, max.qtl=4, penalties=pen2, method="hk", verbose=FALSE) expect_equal(out.sq2$chr, c("1", "13", "X")) expect_equal(out.sq2$pos, c(37.11, 24.03, 14.20)) out.sq3 <- stepwiseqtl(fake.f2, chr=1:19, max.qtl=4, penalties=pen2, method="hk", verbose=FALSE) expect_equal(out.sq3$chr, c("1", "13")) expect_equal(out.sq3$pos, c(37.11, 24.03)) pen2b <- calc.penalties(operm2, alpha=0.2) out.sq2b <- stepwiseqtl(fake.f2, max.qtl=6, penalties=pen2b, method="hk", verbose=FALSE) expect_equal(out.sq2b$chr, c("1", "8", "13", "X")) expect_equal(out.sq2b$pos, c(37.11, 61.20, 24.03, 14.20)) }) qtl/tests/testthat/test-fliporder.R0000644000176200001440000000244712770016226017154 0ustar liggesuserscontext("flip.order") test_that("flip.order, when applied twice, should get us back to the same thing", { data(hyper) # reduce size set.seed(53307443) hyper <- hyper[,sample(nind(hyper), 8)] hyper <- calc.genoprob(hyper, step=1) hyper <- sim.geno(hyper, step=10, n.draws=2) hyper <- argmax.geno(hyper, step=1) hyper <- calc.errorlod(hyper) hyperfl <- flip.order(hyper, chr=c(1, 4, 6, 15)) summary(hyperfl) hyperfl2 <- flip.order(hyperfl, chr=c(1, 4, 6, 15)) summary(hyperfl2) # having flipped twice, should be back to where we were # (except starting locations for each chromosome map) expect_null(comparecrosses(shiftmap(hyper), shiftmap(hyperfl2))) }) test_that("flip.order for 4-way cross", { data(fake.4way) # reduce size set.seed(36461124) fake.4way <- fake.4way[,sample(nind(fake.4way), 8)] fake.4way <- calc.genoprob(fake.4way, step=1) fake.4way.fl <- flip.order(fake.4way, chr=c(1, 4, 6, 15)) summary(fake.4way.fl) fake.4way.fl2 <- flip.order(fake.4way.fl, chr=c(1, 4, 6, 15)) summary(fake.4way.fl2) # having flipped twice, should be back to where we were # (except starting locations for each chromosome map) expect_null(comparecrosses(shiftmap(fake.4way), shiftmap(fake.4way.fl2))) }) qtl/tests/testthat/test-scantwoperm.R0000644000176200001440000000436312770016226017527 0ustar liggesuserscontext("scantwo perms") test_that("scantwo and scantwopermhk give same results", { data(hyper) hyper <- calc.genoprob(hyper[c(18,19,"X"),]) set.seed(92999298) out1 <- scantwo(hyper, method="hk", n.perm=3, verbose=FALSE) set.seed(92999298) out2 <- scantwopermhk(hyper, n.perm=3, verbose=FALSE) expect_equivalent(out1, out2) # X-chr-specific permutations set.seed(92999298) out1 <- scantwo(hyper, method="hk", n.perm=3, perm.Xsp=TRUE, verbose=FALSE) set.seed(92999298) out2 <- scantwopermhk(hyper, n.perm=3, perm.Xsp=TRUE, verbose=FALSE) expect_equivalent(out1, out2) }) test_that("summary.scantwo works with X-chr-specific perms", { data(hyper) set.seed(23615071) hyper <- calc.genoprob(fill.geno(hyper[c(18,19,"X"),])) # selected chr; imputed genotypes out2 <- scantwo(hyper, method="hk", verbose=FALSE) set.seed(17370120) operm1 <- scantwopermhk(hyper, n.perm=100, verbose=FALSE) set.seed(17370120) operm2 <- scantwopermhk(hyper, n.perm=100, perm.Xsp=TRUE, verbose=FALSE) # no significant pairs sum1 <- summary(out2, perms=operm1, alpha=0.05) sum2 <- summary(out2, perms=operm2, alpha=0.05) expect_equal(nrow(sum1), 0) expect_equal(nrow(sum2), 0) # p-values match expectation; not X-chr-specific sum1 <- summary(out2, perms=operm1, pvalues=TRUE) lodcol <- grep("^lod", names(sum1)) expect_equal(lodcol, c(5, 7, 9, 13, 15)) for(i in 1:5) expect_equal(sum1[,lodcol[i]+1], sapply(sum1[,lodcol[i]], function(a) mean(operm1[[i]] >= a))) # p-values match expectation; X-chr-specific sum2 <- summary(out2, perms=operm2, pvalues=TRUE) pairtype <- paste0(ifelse(sum2$chr1=="X", "X", "A"), ifelse(sum2$chr2=="X", "X", "A")) pairtype <- match(pairtype, c("AA", "AX", "XX")) L <- attr(operm2, "L") pow <- sum(L)/L lodcol <- grep("^lod", names(sum1)) expect_equal(lodcol, c(5, 7, 9, 13, 15)) for(j in 1:nrow(sum2)) { for(i in 1:5) { lod <- sum2[j,lodcol[i]] p <- sum2[j,lodcol[i]+1] nominal_p <- mean(operm2[[pairtype[j]]][[i]] >= lod) adj_p <- 1 - (1-nominal_p)^pow[pairtype[j]] expect_equivalent(p, adj_p) } } }) qtl/tests/testaugmentation.R0000644000176200001440000000132012770016226015731 0ustar liggesusers# Test augmentation with MQM # # Note: the full version of this test has moved to ./contrib/bin/rtest, # as it takes a long time to run. The full version can be run with: # # cd contrib/bin # rm CMakeCache.txt ; cmake -DTEST_R=TRUE # make testR library(qtl) set.seed(1000) version = mqm_version() cat("R/qtl=",version$RQTL) cat("R-MQM=",version$RMQM) cat("MQM=",version$MQM) testaugmentation <- function(cross, ...){ crossML <- mqmaugment(cross, ...) res1 <- mqmscan(crossML,logtransform=TRUE) list(res1) } data(listeria) r <- testaugmentation(listeria) if(!round(r[[1]][3,3],3)==0.307) stop("Listeria ML dataaugmentation error") cat("testaugmentation.R, tests succesfully run!") qtl/tests/phe.txt0000644000176200001440000000131612770016226013535 0ustar liggesusersT264 118.317 264 194.917 264 145.417 177.233 264 76.667 90.75 76.167 104.083 194.5 75.917 75.833 90.25 103.667 128.4 122.25 264 72.6 264 264 264 81.717 264 264 116.483 87.467 264 - 74.417 264 264 174.567 88.583 264 95 264 86.05 71.517 112.767 264 264 117.817 185.3 85.367 264 70.883 98.45 85.1 216.367 94.65 111.817 90.9 264 170.517 111.717 264 75.383 84.35 97.667 97.783 264 90.433 264 90.05 90.083 90.117 264 71.967 264 - 264 264 74.267 - - 264 264 264 109.867 264 264 96.017 136.417 168.25 120.7 114.55 94.033 67.683 93.833 93.867 139.867 117.933 77.8 117.833 264 77.733 93.183 77.633 77.55 264 117.433 93.067 99.867 82.333 163.75 82.017 264 264 91.283 140.767 81.733 75.667 76.483 116.467 116.517 139.55 264 116.2 qtl/tests/test_qtl.R0000644000176200001440000000531212770016226014202 0ustar liggesusers###################################################################### # # test_qtl.R # # copyright (c) 2009, Karl W Broman, Pjotr Prins # first written July 2009 # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License, # version 3, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. See the GNU # General Public License, version 3, for more details. # # A copy of the GNU General Public License, version 3, is available # at http://www.r-project.org/Licenses/GPL-3 # # Some basic regression/integration testing for some of the QTL mapping routines # # You can run it with: # # R --no-save --no-restore --no-readline --slave < ./tests/test_qtl.R ###################################################################### library(qtl) version = mqm_version() cat("R/qtl=",version$RQTL) cat("R-MQM=",version$RMQM) cat("MQM=",version$MQM) data(listeria) if (nind(listeria)!=120) stop("Number of individuals incorrect") # ---- a quick test of standard R/qtl scanone mr = scanone(listeria, method='mr') test = round(mr[15,]$lod*1000) cat(mr[15,]$lod,test) if (test != 966) stop("scanone_mr gives an incorrect result") # ---- a quick test of MQM for R/qtl augmentedcross <- mqmaugment(listeria, minprob=1.0, verbose=TRUE) nind = nind(augmentedcross) if (nind!=120) stop("Number of individuals incorrect: ",nind) result <- mqmscan(augmentedcross, logtransform=TRUE, outputmarkers = FALSE,off.end=0) test1 = round(result[5,5]*1000) test2 = round(max(result[,5]*1000)) cat("test1 = ",test1,"\n") cat("test2 = ",test2,"\n") if (test1 != 76) stop("MQM gives an unexpected result (1)") if (test2 != 5384) stop("MQM gives an unexpected result (2)") # ---- Test for negative markerlocations data(hyper) hyper <- fill.geno(hyper) #Mess up the markers by shifting temp <- shiftmap(hyper, offset=10^7) out.temp <- mqmscan(temp,verb=TRUE,off.end=10) if(!(rownames(out.temp)[3]=="D1Mit296")) stop("MQM something wrong with positive shifts in location") #Mess up the dataset by moving 1 marker infront of the chromosome hyper$geno[[1]]$map[1] <- -10 res <- mqmscan(hyper,verbose=T,off.end=100) if(any(is.na(res[,3]))) stop("MQM failed to handle negative locations correctly") if(!(rownames(res)[2]=="c1.loc-95")) stop("MQM something wrong with negative locations") #to -15 because off.end defaults to 10 cat("Version information:\n") cat("R/qtl = ",version$RQTL,"\n") cat("R-MQM = ",version$RMQM,"\n") cat("MQM = ",version$MQM,"\n\n") cat("test_qtl.R tests succesfully run!") qtl/tests/listeria.raw0000644000176200001440000004600712770016226014555 0ustar liggesusersdata type f2 intercross 120 133 1 symbols a=A h=H b=B c=C *D10M44 b--bhhhhabaaahahabhhhbah----haaabbbhhbbhbabhahhhh-b-abahhbhh bhhhahhhahhbh-b-h-aahbhhhhabahah---h---baa-b-abbhabhahbhahaa *D1M3 bbhbhhhhabhaahahabhhhbahhhhhhaaabbbhhbbbbabhahhhhhbb-b-h-bhh bhhhahhhahhbhhbhhhaahbhhhhabahahhhhhahbbaabbhhbbhabhahbhahaa *D1M75 bbhhhbhhhhhhhahbahahhhahhbhhhahhhbbbhbhbbabhaahahhbbhbhbhbhh bhhhhhhaahhbh-hahhhabahhhbabhh------------bb--bbb-----b--b-- *D1M215 hbhhhbhhbhhhhahbahhhaha-hhhaahhhabbbhbhbbaabhabahabbabhhhbhh bhhhhbhaahhbhhhahbbh-ahhhbhbahhhhhbhhhhahhbhhbbhbh-haabbbbah *D1M309 hhhhbbaabahhhahba-haahahhhha-hhbabbbhbabbaabhabahabbabbhabha bhbhhbhaahhbhhhhbbbhhahhhbabhhhhhabhhhaahhbhhahhbbahaabbbbah *D1M218 hhhhhbaabahhhahbahhaahahhhhahbhbabbbhbabbaabbabahabbabbhabha bhbhhbhaahhbhhhhbbbhbahhhbhbhhhhhab--haahhhhhahbbbahaahbbbah *D1M451 bhhbhbaahahhbahhhhbaahhhbhhahhahabbbhhabhahbbhbahabhabbbhhha bhbahbhhhhhhhhahbbhhbahhbbbhbhahhabhhhhaahhbaaabhbahaahbbbah *D1M504 bhhbhbaahahhbahhhhbaahhhbhhahhahabbbahabhahbbhbahabhabbbhhha bhbahbhhhhhhhhahbbhhbahhbbbhbaahhabhhhhaahhbaaabhbahaahbbbah *D1M113 hhbbhbhhhahhbahhhhbahhbhbhhahhahhbbbahabhaabbhbahabhabbbbhha hhbaahhhbhhahhahhbhababhhbbhbaahhabhhhhaabhhaahbhbahaahbbhah *D1M355 hhbbhbhhhahhbahhhhbahhbhbhhahhahhbbbahabhaabbhbahabhabbbbhha hhbaahhbbhhahhahhbhababhhbbhbaahhahhhhhaabhhaahbhbahaahbbhah *D1M291 hhbbhbhhhahhbahhhhb-hhbhbhhahhaahbbbahabhhabbhbhhabhabbbbhha hhhhah-bbhhahhahhbhababhhbbhbaahhah-hhh-abahaahbh-hhaahhbhah *D1M209 hhbbhbhh-a-h-ahahb-hh-bhbhaahhhahbhhahab-hah-h-hhhbhabbbbhha hhhhahhbbh-ahhahhbhababhhhbhbhaab-hhbhhaa-ahaahbhbhba-hhhhaa *D1M155 hhbbhbhhhahhbahahbbhhhbabhaahhhahb-----bhhahbhbhhhbhabbbbhha hhhhahhbbhhahhahhbhababhhhbbbhhabahhbhhaahahaahbhbhbaahhhhaa *D2M365 hbhabhbhaaabhhhbhbhhhh-hhahh--b-bbhabahaha-haahhaahaba-ahhhh hhba-bbhhhhhbbhbhhhbahhhbbhhhhhhhhhbhahhhhahbbbhhbhbaabhhaba *D2M37 abh-habhhaabhbhbbbhhhhahabhhahbhbhhhhbhaaahhahahhhhaahbhahhh babaabhhbahabhabhhhhhahhbabhhhhhaahbbaahbhhhbbhhbbabhhbhhabh *D2M396 ahhahabahhbhhbahhhahahababhbhhbbbhhhhbbaahhh-abhhhhhahbaah-h hhbahbhhbabahhabh-hhhahhbahhhhhbahahbhahbahhbbhhbbahhhhbbahh *D2M493 -----ab-hhbhhhah-haaahab----hhhbbahba-baah-a---------hb-habh hhbahb-h-a-a----hahhhhbhaahhahhbahhbbhhhhababbhabbhahbhbhhhh *D2M226 ah-h---ahhbhh-hahhaaaaabhhhah-hbhaababbh-hbaababhaabhhbabhb- hhbah-hbhahahhhahhhhhhbhaaaaahhhahhbbhhhhababbhahbhahbhbhhha *D2M148 aahhhahabhbhhhhahbhabahahahabhahhhhbabhhahbaabhbhahbhahabhbh hhbahbhbhahahhhahhbhhhbhaaaaahhhhhbhbhhhhabaabhahbhabhahhhha *D3M265 bbhbbbbhaahaabbhbaaabhahahahbhhhbahhhahaaabhahahhhhahbhhhhha hhhhaabhbhhhhaaahhhbhahbhhhhhhabhhhhhhaahahhaahabahhhhhhhhbh *D3M51 bbhhabhbhhahahb--aaahbhhahhabbahhhahhah-hahaahhhahhhbhhhhhhh hhhhhahbhhbhaaaabahbbaabaahahh------------------------------ *D3M106 bbhhabhhhhabahbhaahahbhhahhabbahhhhhhahhhhaaahhaahhhbahhhhab bhbahahbhhbhahhahahbbaabahhaaa------------------------------ *D3M257 bhhhabhhahhhahbhahaahbahahhahhhhahhhaahhhhaahhbaahhhbhhhhhab bhhahbhbbhbhahhahahhbahhahbaaaaahhhahhhahhbabah-hhhhh-ahhhhh *D3M147 bhbhabhhahhhabbhahh-hhabahhahhhhahbh---hhhaahhbaahhhbhhhahab bhhahbhbbhhhahhahhhhhahhahhaaaaahhhahhhahhbhbahhhhhhhaa-hhhb *D3M19 bhbhabhhaahhahbhahaahhabahhhhhhhahbhahahhhahbhbaahbbbhhhaaab bhhahbhbbhhhhbhahhhhhahhhhhhaa------------------------------ *D4M2 ahahahhhhbhhhhhbbaaahbbhhhahabhhhbhhahhhhbhhhhhahbhbhhhhhahh hhbbbhbhaabbaabhbahhhabbhhabbb------------------------------ *D4M178 hhahahh-hhhhhhhbhh-hhbbhhh-bhhhab-bbahhhbb-ah-hhh--h-hhhhhah hhbb-h-baahbbahhbah-hahb-ha-bb------------------------------ *D4M187 ahhhahhhhhhbhhbbhhhhhbbahbhhhbbabhbbahhbbbahhahhhhbabbahhhab hhbhhhbbhahbbhhbbhhbhahhhhabbb------------------------------ *D4M251 hhhhhhhbbhbbahbbhhahhbhbhbhhahhhbbbhabhhhbhbhahhahbabbhhhhab bahhhbbbbbhbhbhhhbhhbahahhbhahbahhahbhbhhhaaabhhahbahaabahhh *D5M148 aha--ahbhhhbhbahhhabhaa-bbhba-hahhbhbaabbhahbb--bhbhb-hhaaaa hahb-hhba-abhhh-a-hbbbahbbhhbahhhabahbbhhhhbabahbahhbhbhbhbh *D5M232 ahahaaabhhhbhbabhhahhaab-bhbahhahhbhbhabbhahbbaabhbhbbhhhaaa hahbhhbbhhhbbhhhaahhbbahbhhhbhhhhabhhb--h-hbaba-bahhb--hbhbh *D5M257 hhaaaaabhhhbhbhbhhahahabbhhbahaahhhhbhbbbhhhhbahbhbhbbahhaaa hhhbhhbbaaahbhhaaahabbahbabhbhhhhabhhbbhhahbababaahhbhhabhhh *D5M83 hhaaaaabhhhbhbhbhhahahabbhhbahaahhhhbhbbbhhhhbahbhbhbbahhaaa hhhbhhbbaaahbhhaaahabbahbabhbhhhhabhhbbhhahbhbabaahhbhhabhhh *D5M307 hhhaaaabahhbhbhbbhahahabhhhbahaahhhhbhbbbhhhhbahbhb-hbahhaha ahhbh-bbaaahbhhaaahabbahbabhbhhhhabhhbbhhaahhbabaahhb-hab-hh *D5M357 hhhaaaabahhbhbhbbhahahabhhhbahaahhhhbhbbbhhahbahbhbhhbahhahh ahhbhhbbaaahbhhahahabhahbabhbhhhhabhhbbhhaahhbabaahhbbhabhhh *D5M205 hhha-habahhbhbhbbhahahabhhhbahaahbhhbhbbbhhahbah--bhhbahhbbh ahhbhhbbahahbhaahahabhahbabhbbhhhbbhhbhhhaahhbabaahh-bhabhhh *D5M398 ------------------------hhhbahaahhhhbhbbbhhahbah--bhhbahhbbh ahhbhhbbahah-haahahabhahbabhbb------------------------------ *D5M91 hhhahhabahhbhbhbbhahahabhhhbahaahbhhbhbbbhhahbahbhbhhbahhbbb ahhbhhbhahahbhaahahabhahbabhbbhhhbhhhbhhhaahhbabaahhhbhabhhb *D5M338 hhhahhabahhbhbhbbhaaahhhahhbahaahbhhbhbbbhhahbahbbbhhbahhbbb ahhbhhhhabahbhaahahahhahbabhbbhhhbhhabhhhhahhbabahhhhbhahhhb *D5M188 hbhahhahahhbhbhbbhaaahhhahhbhaahhbhabhbbbhhaabahbbbahbahbbbb ahhbhhhhabhhbhhabahahhahbabhbbhhhbhhabhhhhahhbabahhhabhahbh- *D5M29 bbhah--h-hbb--hbbh-a--hhahhb---hhbha-hbbba-a-b-abb-aa-ahbbbb h-hbhh------bhhhbahahha-b-b-b------------------------------- *D5M168 bbaahhhhhhbbhhhhbhaaabahaahbhhahbbhabhbbbabaabaabhhaahahbbbh hbhbhhhhahhhbahhbaaahhbhbabbbbhhbbahaabhahhhhbabhhhbabhhhbhb *D6M223 aahhaahahhhhbhhhhahbbhhabbaahabhbhhbahahhbhbahhahhhhahbhhbhh haahabbhabbhhbhhhhhh-hbhahahhbhhhaahhhbabbaaahahbbbabaaabhbh *D6M188 aahhaahahhhhhbhhhahbhhhabbaahhhhbhhhabhhhbhbahhahhhhahbhhbhh haaaahhaabbhhbhhhhhhhhbbahahhh------------------------------ *D6M284 hahhaahahhhhhbhhbaabhhhahhaahhhhhhhhabhhhbhbahhahhhhahbhhhhh hhaaahhaahbhhbhhhhhhhhhbahahhhhhhahbhhbabhahhhahbhbahahabhbh *D6M39 hahhahhahhhhhbahbahbhhhahhaabhhhhhhhhbhhhbhbhhbahhhhahbbbhhh hhahahhahhbhhbhhhbhbhhhbahahhhhhhahbhhbahaahhhahbhbahahahabh *D6M254 habhabhhbhhhhbahbhhhhbhahhhhbhhhahhhhbhhhbhhhhbabhhhhhbbbhhh hhahhhhabhbhhbhbhbhbhhhbahahhahhhhabhhbahaahhhahhhbhhhhahhba *D6M194 habhabhhbhhhhbabbhhhhbhahhhhbhhhahhhhbhahbhhhhbahhhhhhbbbhbh hhahhhhabhbhhbhbhbhbhbabahahha------------------------------ *D6M290 habh-bh-bhahhba-bhhhhbhah-------a-hhhbhahb-ah-ba-h---h-bbhbh hh-hhhhabhbh---bhb-bhbabahahha------------------------------ *D6M25 habhhbbbhhahhbabbhhhhbhahhhhbhhbahhhhbhahh-ahhbahhbhhhbbbhbh hhahhhhabhbhhbabhbhbhbabahahhahhhhahhhbah-hhhaabhhbhh--hhhba *D6M339 habhhbbbhaahhbabbhhhhbhahhhhbhhbahhhhbhahhhahhbahhbhhhbbbhbh hhahhhhabhbhhbabhbhbhbabahahhahhhhahhhbahahhhaabhhbhhhbhhhba *D6M59_ bhbhhbbbhaahhbabhhhhhbhahhhhbhhbaahhhbhahhhahhbahhbhhhbbbhhh hhahhhhabhbhbbabhbhbhbabahahha------------------------------ *D6M201 bhbbhbbbhaahhbabhhbhhbhah-hhbhhbaahhhbhahhhahhbahhbhbhbbbhhh hhahhhahbhbhbbabhbhbhbahahahhahhahahhhhhhahhhaabahbhhhbhhhha *D6M15 bhbbhbbbhaahhbabhhbhhbhahhhhbh-bahhhhbhahhhahhbahhbhbhbbbhhh hhahhhahbhbhbbabhbhbhbahahahhahhahahhhhhhahhhaabahbhhhbhhhha *D6M294 bhbbhbbbhaahhbabhhbhhbhahhhhbhhbahhhhbhahhhahhbahhbhbhbbbhhh hhahhhahbhbhbbabhbhbhbahhhhhhhhhahahhhhhhahhhaabahbhbhbhhhha *D7M246 bhabbaahbhhhababahhhhhabhhhbbhbabhhhhbbhhhahbhbaahbaahhhhabb hhbbahhhhaahhbbhhhhahabhbaabab------------------------------ *D7M145 bbabhaahbaahhbhbhhhhhhhhhahhbababhhhhbbbbaaabhha--bahahhhabb hhbhhbhaha-hhbhhhhhhhhbabaabh-babhbahhhahbhbabhhhhhahhbhahaa *D7M62 hbabaaahbahhhhhbhhhbahbhhbhhbababahhbbbbbaaabhhaabbahhhhhahb hhbhhbhahhbhhhhhbhhhahhahahbhhbahhh-hhbahaahahhahh-ah-bhahbh *D7M126 hbabaahhbah-h-hbhbhbaab-hbhhbababahhbbbabaaabhh--bbahhahha-- habhhb-a----h-hhbhh-a-h-a-----ba-hhah-bab-ahaa-abhaahb-h-hbh *D7M105 hbabhahhbhhhhhbbbbahaabhbhhahhbhbahbbbbabaaabbhaabahahahbhhh bhhhhhbahhbbbabhbhhhabahahhhhhbahhhaahhhbaahaahabhhahbhbhhbh *D7M259 hbahhahbhh-hhhhbhbahhaha--b-hhb-b--bbbhahh-a--haa-ahaha-bhhh bhahhh----hbbahhbhhhahahahbhhh------------------------------ *D8M94 hhhbahbabbahhahbbhbbahahahhbbahbbhbhbahahahabhbhbbhhaahbhhhh hhhahahhbhbbhahhbbhhhhhhhhaahhhabhabbbhabbhhahbaabhbhaaabhhh *D8M339 hhhbahbabbahhahbbabbahahahbbbahbbhbhhahahahabhbhbbhhaahbhhhh bhhahahhbhbbhahhbbhhhhhhhhaahhhabhabbbh-bbhha-baabhbhaaabhhh *D8M178 hhhbabbh-bahhahbbabbabhhahbbbhhbbh-hhahahhhabhbhbbhhhaahahhh bhhhhahhbhbbha-hbhhhhhhh-aaahhhahhhbbbbabbhbhhbaahhbh-aahhaa *D8M242 hbbbabbhbhabhaabbahhhbhhaabbbhhhbhbhhahhahhabhaabbahhaahabbh bhhhhahbhhbhhahbhahhhhhhhaaaab------------------------------ *D8M213 bbhbabbhbhabhaabb-hhhbhhhabbbbhhbhbhaahhahhahhaahbahhaahabbh bbhhhahbahbhhahbhahhhhhbaaaaabhhh-hbbh-abbhbbabhahabhbaahhhh *D8M156 bbhhhhbhahahhhahhaa-bbhhbhhbhbh-b-bhahhhhh-a--aa-bah-a--abbh b-ab-a-ba-bh-ah-aahhbhab-ahhh-hbhhabbhbabahbbahhhhhbhbahhhhh *D9M247 bhbhbhbbhbhahbhhbaahhahhhhahhbahhhhhhhhbabhbhbbbahahhhhahhba haaabbbbhhhhahaabhhahaahahhbhbaahhbhahabhaabbhhhhhh-ahbbahba *D9M328 babhbhbbhbhahbhhbaahhahhhhabhhahhbbhhhhbabhbhbbbahahhhaaahba haaabbbbhhhbahaabhhahaahahhbhbaa-h--hh-b--aabhbhh-hbah---hba *D9M106 habhbhbbhbbahbahhaahhahhhhabhhahhbbhbhhbabbbhbbbhaahhhaahabh hhaabbbhbhhhhhhabhhahaahahhbhhhahhbahhhbhaahbhbbbhhbhhbbahba *D9M269 hhbhhhababbaabahhhhhahhhhhabh-aahbbhbhhhab-ba--bhaabhhaahah- h-aa-hbhbhhh-hhabbhabahhabhhhh------------------------------ *D9M346 hhbhhhababbaabahhhhhabhhhhabhhhahbbhbhbhhhbbabbb-------a---- ---a--------hhhabbhahahbabhhhhhahabhbbhbhhahbhbbbaabhhbbaaba *D9M55 hhbhhhabahbaabahabhaabhhhhabhhhahbbhbhbhhhabahbhhahbbhhhhaah baaahhbahhbahahahbaahahbabhhha------------------------------ *D9M18 hhbhhhahaabaahahabhaabhhhhahhbbahbbbbhbhbhabahbhhahhbhhhhaah baaahhbahhbahahahhaahhababbhha------------------------------ *D10M298 hahaahhahaabhbhhabhhhahhabhaaahbaabhhhahhhhahahhabbhbhhahhaa habhaaaahhhahahhhbba-haaahhaaahhhhabbhhbhhbhhabbahhhahbbahhh *D10M294 haahhhhabhhbahahabbbhahaabhahhhhhahbhhhaahhaaahhabbhbhhhhhha habhahaahbhahahbabhahhhhahaaaa------------------------------ *D10M42_ baabhhh-bhhbhhahaabbhahhabhhhhah-ahbhhhaahahahhh-hhhbhb-bhha babhhhhhhbhabaababhhhhhhahahaaabhhhhahbhhabaahhabhhhbhahhhbh *D10M10 baahhhhabhhbhhabaabbha-hhhhhhhahhhhbhbhaahahahhhaahabhbhbhha bhhhhhhhhba-haahabhhhhhhahabaaabhhhhhbahh-b-abhab-hh---h-h-- *D10M233 baahhhhabhabhhbbhabhhaabhhhhbaabhhhbhbbaahahhbhhaaahhhbbhhha bhhhbhhbhbhahaahabbhbhhhahabaaabhhhhhhabhabaahhhbhhhbhhhhhbh *D11M78 hahbbhahbaababhhahbhahhbhhhhhhaahhhhbaahhhbhhhhbaaahhahhhaab bbhhaahbbabhhhhhhbhbabhahbhahh------------------------------ *D11M20 hahbbbabbhhbahahahbbahhbhhabbha-hhhhbaahbhbhhaabaa-hbh-hhhhb bbhbaahbbhhhhhhhhbhbabahhahahhhbhbbhhaahbhhhhhhhbhhbhhahhhhh *D11M242 hahbbbahhhhbahaba-hbhbhbhhabbhhhbhhhhhahb-bbhaabaaahbhahhbhh bbhba-hbbhabhhhhhbhhabahbahhaa--hbbh-aah-bhhh-hhbhhb-hhhhhhb *D11M356 aahbbbhbhhhbahhhahhbhbhbbhabbhhhbhhhhhhhbhbbhaahhbaabbahhhhh bbhbhahhbhabbhhbhbhha-abbaahaa------------------------------ *D11M327 aahbbbhbhhhbahahahhbhbhbbhabhhhabhahhhhhbhbbhaahhbaabbaahhhh bbhbhahhbhabbhhbhhbhababbaahaaahhbbahaahhbahhhhabhhbhhbbbbhb *D11M333 hahhhbbhhbhhhaabbhhbhbhbhhabhhhabbahhhhhbhbbahhhhbhhbbaaaaha aahbhahhbhabbbbhhahhabhhbahhahhhabbah-hha-hbaahabhh-ahbbbhhb *D12M105 babaabbaaaahahhhaahbabahhahahbabhhbhhahaahbhabhhaabahaahaaba hbhbhbbhhabhbhbbhhahahhbhbbhah------------------------------ *D12M46 babaabhha-aaahhhaahbabahhahaahabhhbhhahaaab-abhhaa-aaaahaaha hbababbhhabhbhbbhhhhahhbhbbhah------------------------------ *D12M34 bhhhahahhaaaahhhaahbahahhahhahabbhhhhahhaahbhhhhaahaaaa-aaha ahahhbbhhh-hbabbhhhhaahhhhbhabahbhhhbhhhhbaaahhabhbhbahhhhbh *D12M5 bbhaahahhaha-hhhahhbahahhhhbahabbhahhahhaahbahbhaahaaaahhaha ahaahbbhbhbababbbbhhaaahhhbhabahbhh-bhbhh-aaahhab--hbahhh-bh *D12M99 bbhaahahhahaahhhahhhbhhhbhhbhhaabhhhhabhaahhahhhaahahaabhaha ahaahbbhbhbabahbbbbhaaahhhbahh------------------------------ *D12M150 bhbaahahhabhhbhhaha-bhhhbhhbhhaabhh-hhbbaa-hah-haabahaabha-h ahhabbbbbhbabahhbbbhaaaahbbabhahhhhhbahahaahhhbhbbbhhhbahahb *D13M59 caacccccaccacccaccccccccbbhhhaabahahahbabbhhhhhhcccacccccaaa cacccacacacccaahbhccacaacccaacccacaaacaccccccccaccccccaacccc *D13M88 -aahhhhhahh-hbhabbbhhh--bbhhhaabahahahbabbhhhhhhabbabhhhbaaa hababahahahbbhahbhhhahaahb-a-hhhahaaahahhhhhhhhahhhhhhaahhhh *D13M21 hhahh-bhahhaabaabbbhh-hhbbhhhaa-a-ah-hhab-b---hahbb-bah-b-a- b-b-b-aahaabbhahbhbaabaah-haahhhahaahhahhhhhaahahhhhhhaahahh *D13M39 hhahhhbaahhaabaabbbhhhhhbbbhhaahahahahhab-bhhahahb-abahhbaaa hhbbbaaahaabbhahbhbaahaahahaah------------------------------ *D13M167 hhahhhbaahhaabaabbbhhhhhbbbhhaahahahahhabhbhhahahbbabahhbaaa hhbbbaaahaabbhahbhbaahaahbhaa------------------------------- *D13M99 ahahhhbaahhaabahbbbahhhabhbhhaahahabahhabhbhhahabbbabahhbaaa hhbbbaaahaabbhahbhhahhaahahaahhhahaahaahabhhaaaahbahhhaahahh *D13M233 a-ahhhb-ahhaabahbbbahhhahhbh-aa-ahabahhabhbhhahabbbab--ab--a h-bbbaaahaahbhahbhh--ha-h-haahhhahaahaahabhbaaahhbahhhaa-ahh *D13M106 ahhhhhbaahhhabahbbhahhhahhbhhaahahabahhabhbhhhhabbhabahabaaa hhbbbaaahaahbhahbhhahhaahahaaaahahaahaahabhbaaahhbahhhahhhhh *D13M147 ahhhhhbaahhhabahbbhahhhahhbhhaahahabahhabhbhhhbabbhabahabhaa hhhbbaaahaahbhahbhhahhaahahaaaahahaahaahabhbaaahhbahhaahhhhh *D13M226 ahhhhhb-ahh-hbhhb-hahhhahhbhhaaaah---h--b-bhh-habbhabahab--- hh-bb-aa--ahbhahbhhahha-h--aaa-hahaah--habh---ahhbahh-hh-hhh *D13M290 ahhhhhbaahhhhbhhbbhahhhahhbhhaahahabahaabhbhhhhabbhabahabhaa hhhbbhaahaahbhahbhhahhaahahaaaahahaa-aahabhbaaahhbahhahhhhhh *D13M151 ahhhhhbhahhhhbhhbbhahahahhbhhabaahhbahaahhbbhhhabbhabaaabhhh hhhbbhaabaahbhahbhhahhaahahaaa-aabahhhaaabhbaaahhbahhhbhhhhh *D14M14 babhhaahbabbbhabahabbhahhbbbhhhhhhhhahahhahhh-bhahbbhhbhhbba hahahhhhhabb-hhbbbahhhhhaahhab------------------------------ *D14M115 bbbahahbbhhbbhaaahhhhaahhhhhhhhbhhhhahaa-a-a----hhbbhhbahhbb hahahhh---bbhbbbbbhhahahhahhabahbhbhahbahhhhbhbaahahhhhaahhb *D14M265 hbbahahhbbhbbhhaahhaaaahhhhhhhhbhbhhahaahabhbhaahabhhhbahhhb hahaahbbhhhbhbbhbbhhahahhahaabahbhbhah--hh-hbhhaa-ahhhhhahhb *D14M266 hbhhhahhbhhbbhhhhhbaahahhhhhhhhhhbhhahhahbbhbhhahabhhhhahhhb haahhhbbhhhhabbhbhbaahaahahaab------------------------------ *D15M226 abbhahabhhahah--hhhbbhhbhabhbhhahahbhh--hhhaaabhhhahahhahhhb hb--hhhhhbbaahhbahahhhbbba--hbabaahhhhhbhhhhabhabhabbbbahahh *D15M100 hhbbahabahahab-aahabbhabhhbbhhhahahhhhbbh-------hhabhhhaahhb abhb------bhhhhbahabhhh-ba---babaahhhhhbhahbabhhbhabbhbaaahh *D15M209 hhbhababahahabaaahabbhabhhbbhhhhhahhahbbhahaaahhhhhbhahaahbb abhbahbhhbb-hhhbhhabhhhbbahbhbhbaahhhhhbaahbabhhbhhbbhbaaahh *D15M144 hhbhababahahabaaahabbhabhhbbhhhhhahhahbbhahaaahhhhhbhahaahbb abhbahbhhbbhahhbhhabhhhbbahbhb------------------------------ *D15M68 hhbhabahahahabaaahabhhabhhbbhhhhhahhahbb-ahhaa-bhhhbhahaahbb abhbabbahbbhahhbhhabhahbbahbhbhbaaahhhhbaahbhb-hbhhbhhbaaahb *D15M239 hhbhabahahahhbaaahabhhabhhbbhhhhhahhahbbhahhaahbhhhbhahaahbb abhbabhahbbhahhbhhabhahbbahbhbhbaaahhhhbaahbhbhhbhhhhhbaaahb *D15M241 hhbaabahahahhbaaahahhhabbhbbhbhbhahhahbbhahhhah-aahbhahaahbb abhhabhaa-b-ahhbhhabhah-hah-hhhbhaahhhhbaaabhbhhbhhhhhbaaahb *D15M34 hhbaab-hahhhhb-a-h-hhhabbhhbbbhhhahaahhb-abbh-hbaab-babaahb- ahb-abbaa-b-ahhbhh-bbaahhahbah------------------------------ *D16M154 ahbaahbbhbbbbhhbbahhhaaahbahhaahhahhabhaahbbaabhhaahbabhhbbh hhbaaabhbhhahhbbaahhbhbahhbbaa------------------------------ *D16M4 ahbhbhhbbbbbhahbhabhhaaahbabhahhhaahhbhaahbbaabhbaahbabh-hhh hhbhaahbbhhhbabhahahhhbhbhbbaaahbaahhbaaahahbhbhhhbbhaahhhhh *D16M139 ahbhbhhbbbbbhahbhabaahaabbabhabhhaahbbhaahbbaabhbahhhahhhhhh hhbhahhbbhhh-ahaahahhabhhhabaa------------------------------ *D16M86 aabbbhhbbhhhhahhaabaahhabbabhhbhhaahbbhahhhbahbhbahahahahbhh habbhhhbbhhhhhhahhhabahhhhahaa------------------------------ *D17M260 hhaaahhhaahhhbhbaabhbhhhhhabhhhahhbahhbhabhhahhaabhhhaababhh hbhhhhabbhhhhhhhbbhabbbahbaabb------------------------------ *D17M66 hhahahahaabhhbhbahbhbhhhhhabhhhahabahhbhabhhhahaabhhhaahabbb hbhhhhhbhhhbhhhhhbbabhbbhbabhb------------------------------ *D17M88 hhahahahhabhhbhhah-hbhhhhbabhhhhhhbahhbhabhh-a-aabhbhhahabbb hhhhhahbhhhbhhhhhbbabhhbhbabhb---b---a-ah-h-hhabh-hahaa--bbh *D17M129 hhabhbhhhabhhbhhahhbh-hbbhahabbhahbahhbhabh-hahhahhbhhahahbb hhahbahbahhbbahahhbhhahbbbabhhbbhbaabhbahhabhhaa-hahhhahhhbb *D18M94 bbhaahhabaahhabbahhahhaahhaaahaabhbhhbhaabbaabbbhhhhahhbahbb hhhhbhbahahahhahhhbbaaahhhahah------------------------------ *D18M58 bbhaahhabaahhab--hhah-aahhhaahaabhbhhb-aabba-bbbhhhhahhbahbb hhhhbhbahahahhahhhbbaaahhhabahhbahh-aaahhhbbhhbhbhb-ahhbhhhh *D18M106 bhbaahb--aahh-b---------------------------------ahhbhhbbahah ahhh--bahahhh-ahhaabaaahhhabhhahabhbhaahh-hbhbbhhhbhhahbahhh *D18M186 bhbaahbhbaahhhbbabhahhaabhhaahaahhbhabhahbbhabbhahhbbhhbahah ahhhbhbahahhhaahbaabahahhhabhbahabhbhaahbhhbhbbhhhbhaahbabhh *D19M68 hahbhabhhhbaahhbhhbbhaahhbhbhhhhhbhhhhahbbbaahhhhbahahhhbaha babbhbhaahbhbhaahhabhhabaahhah------------------------------ *D19M117 hhhhaabhhbhaabhb--bbhaahbbhhhhhhhhahhhaa--baaahhabahahhhhahh haabhhaaahbhbbahhhabhhhbabhhaa------------------------------ *D19M65 hhahaaahhbhha-hbahbbhahhhhbhhhhhhhaahhbahbbahah-ahhaahahhahh haabahhaabbhhbabahabhhbbabbhah------------------------------ *D19M10 ccacccacacccacacaa-ccacccccccccccccaaccacccacaccaccaacaccacc caacaccaccccccccacaccaccaccccc------------------------------ *DXM186 hhhhaahaahahhaaaaaaahhaha-ahahhhhhaaaahaaaahhaahaaahhaahhaaa aahhhaahhhhhahhaahhhhhaaaaahaaaaaaaahhhaaaaahhaaaahhaaaaahha *DXM64 hhhaahh-hahhhhaahahhaaahahaahhhhhhhahahhhahhha--haahahahhhaa a-hhhaahhaahhhhhaahhahaaaahaahahaahhh-aaaaahhhhaaahhahaahhaa *T264 118.317 264 194.917 264 145.417 177.233 264 76.667 90.75 76.167 104.083 194.5 75.917 75.833 90.25 103.667 128.4 122.25 264 72.6 264 264 264 81.717 264 264 116.483 87.467 264 - 74.417 264 264 174.567 88.583 264 95 264 86.05 71.517 112.767 264 264 117.817 185.3 85.367 264 70.883 98.45 85.1 216.367 94.65 111.817 90.9 264 170.517 111.717 264 75.383 84.35 97.667 97.783 264 90.433 264 90.05 90.083 90.117 264 71.967 264 - 264 264 74.267 - - 264 264 264 109.867 264 264 96.017 136.417 168.25 120.7 114.55 94.033 67.683 93.833 93.867 139.867 117.933 77.8 117.833 264 77.733 93.183 77.633 77.55 264 117.433 93.067 99.867 82.333 163.75 82.017 264 264 91.283 140.767 81.733 75.667 76.483 116.467 116.517 139.55 264 116.2 qtl/tests/test_scanonevar.R0000644000176200001440000000256112770016226015544 0ustar liggesuserslibrary(qtl) data(map10) map10 <- map10[1:2] set.seed(8789993) simcross <- sim.cross(map10, n.ind=125, type="bc", model=rbind(c(1, 50, 1.5), c(2, 50, 0))) simcross$pheno[,1] <- simcross$pheno[,1] + rnorm(nind(simcross), 0, 2*simcross$qtlgeno[,2]) simcross <- calc.genoprob(simcross) out <- scanonevar(simcross, tol=0.01) summary(out, format="allpeaks") #### data(fake.bc) fake.bc <- fake.bc[1:2,1:150] # only chr 1 and 2, and first 100 individuals fake.bc <- calc.genoprob(fake.bc, step=5) out <- scanonevar(fake.bc, tol=0.01) summary(out, format="allpeaks") covar <- fake.bc$pheno[,c("sex", "age")] out <- scanonevar(fake.bc, mean_covar=covar, var_covar=covar, tol=0.01) summary(out, format="allpeaks") #########Simulate a vQTL on Chromosome 1######## chromo=1 qtl.position=14 # 50 cM N=nind(fake.bc) a1<-fake.bc$geno[[chromo]]$prob[,,1] y <- fake.bc$pheno$pheno1 y <- y + rnorm(N,0,exp(a1[,qtl.position])) out <- scanonevar(fake.bc, y, mean_covar=covar, var_covar=covar) summary(out, format="allpeaks") out <- scanonevar(fake.bc, y, mean_covar=covar, tol=0.01) summary(out, format="allpeaks") out <- scanonevar(fake.bc, y, var_covar=covar, tol=0.01) summary(out, format="allpeaks") out <- scanonevar(fake.bc, y, tol=0.01) summary(out, format="allpeaks") qtl/tests/listeria.map0000644000176200001440000000402012770016226014526 0ustar liggesusers1 D10M44 0.00 1 D1M3 1.00 1 D1M75 24.85 1 D1M215 40.41 1 D1M309 49.99 1 D1M218 52.80 1 D1M451 70.11 1 D1M504 70.81 1 D1M113 80.62 1 D1M355 81.40 1 D1M291 84.93 1 D1M209 92.68 1 D1M155 93.64 2 D2M365 0.00 2 D2M37 27.94 2 D2M396 47.11 2 D2M493 67.26 2 D2M226 77.40 2 D2M148 90.86 3 D3M265 0.00 3 D3M51 32.48 3 D3M106 43.94 3 D3M257 57.59 3 D3M147 63.19 3 D3M19 70.84 4 D4M2 0.00 4 D4M178 19.16 4 D4M187 35.32 4 D4M251 68.10 5 D5M148 0.00 5 D5M232 6.10 5 D5M257 19.22 5 D5M83 19.55 5 D5M307 23.72 5 D5M357 25.50 5 D5M205 30.90 5 D5M398 30.91 5 D5M91 32.91 5 D5M338 38.07 5 D5M188 44.02 5 D5M29 50.98 5 D5M168 61.88 6 D6M223 10.00 6 D6M188 18.19 6 D6M284 23.87 6 D6M39 31.09 6 D6M254 41.80 6 D6M194 45.15 6 D6M290 47.53 6 D6M25 51.25 6 D6M339 51.65 6 D6M59_ 55.30 6 D6M201 59.01 6 D6M15 59.37 6 D6M294 60.76 7 D7M246 0.00 7 D7M145 18.79 7 D7M62 34.91 7 D7M126 41.03 7 D7M105 60.11 7 D7M259 72.08 8 D8M94 0.00 8 D8M339 1.34 8 D8M178 11.42 8 D8M242 27.14 8 D8M213 32.99 8 D8M156 50.86 9 D9M247 0.00 9 D9M328 4.22 9 D9M106 14.72 9 D9M269 27.32 9 D9M346 32.96 9 D9M55 45.34 9 D9M18 52.50 10 D10M298 0.00 10 D10M294 24.75 10 D10M42_ 40.71 10 D10M10 48.73 10 D10M233 61.06 11 D11M78 0.00 11 D11M20 15.15 11 D11M242 26.42 11 D11M356 38.52 11 D11M327 42.16 11 D11M333 64.34 12 D12M105 0.00 12 D12M46 6.18 12 D12M34 21.58 12 D12M5 29.08 12 D12M99 41.80 12 D12M150 54.46 13 D13M59 0.00 13 D13M88 0.29 13 D13M21 10.37 13 D13M39 13.05 13 D13M167 13.06 13 D13M99 18.91 13 D13M233 21.01 13 D13M106 24.88 13 D13M147 26.16 13 D13M226 28.39 13 D13M290 28.40 13 D13M151 35.99 14 D14M14 0.00 14 D14M115 23.91 14 D14M265 32.79 14 D14M266 45.55 15 D15M226 0.00 15 D15M100 13.46 15 D15M209 18.79 15 D15M144 19.36 15 D15M68 23.91 15 D15M239 25.13 15 D15M241 31.28 15 D15M34 42.97 16 D16M154 0.00 16 D16M4 16.77 16 D16M139 26.23 16 D16M86 41.80 17 D17M260 0.00 17 D17M66 11.73 17 D17M88 17.34 17 D17M129 38.85 18 D18M94 0.00 18 D18M58 0.69 18 D18M106 16.98 18 D18M186 20.90 19 D19M68 0.00 19 D19M117 16.36 19 D19M65 32.83 19 D19M10 44.49 X DXM186 0.00 X DXM64 42.35 qtl/tests/test_mapqtl_io.R0000644000176200001440000000054712770016226015374 0ustar liggesusers# test input/output in mapqtl format library(qtl) data(fake.4way) write.cross(fake.4way, "mapqtl", "fake_4way_mapqtl") x <- read.cross("mapqtl", "", genfile="fake_4way_mapqtl.loc", phefile="fake_4way_mapqtl.qua", mapfile="fake_4way_mapqtl_female.map") x <- replace.map(x, pull.map(fake.4way)) comparecrosses(x, fake.4way) qtl/tests/test_io.R0000644000176200001440000000370212770016226014012 0ustar liggesusers###################################################################### # # TestIO/input.R # # copyright (c) 2002, Karl W Broman # last modified Feb, 2002 # first written Feb, 2002 # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License, # version 3, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. See the GNU # General Public License, version 3, for more details. # # A copy of the GNU General Public License, version 3, is available # at http://www.r-project.org/Licenses/GPL-3 # # This file contains code for testing the cross IO in R/qtl. # # Needed input files: # # gen.txt, map.txt, phe.txt [Karl's format] # listeria.raw, listeria.map [mapmaker format] # listeria.raw, listeria2.map [mapmaker format; no marker pos] # listeria.csv [csv format] # listeria2.csv [csv format; no marker pos] # ###################################################################### library(qtl) ############################## # Reading ############################## # Read CSV format csv <- read.cross("csv", "", "listeria.csv") csv2 <- read.cross("csv", "", "listeria2.csv", estimate=FALSE) # Read mapmaker format mm <- read.cross("mm", "", "listeria.raw", "listeria.map") mm2 <- read.cross("mm", "", "listeria.raw", "listeria2.map", estimate=FALSE) ############################## # Writing ############################## # Write in CSV format write.cross(csv, "csv", filestem="junk1") csv3 <- read.cross("csv", "", "junk1.csv", genotypes=c("AA","AB","BB","not BB","not AA")) comparecrosses(csv, csv3) # Write in mapmaker format write.cross(csv, "mm", filestem="junk2") # Cleanup unlink("junk1.csv") unlink("junk2.raw") unlink("junk2.prep") qtl/tests/test_io.Rout.save0000644000176200001440000000722612770016226015504 0ustar liggesusers R version 2.11.0 (2010-04-22) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ###################################################################### > # > # TestIO/input.R > # > # copyright (c) 2002, Karl W Broman > # last modified Feb, 2002 > # first written Feb, 2002 > # > # This program is free software; you can redistribute it and/or > # modify it under the terms of the GNU General Public License, > # version 3, as published by the Free Software Foundation. > # > # This program is distributed in the hope that it will be useful, > # but without any warranty; without even the implied warranty of > # merchantability or fitness for a particular purpose. See the GNU > # General Public License, version 3, for more details. > # > # A copy of the GNU General Public License, version 3, is available > # at http://www.r-project.org/Licenses/GPL-3 > # > # This file contains code for testing the cross IO in R/qtl. > # > # Needed input files: > # > # gen.txt, map.txt, phe.txt [Karl's format] > # listeria.raw, listeria.map [mapmaker format] > # listeria.raw, listeria2.map [mapmaker format; no marker pos] > # listeria.csv [csv format] > # listeria2.csv [csv format; no marker pos] > # > ###################################################################### > > library(qtl) > > ############################## > # Reading > ############################## > # Read CSV format > csv <- read.cross("csv", "", "listeria.csv") --Read the following data: 120 individuals 133 markers 1 phenotypes --Cross type: f2 Warning message: In fixXgeno.f2(cross, alleles) : --Assuming that all individuals are female. > csv2 <- read.cross("csv", "", "listeria2.csv", estimate=FALSE) --Read the following data: 120 individuals 133 markers 1 phenotypes --Cross type: f2 Warning message: In fixXgeno.f2(cross, alleles) : --Assuming that all individuals are female. > > # Read mapmaker format > mm <- read.cross("mm", "", "listeria.raw", "listeria.map") --Read the following data: Type of cross: f2 Number of individuals: 120 Number of markers: 133 Number of phenotypes: 1 --Cross type: f2 Warning message: In fixXgeno.f2(cross, alleles) : --Assuming that all individuals are female. > mm2 <- read.cross("mm", "", "listeria.raw", "listeria2.map", estimate=FALSE) --Read the following data: Type of cross: f2 Number of individuals: 120 Number of markers: 133 Number of phenotypes: 1 --Cross type: f2 Warning message: In fixXgeno.f2(cross, alleles) : --Assuming that all individuals are female. > > ############################## > # Writing > ############################## > # Write in CSV format > write.cross(csv, "csv", filestem="junk1") > csv3 <- read.cross("csv", "", "junk1.csv", genotypes=c("AA","AB","BB","not BB","not AA")) --Read the following data: 120 individuals 133 markers 3 phenotypes --Cross type: f2 > comparecrosses(csv, csv3) Crosses are identical. > > # Write in mapmaker format > write.cross(csv, "mm", filestem="junk2") > > # Cleanup > unlink("junk1.csv") > unlink("junk2.raw") > unlink("junk2.prep") > qtl/tests/test_tidyIO.Rout.save0000644000176200001440000000233012770016226016265 0ustar liggesusers R version 3.1.1 (2014-07-10) -- "Sock it to Me" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.1.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(qtl) > data(hyper) > > # write to tidy format > write.cross(hyper, "tidy", "hyper_tidy") > > # read back in > x <- read.cross("tidy", "", genfile="hyper_tidy_gen.csv", + mapfile="hyper_tidy_map.csv", phefile="hyper_tidy_phe.csv", + genotypes=c("BB", "BA", "AA")) --Read the following data: 250 individuals 174 markers 2 phenotypes --Cross type: bc > > # compare results > comparecrosses(x, hyper) Crosses are identical. > > proc.time() user system elapsed 0.687 0.052 0.726 qtl/tests/listeria.csv0000644000176200001440000010420512770016226014552 0ustar liggesusersT264,D10M44,D1M3,D1M75,D1M215,D1M309,D1M218,D1M451,D1M504,D1M113,D1M355,D1M291,D1M209,D1M155,D2M365,D2M37,D2M396,D2M493,D2M226,D2M148,D3M265,D3M51,D3M106,D3M257,D3M147,D3M19,D4M2,D4M178,D4M187,D4M251,D5M148,D5M232,D5M257,D5M83,D5M307,D5M357,D5M205,D5M398,D5M91,D5M338,D5M188,D5M29,D5M168,D6M223,D6M188,D6M284,D6M39,D6M254,D6M194,D6M290,D6M25,D6M339,D6M59_,D6M201,D6M15,D6M294,D7M246,D7M145,D7M62,D7M126,D7M105,D7M259,D8M94,D8M339,D8M178,D8M242,D8M213,D8M156,D9M247,D9M328,D9M106,D9M269,D9M346,D9M55,D9M18,D10M298,D10M294,D10M42_,D10M10,D10M233,D11M78,D11M20,D11M242,D11M356,D11M327,D11M333,D12M105,D12M46,D12M34,D12M5,D12M99,D12M150,D13M59,D13M88,D13M21,D13M39,D13M167,D13M99,D13M233,D13M106,D13M147,D13M226,D13M290,D13M151,D14M14,D14M115,D14M265,D14M266,D15M226,D15M100,D15M209,D15M144,D15M68,D15M239,D15M241,D15M34,D16M154,D16M4,D16M139,D16M86,D17M260,D17M66,D17M88,D17M129,D18M94,D18M58,D18M106,D18M186,D19M68,D19M117,D19M65,D19M10,DXM186,DXM64 ,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,X,X ,0,0.99675,24.84773,40.41361,49.99468,52.8002,70.11204,70.80642,80.62324,81.39623,84.93474,92.68394,93.64344,0,27.94171,47.10541,67.26185,77.39805,90.8563,0,32.47839,43.93803,57.59338,63.1854,70.839,0,19.16072,35.32086,68.10316,0,6.10396,19.22335,19.54883,23.71714,25.50009,30.89665,30.89765,32.90522,38.06807,44.02376,50.98471,61.87613,10,18.18754,23.87218,31.0941,41.79506,45.14579,47.5299,51.24736,51.65073,55.30478,59.00988,59.37089,60.76244,0,18.78851,34.91062,41.03048,60.11409,72.08424,0,1.33987,11.42091,27.14066,32.98625,50.86364,0,4.21823,14.71565,27.32417,32.95644,45.33567,52.50404,0,24.74745,40.70983,48.73004,61.05621,0,15.15394,26.42149,38.52145,42.16139,64.34481,0,6.17921,21.58051,29.08404,41.79569,54.45582,0,0.28675,10.36588,13.04983,13.05083,18.90884,21.01258,24.87531,26.15954,28.3927,28.3937,35.98707,0,23.90747,32.78679,45.55022,0,13.46195,18.79081,19.36473,23.91373,25.1265,31.27607,42.97207,0,16.76684,26.23135,41.79901,0,11.72823,17.33527,38.84807,0,0.6856,16.98386,20.8999,0,16.36398,32.82935,44.49432,0,42.34593 118.317,B,B,B,H,H,H,B,B,H,H,H,H,H,H,A,A,-,A,A,B,B,B,B,B,B,A,H,A,H,A,A,H,H,H,H,H,-,H,H,H,B,B,A,A,H,H,H,H,H,H,H,B,B,B,B,B,B,H,H,H,H,H,H,H,H,B,B,B,B,H,H,H,H,H,H,H,B,B,B,H,H,H,A,A,H,B,B,B,B,B,B,C,-,H,H,H,A,A,A,A,A,A,A,B,B,H,H,A,H,H,H,H,H,H,H,A,A,A,A,H,H,H,H,B,B,B,B,H,H,H,C,H,H 264,-,B,B,B,H,H,H,H,H,H,H,H,H,B,B,H,-,H,A,B,B,B,H,H,H,H,H,H,H,H,H,H,H,H,H,H,-,H,H,B,B,B,A,A,A,A,A,A,A,A,A,H,H,H,H,H,B,B,B,B,B,H,H,H,B,B,B,H,A,A,H,H,H,H,A,A,A,A,A,A,A,A,A,A,A,A,A,H,B,B,H,A,A,H,H,H,H,-,H,H,H,H,H,A,B,B,B,B,H,H,H,H,H,H,H,H,H,H,A,H,H,H,H,B,B,H,H,A,H,H,C,H,H 194.917,-,H,H,H,H,H,H,H,B,B,B,B,B,H,H,H,-,-,H,H,H,H,H,B,B,A,A,H,H,A,A,A,A,H,H,H,-,H,H,H,H,A,H,H,H,H,B,B,B,B,B,B,B,B,B,A,A,A,A,A,A,H,H,H,B,H,H,B,B,B,B,B,B,B,H,A,A,A,A,H,H,H,H,H,H,B,B,H,H,H,B,A,A,A,A,A,A,A,H,H,H,H,H,B,B,B,H,B,B,B,B,B,B,B,B,B,B,B,B,A,A,A,A,H,H,B,B,H,H,A,A,H,H 264,B,B,H,H,H,H,B,B,B,B,B,B,B,A,-,A,-,H,H,B,H,H,H,H,H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,H,-,H,H,-,H,H,B,-,B,H,-,H,A,H,-,-,H,H,-,H,H,H,-,H,H,H,H,-,H,H,H,-,H,H,H,H,H,-,A,-,-,H,-,H,H,H,-,H,H,-,B,H,-,-,H,-,-,A,C,H,A,-,-,A,A,H,H,H,H,H,-,H,H,-,A,A,A,-,A,A,A,-,-,H,-,-,-,-,B,H,-,H,H,B,-,-,-,-,H,H 264,A,A,-,A,A,A,A,A,A,A,A,A,A,B,B,H,H,H,H,B,-,-,H,H,-,-,-,-,H,B,B,H,H,H,H,H,-,H,H,H,-,H,B,-,B,B,B,-,-,B,B,-,H,H,H,-,A,B,B,B,-,H,H,A,-,H,H,B,B,B,-,B,-,-,H,-,B,-,B,-,H,H,-,H,H,-,-,B,B,-,H,C,H,H,-,-,H,H,H,H,H,H,H,-,H,H,-,H,H,H,-,H,H,H,-,-,H,-,-,-,-,B,B,-,H,H,H,-,-,-,-,H,A 116.2,A,A,-,H,H,H,H,H,H,H,H,A,A,A,H,H,H,A,A,H,-,-,H,B,-,-,-,-,H,H,H,H,H,H,H,H,-,B,B,-,-,B,H,-,H,H,A,-,-,A,A,-,A,A,A,-,A,H,H,H,-,H,H,A,-,H,H,A,A,A,-,A,-,-,H,-,H,-,H,-,H,B,-,B,B,-,-,H,H,-,B,C,H,H,-,-,H,H,H,H,H,H,H,-,B,B,-,H,H,H,-,B,B,B,-,-,H,-,-,-,-,H,B,-,H,H,H,-,-,-,-,A,A qtl/tests/test_mapqtl_io.Rout.save0000644000176200001440000000233412770016226017055 0ustar liggesusers R version 3.1.1 (2014-07-10) -- "Sock it to Me" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.1.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # test input/output in mapqtl format > > library(qtl) > data(fake.4way) > > write.cross(fake.4way, "mapqtl", "fake_4way_mapqtl") > > x <- read.cross("mapqtl", "", genfile="fake_4way_mapqtl.loc", + phefile="fake_4way_mapqtl.qua", + mapfile="fake_4way_mapqtl_female.map") --Read the following data: Number of individuals: 250 Number of markers: 157 Number of phenotypes: 2 --Cross type: 4way > > x <- replace.map(x, pull.map(fake.4way)) > > comparecrosses(x, fake.4way) Crosses are identical. > > proc.time() user system elapsed 4.311 0.247 4.547 qtl/tests/testthat.R0000644000176200001440000000004412770016226014200 0ustar liggesuserslibrary(testthat) test_check("qtl") qtl/src/0000755000176200001440000000000013615343520011643 5ustar liggesusersqtl/src/hmm_ri8self.h0000644000176200001440000000672612770016226014245 0ustar liggesusers/********************************************************************** * * hmm_ri8self.h * * copyright (c) 2009, Karl W Broman * * last modified Apr, 2009 * first written Apr, 2009 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * Contains: init_ri8self, emit_ri8self, step_ri8self, step_special_ri8self, * calc_genoprob_ri8self, calc_genoprob_special_ri8self, * argmax_geno_ri8self, sim_geno_ri8self, * est_map_ri8self, nrec2_ri8self, logprec_ri8self, est_rf_ri8self, * marker_loglik_ri8self, calc_pairprob_ri8self, * errorlod_ri8self, calc_errorlod_ri8self * * These are the init, emit, and step functions plus * all of the hmm wrappers for 8-way RIL by selfing. * * Genotype codes: 1-8 * "Phenotype" codes: 0=missing; otherwise binary 1-255, with bit i * indicating SNP compatible with parent i * **********************************************************************/ double init_ri8self(int true_gen, int *cross_scheme); double emit_ri8self(int obs_gen, int true_gen, double error_prob, int *cross_scheme); double step_ri8self(int gen1, int gen2, double rf, double junk, int *cross_scheme); double step_special_ri8self(int gen1, int gen2, double rf, double junk, int *cross_scheme); void calc_genoprob_ri8self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void calc_genoprob_special_ri8self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void argmax_geno_ri8self(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax); void sim_geno_ri8self(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws); void est_map_ri8self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose); /* expected no. recombinants */ double nrec2_ri8self(int obs1, int obs2, double rf, int *cross_scheme); /* log [joint probability * 8] */ double logprec_ri8self(int obs1, int obs2, double rf, int *cross_scheme); void est_rf_ri8self(int *n_ind, int *n_mar, int *geno, double *rf, int *maxit, double *tol); void marker_loglik_ri8self(int *n_ind, int *geno, double *error_prob, double *loglik); void calc_pairprob_ri8self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob); double errorlod_ri8self(int obs, double *prob, double error_prob); void calc_errorlod_ri8self(int *n_ind, int *n_mar, int *geno, double *error_prob, double *genoprob, double *errlod); /* end of hmm_ri8self.h */ qtl/src/scantwo_mr.h0000644000176200001440000001364212770016226014177 0ustar liggesusers/********************************************************************** * * scantwo_mr.h * * copyright (c) 2001-6, Karl W Broman * * last modified Oct, 2006 * first written Nov, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a two-dimensional genome scan with * a two-QTL model by marker regression. Individuals missing genotypes * at either of a pair of markers are dropped. * * Contains: R_scantwo_1chr_mr, scantwo_1chr_mr, * R_scantwo_2chr_mr, scantwo_2chr_mr * **********************************************************************/ /********************************************************************** * * R_scantwo_1chr_mr * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scantwo_1chr_mr. * **********************************************************************/ void R_scantwo_1chr_mr(int *n_ind, int *n_pos, int *n_gen, int *geno, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *weights, double *result, int *n_col2drop, int *col2drop); /********************************************************************** * * scantwo_1chr_mr * * Performs a 2-dimensional genome scan using the Haley-Knott * regression method (regressing phenotypes on conditional genotype * probabilities) for a two-QTL model with the two QTL residing on * the same chromosome. * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * Geno Array of marker genotype data, indexed as * Geno[pos][ind] * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * Result Result matrix of size [n_pos x n_pos]; the lower * triangle (row > col) contains the joint LODs while * the upper triangle (row < col) contains the LODs for * testing epistasis. * Note: indexed as Result[col][row] * * n_col2drop For X chromosome, number of columns to drop * * col2drop For X chromosome, indicates which columns to drop * **********************************************************************/ void scantwo_1chr_mr(int n_ind, int n_pos, int n_gen, int **Geno, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double **Result, int n_col2drop, int *col2drop); /********************************************************************** * * R_scantwo_2chr_mr * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scantwo_2chr_mr. * **********************************************************************/ void R_scantwo_2chr_mr(int *n_ind, int *n_pos1, int *n_pos2, int *n_gen1, int *n_gen2, int *geno1, int *geno2, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *weights, double *result_full, double *result_add); /********************************************************************** * * scantwo_2chr_mr * * Performs a 2-dimensional genome scan using the Haley-Knott * regression method (regressing phenotypes on conditional genotype * probabilities) for a two-QTL model with the two QTL residing on * the different chromosomes. * * n_ind Number of individuals * * n_pos1 Number of marker positions on first chromosome * * n_pos2 Number of marker positions on second chromosome * * n_gen1 Number of different genotypes for first chromosome * * n_gen2 Number of different genotypes for second chromosome * * Geno1 Matrix of marker genotype data for chr 1, * indexed as Geno1[pos][ind] * * Geno2 Matrix of marker genotype data for chr 2 * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * Result_full Result matrix of size [n_pos1 x n_pos2] * containing the joint LODs * Note: indexed as Result[pos2][pos1] * * Result_add Result matrix of size [n_pos2 x n_pos1] * containing the LODs for add've models * also indexed as Result[pos2][pos1] * **********************************************************************/ void scantwo_2chr_mr(int n_ind, int n_pos1, int n_pos2, int n_gen1, int n_gen2, int **Geno1, int **Geno2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double **Result_full, double **Result_add); /* end of scantwo_mr.h */ qtl/src/hmm_bgmagic16.h0000644000176200001440000000605412770016226014423 0ustar liggesusers/********************************************************************** * * hmm_bgmagic16.h * * copyright (c) 2011-2012, Karl W Broman * * last modified Jul, 2012 * first written Dec, 2011 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * Contains: init_bgmagic16, emit_bgmagic16, step_bgmagic16, * calc_genoprob_bgmagic16, calc_genoprob_special_bgmagic16, * argmax_geno_bgmagic16, sim_geno_bgmagic16, * est_map_bgmagic16, * marker_loglik_bgmagic16, calc_pairprob_bgmagic16, * errorlod_bgmagic16, calc_errorlod_bgmagic16 * * These are the init, emit, and step functions plus * all of the hmm wrappers for 8-way RIL by selfing. * * Genotype codes: 1-16 * "Phenotype" codes: 0=missing; otherwise binary 1-65536, with bit i * indicating SNP compatible with parent i * **********************************************************************/ double init_bgmagic16(int true_gen, int *ignored); double emit_bgmagic16(int obs_gen, int true_gen, double error_prob, int *ignored); double step_bgmagic16(int gen1, int gen2, double rf, double junk, int *ignored); void calc_genoprob_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void calc_genoprob_special_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void argmax_geno_bgmagic16(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax); void sim_geno_bgmagic16(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws); void est_map_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose); void marker_loglik_bgmagic16(int *n_ind, int *geno, double *error_prob, double *loglik); void calc_pairprob_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob); double errorlod_bgmagic16(int obs, double *prob, double error_prob); void calc_errorlod_bgmagic16(int *n_ind, int *n_mar, int *geno, double *error_prob, double *genoprob, double *errlod); /* end of hmm_bgmagic16.h */ qtl/src/scanone_ehk.c0000644000176200001440000003214012770016226014265 0ustar liggesusers/********************************************************************** * * scanone_ehk.c * * copyright (c) 2006-2014, Karl W Broman * * last modified Mar, 2014 * first written Jul, 2006 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a genome scan with a * single QTL model by the extended Haley-Knott method * * Contains: R_scanone_ehk, scanone_ehk, calc_mvz * **********************************************************************/ #include #include #include #include #include #include #include #include #include #include "util.h" #include "scanone_ehk.h" #define TOL 1e-12 /********************************************************************** * * R_scanone_ehk * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scanone_ehk. * **********************************************************************/ void R_scanone_ehk(int *n_ind, int *n_pos, int *n_gen, double *genoprob, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *weights, double *result, int *maxit, double *tol) { double ***Genoprob, **Addcov=0, **Intcov=0; reorg_genoprob(*n_ind, *n_pos, *n_gen, genoprob, &Genoprob); /* reorganize addcov and intcov (if they are not empty) */ if(*n_addcov > 0) reorg_errlod(*n_ind, *n_addcov, addcov, &Addcov); if(*n_intcov > 0) reorg_errlod(*n_ind, *n_intcov, intcov, &Intcov); scanone_ehk(*n_ind, *n_pos, *n_gen, Genoprob, Addcov, *n_addcov, Intcov, *n_intcov, pheno, weights, result, *maxit, *tol); } /********************************************************************** * * scanone_ehk * * Performs genome scan using the extended Haley-Knott method * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * Genoprob Array of conditional genotype probabilities * Indexed as Genoprob[gen][pos][ind] * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * result Vector of length n_pos, to contain the LOD scores * * maxit Maximum number of iterations in the EM algorithm * * tol Tolerance for determining convergence in EM * **********************************************************************/ void scanone_ehk(int n_ind, int n_pos, int n_gen, double ***Genoprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double *result, int maxit, double tol) { int ny, *jpvt, k, i, j, ncol, k2, k3, k4, s; int info, error_flag, flag; double *work, *x, *qty, *qraux, *coef, *resid, tol2; double sigsq, *coef_cur, sigsq_cur, loglik=0.0, loglik_cur; double *m, *v, *z, *y, *wtsq; double *rhs, *lhs, **LHS, rcond; /* tolerance for linear regression */ tol2 = TOL; ncol = n_gen + (n_gen-1)*n_intcov+n_addcov; /* allocate space and set things up*/ x = (double *)R_alloc(n_ind*ncol, sizeof(double)); coef = (double *)R_alloc(ncol, sizeof(double)); coef_cur = (double *)R_alloc(ncol, sizeof(double)); resid = (double *)R_alloc(n_ind, sizeof(double)); qty = (double *)R_alloc(n_ind, sizeof(double)); jpvt = (int *)R_alloc(ncol, sizeof(int)); qraux = (double *)R_alloc(ncol, sizeof(double)); work = (double *)R_alloc(2 * ncol, sizeof(double)); m = (double *)R_alloc(n_ind, sizeof(double)); v = (double *)R_alloc(n_ind, sizeof(double)); z = (double *)R_alloc(n_ind, sizeof(double)); y = (double *)R_alloc(n_ind, sizeof(double)); wtsq = (double *)R_alloc(n_ind, sizeof(double)); rhs = (double *)R_alloc(ncol, sizeof(double)); lhs = (double *)R_alloc(ncol*ncol, sizeof(double)); reorg_errlod(ncol, ncol, lhs, &LHS); ny = 1; for(j=0; j pos1 (for pos2 <= pos1, points to nothing) * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * Result vector to contain LOD scores * triangle (row > col) contains the joint LODs while * the upper triangle (row < col) contains the LODs for * testing epistasis. * Note: indexed as Result[col][row] * * n_col2drop For X chromosome, number of columns to drop * * col2drop For X chromosome, indicates which columns to drop * **********************************************************************/ void scantwo_1chr_binary_hk(int n_ind, int n_pos, int n_gen, double ***Genoprob, double *****Pairprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double **Result, int n_col2drop, int *col2drop, double tol, int maxit, int verbose); /********************************************************************** * * R_scantwo_2chr_binary_hk * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scantwo_2chr_binary_hk. * **********************************************************************/ void R_scantwo_2chr_binary_hk(int *n_ind, int *n_pos1, int *n_pos2, int *n_gen1, int *n_gen2, double *genoprob1, double *genoprob2, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *result_full, double *result_add, double *tol, int *maxit, int *verbose); /********************************************************************** * * scantwo_2chr_binary_hk * * Performs a 2-dimensional genome scan using the Haley-Knott * regression method (regressing phenotypes on conditional genotype * probabilities) for a two-QTL model with the two QTL residing on * the different chromosomes. * * n_ind Number of individuals * * n_pos1 Number of marker positions on first chromosome * * n_pos2 Number of marker positions on second chromosome * * n_gen1 Number of different genotypes for first chromosome * * n_gen2 Number of different genotypes for second chromosome * * Genoprob1 Array of conditional genotype probs for 1st chr * Indexed as Genoprob[gen][pos][ind] * * Genoprob2 Array of conditional genotype probs for 2nd chr * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * Result_full Result matrix of size [n_pos1 x n_pos2] * containing the joint LODs * Note: indexed as Result[pos1][pos2] * * Result_add Result matrix of size [n_pos2 x n_pos1] * containing the LODs for add've models * also indexed as Result[pos2][pos1] * **********************************************************************/ void scantwo_2chr_binary_hk(int n_ind, int n_pos1, int n_pos2, int n_gen1, int n_gen2, double ***Genoprob1, double ***Genoprob2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double **Result_full, double **Result_add, double tol, int maxit, int verbose); /* end of scantwo_binary_hk.h */ qtl/src/hmm_ri4self.h0000644000176200001440000000672412770016226014237 0ustar liggesusers/********************************************************************** * * hmm_ri4self.h * * copyright (c) 2009, Karl W Broman * * last modified Apr, 2009 * first written Apr, 2009 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * Contains: init_ri4self, emit_ri4self, step_ri4self, step_special_ri4self, * calc_genoprob_ri4self, calc_genoprob_special_ri4self, * argmax_geno_ri4self, sim_geno_ri4self, * est_map_ri4self, nrec2_ri4self, logprec_ri4self, est_rf_ri4self, * marker_loglik_ri4self, calc_pairprob_ri4self, * errorlod_ri4self, calc_errorlod_ri4self * * These are the init, emit, and step functions plus * all of the hmm wrappers for 4-way RIL by selfing * * Genotype codes: 1-4 * "Phenotype" codes: 0=missing; otherwise binary 1-15, with bit i * indicating SNP compatible with parent i * **********************************************************************/ double init_ri4self(int true_gen, int *cross_scheme); double emit_ri4self(int obs_gen, int true_gen, double error_prob, int *cross_scheme); double step_ri4self(int gen1, int gen2, double rf, double junk, int *cross_scheme); double step_special_ri4self(int gen1, int gen2, double rf, double junk, int *cross_scheme); void calc_genoprob_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void calc_genoprob_special_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void argmax_geno_ri4self(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax); void sim_geno_ri4self(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws); void est_map_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose); /* expected no. recombinants */ double nrec2_ri4self(int obs1, int obs2, double rf, int *cross_scheme); /* log [joint probability * 8] */ double logprec_ri4self(int obs1, int obs2, double rf, int *cross_scheme); void est_rf_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, int *maxit, double *tol); void marker_loglik_ri4self(int *n_ind, int *geno, double *error_prob, double *loglik); void calc_pairprob_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob); double errorlod_ri4self(int obs, double *prob, double error_prob); void calc_errorlod_ri4self(int *n_ind, int *n_mar, int *geno, double *error_prob, double *genoprob, double *errlod); /* end of hmm_ri4self.h */ qtl/src/scantwo_imp.h0000644000176200001440000001003212770016226014334 0ustar liggesusers/********************************************************************** * * scantwo_imp.h * * copyright (c) 2001-6, Karl W Broman and Hao Wu * * This file was written by Hao Wu with modifications by * Karl Broman. * * last modified Oct, 2006 * first written Nov, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a 2-dimensional genome scan * with a 2-QTL model by imputation. * * Contains: R_scantwo_imp, scantwo_imp, altRss2 * **********************************************************************/ /********************************************************************** * * R_scantwo_imp * * Wrapper for call from R; reorganizes genotype prob, additive and * interactive covariates and result matrix. Then calls scantwo_imp. * **********************************************************************/ void R_scantwo_imp(int *n_ind, int *same_chr, int *n_pos1, int *n_pos2, int *n_gen1, int *n_gen2, int *n_draws, int *draws1, int *draws2, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, int *nphe, double *weights, double *result, int *n_col2drop, int *col2drop); /********************************************************************** * * scantwo_imp * * Performs genotype pair scan using the pseudomarker algorithm * (imputation) method of Sen and Churchill (2001). * * n_ind Number of individuals * * same_chr If = 1, work only with Draws1 and do 2-QTL model with * QTLs on the same chromosome. * * chr2 Chromesome id 2 * * n_pos1 Number of marker positions in chromesome 1 * * n_pos2 Number of marker positions in chromesome 2 * * n_gen1 Number of different genotypes on chr 1 * * n_gen2 Number of different genotypes on chr 2 * * n_draws Number of impiutations * * Draws1 Array of genotype imputations in chromesome 1, * indexed as Draws1[repl][mar][ind] * * Draws2 Array of genotype imputations in chromesome 2, * indexed as Draws2[repl][mar][ind] * * addcov Additive covariates matrix, addcov[mar][ind] * * n_addcov Number of additive covariates * * intcov Interacting covariates matrix, intcov[mar][ind] * * n_intcov Number of interacting covariates * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * result Result vector of length [n_pos1*n_pos2]; * * n_col2drop For X chromosome, number of columns to drop * * col2drop For X chromosome, indicates which columns to drop * **********************************************************************/ void scantwo_imp(int n_ind, int same_chr, int n_pos1, int n_pos2, int n_gen1, int n_gen2, int n_draws, int ***Draws1, int ***Draws2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, int nphe, double *weights, double *result, int n_col2drop, int *col2drop); void altRss2(double *tmppheno, double *pheno, int nphe, int n_ind, int n_gen1, int n_gen2, int *Draws1, int *Draws2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *lrss, double *dwork_add, double *dwork_full, int multivar, double *weights, int n_col2drop, int *allcol2drop); /* end of scantwo_imp.h */ qtl/src/mqmdatatypes.cpp0000644000176200001440000001417212770016226015066 0ustar liggesusers/********************************************************************** * * mqmdatatypes.cpp * * Copyright (c) 1996-2009 by * Ritsert C Jansen, Danny Arends, Pjotr Prins and Karl W Broman * * initial MQM C code written between 1996-2002 by Ritsert C. Jansen * improved for the R-language by Danny Arends, Pjotr Prins and Karl W. Broman * * Modified by Danny Arends and Pjotr Prins * last modified November 2009 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * **********************************************************************/ #include "mqm.h" /* * Determine the experimental cross type from the R/qtl dataset. Returns the * type. */ MQMCrossType determine_MQMCross(const int Nmark, const int Nind, const int **Geno, const RqtlCrossType rqtlcrosstype) { MQMCrossType crosstype = CUNKNOWN; switch(rqtlcrosstype) { case RC_F2: crosstype = CF2; break; case RC_RIL: crosstype = CRIL; break; case RC_BC: crosstype = CBC; break; } for (int j=0; j < Nmark; j++) { for (int i=0; i < Nind; i++) { //Some checks to see if the cross really is the cross we got (So BC can't contain 3's (BB) and RILS can't contain 2's (AB) if (Geno[j][i] != 9 && Geno[j][i] > 3 && (rqtlcrosstype) != 1) { Rprintf("INFO: ind = %d marker = %d Geno = %d\n", i+1, j+1, Geno[j][i]); Rprintf("INFO: Unexpected genotype pattern, switching to F2\n"); crosstype = CF2; break; } if (Geno[j][i] == 3 && (rqtlcrosstype) == 2) { Rprintf("INFO: Unexpected genotype pattern, switching from BC to F2\n"); crosstype = CF2; break; } //IF we have a RIL and find AB then the set is messed up; we have a BC genotype if (Geno[j][i] == 2 && (rqtlcrosstype) == 3) { Rprintf("INFO: Unexpected genotype pattern, switching from RIL to BC\n"); crosstype = CBC; break; } } } return crosstype; } /* * Change all the genotypes from default R/qtl format to MQM internal. R/qtl * uses internally { 'AA' => 1, 'H' => 2, 'BB' => 3, 'NOTBB' => 4, 'NOTAA' => 5, * '-' => 'NA' } * */ void change_coding(int *Nmark, int *Nind, int **Geno, MQMMarkerMatrix markers, const MQMCrossType crosstype) { //info("Convert codes R/qtl -> MQM"); for (int j=0; j < *Nmark; j++) { for (int i=0; i < *Nind; i++) { switch (Geno[j][i]) { case 1: markers[j][i] = MAA; break; case 2: markers[j][i] = MH; if (crosstype == CRIL) markers[j][i] = MBB; // FIXME test break; case 3: markers[j][i] = MBB; break; case 4: markers[j][i] = MNOTBB; break; case 5: markers[j][i] = MNOTAA; break; case 9: markers[j][i] = MMISSING; break; default: error("Can not convert R/qtl genotype with value %d",Geno[j][i]); } } } } /* * Allocate a memory block using the 'safe' R method calloc_init, but with * guarantee all data has been zeroed */ void *calloc_init(size_t num, size_t size) { void *buf; buf = S_alloc(num,(int)size); return buf; } vector newvector(int dim) { vector v = (double *)calloc_init(dim, sizeof(double)); if(!v){ warning("Not enough memory for new vector of dimension %d", (dim+1)); } return v; } ivector newivector(int dim) { ivector v = (int *)calloc_init(dim, sizeof(int)); if(!v){ warning("Not enough memory for new vector of dimension %d", (dim+1)); } return v; } cvector newcvector(int dim) { cvector v = (char *)calloc_init(dim, sizeof(char)); if(!v){ warning("Not enough memory for new vector of dimension %d", (dim+1)); } return v; } MQMMarkerVector newMQMMarkerVector(int dim) { MQMMarkerVector v = (MQMMarker *)calloc_init(dim, sizeof(MQMMarker)); if(!v){ warning("Not enough memory for new mqm marker vector of dimension %d", (dim+1)); } return v; } relmarkerarray newRelMarkerPos(int dim){ relmarkerarray v = (MQMRelMarkerPos *)calloc_init(dim, sizeof(char)); if(!v){ warning("Not enough memory for the relative marker position vector with dimension %d",(dim+1)); } return v; } matrix newmatrix(int rows, int cols) { matrix m = (double **)calloc_init(rows, sizeof(double*)); if(!m){ warning("Not enough memory for new double matrix"); } for (int i=0; i #include #include #include "R_init.h" void R_init_qtl(DllInfo* info) { R_registerRoutines(info, NULL, NULL, NULL, NULL); R_useDynamicSymbols(info, TRUE); } qtl/src/hmm_main.h0000644000176200001440000003603612770016226013612 0ustar liggesusers/********************************************************************** * * hmm_main.h * * copyright (c) 2001-2010, Karl W Broman * * last modified Jul, 2010 * first written Feb, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for the main HMM engine * * Contains: calc_genoprob, calc_genoprob_special, sim_geno, est_map, argmax_geno, * calc_errorlod, est_rf, calc_pairprob, calc_pairprob_condindep, * R_calc_pairprob_condindep, marker_loglik * **********************************************************************/ #define TOL 1.0e-12 /********************************************************************** * * calc_genoprob * * This function uses the Lander-Green algorithm to calculate the * genotype probabilities at each of marker and (optionally) at points * in-between markers, conditional on all marker data for a chromosome. * This assumes data on a single chromosome * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * calculate the genotype probabilities) * * n_gen Number of different genotypes * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 A second set of recombination fractions, in case of * sex-specific maps (may be ignored) * * error_prob Genotyping error probability * * genoprob Genotype probabilities (the output); a single vector * stored by columns (ind moves fastest, then mar, then * genotype * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void calc_genoprob(int n_ind, int n_pos, int n_gen, int *geno, double *rf, double *rf2, double error_prob, double *genoprob, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *)); /********************************************************************** * * calc_genoprob_special * * This is a special version of calc_genoprob, rerun specially for * each individual at each marker, assuming that that genotype may * be in error but others are without error * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void calc_genoprob_special(int n_ind, int n_pos, int n_gen, int *geno, double *rf, double *rf2, double error_prob, double *genoprob, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *)); /********************************************************************** * * sim_geno * * This function simulates from the joint distribution Pr(g | O) * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * simulate genotypes) * * n_gen Number of different genotypes * * n_draws Number of simulation replicates * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 A second set of recombination fractions, in case of * sex-specific maps * * error_prob Genotyping error probability * * draws Simulated genotypes (the output), a single vector * stored by columns (ind moves fastest, then mar, then * draws * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void sim_geno(int n_ind, int n_pos, int n_gen, int n_draws, int *geno, double *rf, double *rf2, double error_prob, int *draws, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *)); /********************************************************************** * * est_map * * This function re-estimates the genetic map for a chromosome * * n_ind Number of individuals * * n_mar Number of markers * * n_gen Number of different genotypes * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 Second set of recombination fractions (may not be needed) * * error_prob Genotyping error probability * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * * nrecf1 Function returning number of recombinations associated * with (g_1, g_2) * * nrecf2 Another such function, used only in the case of a sex- * specific map * * loglik Value of loglik at final estimates of rec fracs. * * maxit Maximum number of iterations to perform * * tol Tolerance for determining convergence * * sexsp Indicates whether sex-specific maps should be estimated * * verbose Indicates whether to print initial and final rec fracs * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void est_map(int n_ind, int n_mar, int n_gen, int *geno, double *rf, double *rf2, double error_prob, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *), double nrecf1(int, int, double, int*), double nrecf2(int, int, double, int*), double *loglik, int maxit, double tol, int sexsp, int verbose); /********************************************************************** * * argmax_geno * * This function uses the Viterbi algorithm to calculate the most * likely sequence of underlying genotypes, given the observed marker * data for a chromosome. * This assumes data on a single chromosome * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * find most likely genotypes * * n_gen Number of different genotypes * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 A second set of recombination fractions, in case of * sex-specific maps (may be ignored) * * error_prob Genotyping error probability * * argmax Matrix of most likely genotypes (the output); a single * vector stored by columns (ind moves fastest, then pos) * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void argmax_geno(int n_ind, int n_pos, int n_gen, int *geno, double *rf, double *rf2, double error_prob, int *argmax, double initf(int, int *), double emitf(int, int, double, int*), double stepf(int, int, double, double, int *)); /********************************************************************** * * calc_errorlod * * Uses the results of calc_genoprob to calculate a LOD score for * each genotype, indicating whether it is likely to be in error. * * n_ind, n_mar, n_gen, geno These are all as in the above funcs * error_prob, genoprob * * errlod The output, as a single vector stored by columns, * of size n_ind x n_mar * * errorlod Function taking observed genotype, genotype probs, * and error probability, and returning the error LOD * **********************************************************************/ void calc_errorlod(int n_ind, int n_mar, int n_gen, int *geno, double error_prob, double *genoprob, double *errlod, double errorlod(int, double *, double)); /********************************************************************** * * est_rf * * Estimate sex-averaged recombination fractions for all pairs of loci * * This is for f2 and 4way crosses; backcrosses don't need the EM * algorithm, since there is no partially missing data. * * n_ind Number of individuals * * n_mar Number of markers * * geno Matrix of genotype data (n_ind x n_mar), stored as a * single vector (by columns) * * rf The output: matrix of doubles (n_mar x n_mar), stored * as a single vector (by columns). The diagonal will * contain the number of meioses, the upper triangle will * contain the est'd rec fracs, and the lower triangle * will contain the LOD scores (testing rf=0.5) * * erec Function returning the expected number of recombination * events given observed marker genotypes * * logprec Function returning the log probability of a pair of * observed genotypes, given the recombination fraction * (for calculating the LOD score) * * maxit Maximum number of iterations in the EM algorithm * * tol Tolerance for determining convergence of the EM * * meioses_per No. meioses per individual * **********************************************************************/ void est_rf(int n_ind, int n_mar, int *geno, double *rf, double erec(int, int, double, int *), double logprec(int, int, double, int *), int maxit, double tol, int meioses_per); /********************************************************************** * * calc_pairprob * * This function uses the hidden Markov model technology to calculate * the joint genotype probabilities for all pairs of putative QTLs. * This assumes data on a single chromosome * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * calculate the genotype probabilities) * * n_gen Number of different genotypes * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 A second set of recombination fractions, in case of * sex-specific maps (may be ignored) * * error_prob Genotyping error probability * * genoprob Genotype probabilities (the output); a single vector, * of length n_ind x n_pos x n_gen, stored by columns * (ind moves fastest, then mar, then genotype * * pairprob Joint genotype probabilities for pairs of positions. * A single vector of length n_ind x n_pos x (n_pos-1)/2 x * n_gen^2. We only calculate probabilities for * pairs (i,j) with i < j. * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void calc_pairprob(int n_ind, int n_pos, int n_gen, int *geno, double *rf, double *rf2, double error_prob, double *genoprob, double *pairprob, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *)); /********************************************************************** * * calc_pairprob_condindep * * This function calculates the joint genotype probabilities assuming * conditional independence of QTL genotypes given the marker data * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * calculate the genotype probabilities) * * n_gen Number of different genotypes * * genoprob QTL genotype probabilities given the marker data * * pairprob Joint genotype probabilities for pairs of positions. * A single vector of length n_ind x n_pos x (n_pos-1)/2 x * n_gen^2. We only calculate probabilities for * pairs (i,j) with i < j. * **********************************************************************/ void calc_pairprob_condindep(int n_ind, int n_pos, int n_gen, double ***Genoprob, double *****Pairprob); /* wrapper for calc_pairprob_condindep */ void R_calc_pairprob_condindep(int *n_ind, int *n_pos, int *n_gen, double *genoprob, double *pairprob); /********************************************************************** * * marker_loglik * * This function calculates the log likelihood for a fixed marker * * n_ind Number of individuals * * n_gen Number of different genotypes * * geno Genotype data, as a single vector * * error_prob Genotyping error probability * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * loglik Loglik at return * **********************************************************************/ /* Note: true genotypes coded as 1, 2 */ void marker_loglik(int n_ind, int n_gen, int *geno, double error_prob, double initf(int, int *), double emitf(int, int, double, int *), double *loglik); /* end of hmm_main.h */ qtl/src/util.c0000644000176200001440000007240013355127045012772 0ustar liggesusers/********************************************************************** * * util.c * * copyright (c) 2001-2014, Karl W Broman and Hao Wu * * This file written mostly by Karl Broman with some additions * from Hao Wu. * * last modified Mar, 2014 * first written Feb, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These are utility functions, mostly for the HMM engine. * * Other functions: addlog, subtrlog, reorg_geno, reorg_genoprob, * reorg_pairprob, allocate_int * allocate_alpha, reorg_draws, allocate_double, * sample_int, allocate_imatrix, allocate_dmatrix * reorg_errlod, double_permute, int_permute, * random_int * wtaverage, comparegeno, R_comparegeno, * R_locate_xo, locate_xo, matmult, expand_col2drop * dropcol_xpx, dropcol_xpy, dropcol_x, * reviseMWril, R_reviseMWril, R_calcPermPval, * calcPermPval * **********************************************************************/ #include /* #include */ #include "util.h" #define THRESH 200.0 /********************************************************************** * * addlog * * Calculate addlog(a,b) = log[exp(a) + exp(b)] * * This makes use of the function log1p(x) = log(1+x) provided * in R's math library. * **********************************************************************/ double addlog(double a, double b) { if(b > a + THRESH) return(b); else if(a > b + THRESH) return(a); else return(a + log1p(exp(b-a))); } /********************************************************************** * * subtrlog * * Calculate subtrlog(a,b) = log[exp(a) - exp(b)] * * This makes use of the function log1p(x) = log(1+x) provided * in R's math library. * **********************************************************************/ double subtrlog(double a, double b) { if(a > b + THRESH) return(a); else return(a + log1p(-exp(b-a))); } /********************************************************************** * * reorg_geno * * Reorganize the genotype data so that it is a doubly indexed array * rather than a single long vector * * Afterwards, geno indexed like Geno[mar][ind] * * Allocation done by R_alloc, so that R does the cleanup. * **********************************************************************/ void reorg_geno(int n_ind, int n_pos, int *geno, int ***Geno) { int i; *Geno = (int **)R_alloc(n_pos, sizeof(int *)); (*Geno)[0] = geno; for(i=1; i< n_pos; i++) (*Geno)[i] = (*Geno)[i-1] + n_ind; } /********************************************************************** * * reorg_genoprob * * Reorganize the genotype probability data so that it is a triply * indexed array rather than a single long vector * * Afterwards, genoprob indexed like Genoprob[gen][mar][ind] * * Allocation done by R_alloc, so that R does the cleanup. * **********************************************************************/ void reorg_genoprob(int n_ind, int n_pos, int n_gen, double *genoprob, double ****Genoprob) { int i, j; double **a; *Genoprob = (double ***)R_alloc(n_gen, sizeof(double **)); a = (double **)R_alloc(n_pos*n_gen, sizeof(double *)); (*Genoprob)[0] = a; for(i=1; i< n_gen; i++) (*Genoprob)[i] = (*Genoprob)[i-1]+n_pos; for(i=0; i pos1 * * You *must* refer to cases with pos2 > pos1, as cases with * pos2 <= pos1 point off into the ether. * * Allocation done by R_alloc, so that R does the cleanup. * **********************************************************************/ void reorg_pairprob(int n_ind, int n_pos, int n_gen, double *pairprob, double ******Pairprob) { int i, j, k, s, n_pairs; double ****ptr1, ***ptr2, **ptr3; /* note: n_pos must be at least 2 */ n_pairs = n_pos*(n_pos-1)/2; *Pairprob = (double *****)R_alloc(n_gen, sizeof(double ****)); ptr1 = (double ****)R_alloc(n_gen*n_gen, sizeof(double ***)); (*Pairprob)[0] = ptr1; for(i=1; i 1) { for(k=0,sums=0.0; k= Peaks[i][j]) count++; Pval[i][j] = (double)count/(double)n_perms; } } } /* end of util.c */ qtl/src/hmm_ri8selfIRIP1.c0000644000176200001440000001546213355127045015004 0ustar liggesusers/********************************************************************** * * hmm_ri8selfIRIP.c * * Rohan Shah * * October, 2014 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * Contains: init_ri8IRIP1, emit_ri8IRIP1, step_ri8IRIP1, step_special_ri8IRIP1, * calc_genoprob_ri8IRIP1, calc_genoprob_special_ri8IRIP1, * argmax_geno_ri8IRIP1, sim_geno_ri8IRIP1, * est_map_ri8IRIP1, nrec2_ri8IRIP1, logprec_ri8IRIP1, est_rf_ri8IRIP1, * marker_loglik_ri8IRIP1, calc_pairprob_ri8IRIP1, * errorlod_ri8IRIP1, calc_errorlod_ri8IRIP1 * * These are the init, emit, and step functions plus * all of the hmm wrappers for 8-way RIL by selfing, with 1 generation of . * * Genotype codes: 1-8 * "Phenotype" codes: 0=missing; otherwise binary 1-255, with bit i * indicating SNP compatible with parent i * **********************************************************************/ #include #include #include #include #include #include #include "hmm_main.h" #include "hmm_ri8selfIRIP1.h" #include "hmm_bc.h" #include "util.h" #define M_LN56 4.0253516907351492333570491078177094338635851326626269 #define M_LN7 1.9459101490553133051053527434431797296370847295818611 double init_ri8selfIRIP1(int true_gen, int *cross_scheme) { return(-3.0*M_LN2); /* log(1/8) */ } double emit_ri8selfIRIP1(int obs_gen, int true_gen, double error_prob, int *cross_scheme) { if(obs_gen==0) return(0.0); if(obs_gen & (1 << (true_gen-1))) return(log(1.0-error_prob)); else return(log(error_prob)); } double step_ri8selfIRIP1(int gen1, int gen2, double rf, double junk, int *cross_scheme) { //See Teuscher and Broman 2007, "Haplotype Probabilities for Multiple-Strain Recombinant Inbred Lines", Equation (3), s=1 double equalProb = (1-rf)*(1-rf)*(1-rf)+(2*rf)/8; if(gen1 == gen2) return(log(equalProb)-log(1+2*rf)); else return(log(1-equalProb/(1+2*rf)) - M_LN7); } void calc_genoprob_ri8selfIRIP1(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob(*n_ind, *n_mar, 8, geno, rf, rf, *error_prob, genoprob, init_ri8selfIRIP1, emit_ri8selfIRIP1, step_ri8selfIRIP1); } void calc_genoprob_special_ri8selfIRIP1(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob_special(*n_ind, *n_mar, 8, geno, rf, rf, *error_prob, genoprob, init_ri8selfIRIP1, emit_ri8selfIRIP1, step_ri8selfIRIP1); } void argmax_geno_ri8selfIRIP1(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax) { argmax_geno(*n_ind, *n_pos, 8, geno, rf, rf, *error_prob, argmax, init_ri8selfIRIP1, emit_ri8selfIRIP1, step_ri8selfIRIP1); } void sim_geno_ri8IRIP1(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws) { sim_geno(*n_ind, *n_pos, 8, *n_draws, geno, rf, rf, *error_prob, draws, init_ri8selfIRIP1, emit_ri8selfIRIP1, step_ri8selfIRIP1); } /* for estimating map, must do things with recombination fractions on the RIL scale */ void est_map_ri8IRIP1(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose) { est_map(*n_ind, *n_mar, 8, geno, rf, rf, *error_prob, init_ri8selfIRIP1, emit_ri8selfIRIP1, step_ri8selfIRIP1, nrec_bc, nrec_bc, loglik, *maxit, *tol, 0, *verbose); } /* expected no. recombinants */ double nrec2_ri8selfIRIP1(int obs1, int obs2, double rf, int *cross_scheme) { int n1, n2, n12, nr, and, i, nstr=8; double rf0, rf1, num; if(obs1==0 || obs2==0) return(-999.0); /* this shouldn't happen */ n1=n2=n12=0; and = obs1 & obs2; /* count bits */ for(i=0; i #include #include #include #include #include "forwsel.h" /* R wrappers */ void R_markerforwsel(int *n, int *m, double *x, double *y, int *maxsize, int *chosen, double *rss) { double **X; int i; /* reorganize x matrix */ X = (double **)R_alloc(*m, sizeof(double *)); X[0] = x; for(i=1; i< *m; i++) X[i] = X[i-1] + *n; markerforwsel(*n, *m, X, y, *maxsize, chosen, rss); } void R_markerforwself2(int *n, int *m, int *x, double *y, int *maxsize, int *chosen, double *rss) { double **X; int i, j; /* Create X matrix with 2 columns for each marker */ X = (double **)R_alloc(*m * 2, sizeof(double *)); X[0] = (double *)R_alloc(*m * 2 * *n, sizeof(double)); for(i=1; i< *m * 2; i++) X[i] = X[i-1] + *n; /* fill up X matrix */ for(i=0; i< *m; i++) { for(j=0; j< *n; j++) { if(x[i * *n + j] == 1) { X[i*2][j] = 1.0; X[i*2+1][j] = 0.0; } else if(x[i* *n + j] == 2) { X[i*2][j] = 0.0; X[i*2+1][j] = 1.0; } else X[i*2][j] = X[i*2+1][j] = 0.0; } } markerforwself2(*n, *m, X, y, *maxsize, chosen, rss); } /********************************************************************** * markerforwsel * * n = number of individuals * m = number of covariates (not including intercept) * * X = covariate matrix, indexed as X[covariate][individual] * y = outcome * * maxsize = maximum number of covariates * * chosen = on output, index [0, 1, ..., (m-1)] of chosen covariates * rss = on output, rss for those models * **********************************************************************/ void markerforwsel(int n, int m, double **X, double *y, int maxsize, int *chosen, double *rss) { double minrss, *work, sxx, sxy, syy; double minsxx=0.0, minsxy=0.0, currss, ym; int *ignore; int i, j, k; /* allocate space */ work = (double *)R_alloc(m, sizeof(double)); ignore = (int *)R_alloc(m, sizeof(int)); for(j=0; j #include #include #include "R.h" #include "Rmath.h" #include #include "vbscan.h" #include "util.h" void vbscan(int n_pos, int n_ind, int n_gen, double *genoprob, double *pheno, int *survived, double *lod, int maxit, double tol) { double ***Genoprob, **w; int i, j, k, p, flag, ncol; double *mu, sig=0.0, *pi, *mu_prev, sig_prev, *pi_prev; double mu0, sig0, pi0, q0, loglik0; double s1, s2, s3; ncol = 3; /* set up matrix for the genoprob */ reorg_genoprob(n_ind, n_pos, n_gen, genoprob, &Genoprob); /* allocate space for things */ allocate_dmatrix(n_gen, n_ind, &w); allocate_double(n_gen, &mu); allocate_double(n_gen, &pi); allocate_double(n_gen, &mu_prev); allocate_double(n_gen, &pi_prev); /* estimates under null model */ pi0 = mu0 = sig0 = 0.0; for(i=0; itol*(sig_prev+tol*100.0)) flag=1; for(j=0; jtol*(fabs(mu_prev[j])+tol*100.0)) { flag=1; break; } if(fabs(pi[j]-pi_prev[j])>tol*(pi_prev[j]+tol*100.0)) { flag=1; break; } } if(flag==0) break; sig_prev = sig; for(j=0; jtol*(sig_prev+tol*100.0)) flag=1; for(j=0; jtol*(fabs(mu_prev[j])+tol*100.0)) { flag=1; break; } if(flag==0) break; sig_prev = sig; for(j=0; jtol*(pi_prev[j]+tol*100.0)) { flag=1; break; } if(flag==0) break; for(j=0; j #include #include #include #include #include #include "util.h" #include "hmm_main.h" #include "hmm_bc.h" double init_bc(int true_gen, int *cross_scheme) { return(-M_LN2); /* ln(0.5) */ } double emit_bc(int obs_gen, int true_gen, double error_prob, int *cross_scheme) { switch(obs_gen) { case 0: return(0.0); case 1: case 2: if(obs_gen==true_gen) return(log(1.0-error_prob)); else return(log(error_prob)); } return(0.0); /* shouldn't get here */ } double step_bc(int gen1, int gen2, double rf, double junk, int *cross_scheme) { if(gen1==gen2) return(log(1.0-rf)); else return(log(rf)); return(log(-1.0)); /* shouldn't get here */ } double nrec_bc(int gen1, int gen2, double rf, int *cross_scheme) { if(gen1==gen2) return(0.0); else return(1.0); } void calc_genoprob_bc(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob(*n_ind, *n_mar, 2, geno, rf, rf, *error_prob, genoprob, init_bc, emit_bc, step_bc); } void calc_genoprob_special_bc(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob_special(*n_ind, *n_mar, 2, geno, rf, rf, *error_prob, genoprob, init_bc, emit_bc, step_bc); } void sim_geno_bc(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws) { sim_geno(*n_ind, *n_pos, 2, *n_draws, geno, rf, rf, *error_prob, draws, init_bc, emit_bc, step_bc); } void est_map_bc(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose) { est_map(*n_ind, *n_mar, 2, geno, rf, rf, *error_prob, init_bc, emit_bc, step_bc, nrec_bc, nrec_bc, loglik, *maxit, *tol, 0, *verbose); } void argmax_geno_bc(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax) { argmax_geno(*n_ind, *n_pos, 2, geno, rf, rf, *error_prob, argmax, init_bc, emit_bc, step_bc); } double errorlod_bc(int obs, double *prob, double error_prob) { double p=0.0; switch(obs) { case 0: return(0.0); case 1: p=prob[0]; break; case 2: p=prob[1]; break; } p = (1.0-p)/p*(1.0-error_prob)/error_prob; if(p < TOL) return(-12.0); else return(log10(p)); } void calc_errorlod_bc(int *n_ind, int *n_mar, int *geno, double *error_prob, double *genoprob, double *errlod) { calc_errorlod(*n_ind, *n_mar, 2, geno, *error_prob, genoprob, errlod, errorlod_bc); } void est_rf_bc(int *n_ind, int *n_mar, int *geno, double *rf) { int i, j1, j2, **Geno, a, b; double **Rf; /* reorganize geno and rf */ reorg_geno(*n_ind, *n_mar, geno, &Geno); reorg_errlod(*n_mar, *n_mar, rf, &Rf); for(j1=0; j1< *n_mar; j1++) { /* count meioses */ a = 0; for(i=0; i < *n_ind; i++) { if(Geno[j1][i] != 0) a++; } Rf[j1][j1] = (double) a; for(j2=j1+1; j2< *n_mar; j2++) { a=b=0; for(i=0; i< *n_ind; i++) { if(Geno[j1][i] != 0 && Geno[j2][i] != 0) { a++; if(Geno[j1][i] != Geno[j2][i]) b++; } } if(a != 0) { /* at least one informative meiosis */ /* if(b > a/2) b = a/2; */ Rf[j1][j2] = (double)b/(double)a; if(b==0) /* no recombinations */ Rf[j2][j1] = (double)a*log10(1.0-Rf[j1][j2]); else Rf[j2][j1] = (double)b*log10(Rf[j1][j2]) + (double)(a-b)*log10(1.0-Rf[j1][j2]); Rf[j2][j1] += (double)a*log10(2.0); } else { Rf[j1][j2] = NA_REAL; Rf[j2][j1] = 0.0; } } /* end loops over markers */ } } void calc_pairprob_bc(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob) { calc_pairprob(*n_ind, *n_mar, 2, geno, rf, rf, *error_prob, genoprob, pairprob, init_bc, emit_bc, step_bc); } void marker_loglik_bc(int *n_ind, int *geno, double *error_prob, double *loglik) { marker_loglik(*n_ind, 2, geno, *error_prob, init_bc, emit_bc, loglik); } /* end of hmm_bc.c */ qtl/src/hmm_ri8sib.h0000644000176200001440000000672012770016226014063 0ustar liggesusers/********************************************************************** * * hmm_ri8sib.h * * copyright (c) 2005-9, Karl W Broman * * last modified Apr, 2009 * first written Mar, 2005 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * Contains: init_ri8sib, emit_ri8sib, step_ri8sib, step_special_ri8sib, * calc_genoprob_ri8sib, calc_genoprob_special_ri8sib, * argmax_geno_ri8sib, sim_geno_ri8sib, * est_map_ri8sib, nrec2_ri8sib, logprec_ri8sib, est_rf_ri8sib, * marker_loglik_ri8sib, calc_pairprob_ri8sib, * errorlod_ri8sib, calc_errorlod_ri8sib * * These are the init, emit, and step functions plus * all of the hmm wrappers for 8-way RIL by sib mating * (i.e., the Collaborative Cross). * * Genotype codes: 1-8 * "Phenotype" codes: 0=missing; otherwise binary 1-255, with bit i * indicating SNP compatible with parent i * **********************************************************************/ double init_ri8sib(int true_gen, int *cross_scheme); double emit_ri8sib(int obs_gen, int true_gen, double error_prob, int *cross_scheme); double step_ri8sib(int gen1, int gen2, double rf, double junk, int *cross_scheme); double step_special_ri8sib(int gen1, int gen2, double rf, double junk, int *cross_scheme); void calc_genoprob_ri8sib(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void calc_genoprob_special_ri8sib(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob); void argmax_geno_ri8sib(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax); void sim_geno_ri8sib(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws); void est_map_ri8sib(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose); /* expected no. recombinants */ double nrec2_ri8sib(int obs1, int obs2, double rf, int *cross_scheme); /* log [joint probability * 8] */ double logprec_ri8sib(int obs1, int obs2, double rf, int *cross_scheme); void est_rf_ri8sib(int *n_ind, int *n_mar, int *geno, double *rf, int *maxit, double *tol); void marker_loglik_ri8sib(int *n_ind, int *geno, double *error_prob, double *loglik); void calc_pairprob_ri8sib(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob); double errorlod_ri8sib(int obs, double *prob, double error_prob); void calc_errorlod_ri8sib(int *n_ind, int *n_mar, int *geno, double *error_prob, double *genoprob, double *errlod); /* end of hmm_ri8sib.h */ qtl/src/discan_covar.h0000644000176200001440000000774213355127045014464 0ustar liggesusers/********************************************************************** * * discan_covar.h * * copyright (c) 2004-2010, Karl W Broman * * last modified Jul, 2010 * first written Dec, 2004 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a genome scan with a binary * trait and a single QTL model in the presence of covariates. * * Contains: discan_covar, discan_covar_em, discan_covar_loglik, * R_discan_covar * **********************************************************************/ /********************************************************************** * * discan_covar * * Performs genome scan using interval mapping in the presence of * covariates. (The multipoint genotype probabilities have already * been calculated in calc.genoprob) * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * Genoprob Array of conditional genotype probabilities * indexed as Genoprob[gen][pos][ind] * * Addcov Matrix of additive covariates indexed as * Addcov[cov][ind] * * n_addcov Number of columns in Addcov * * Intcov Matrix of interactive covariates indexed as * Intcov[cov][ind] * * n_intcov Number of columns in Intcov * * pheno Phenotype data (0/1), as a vector * * start Starting values; vector of length * n_gen + n_addcov + n_intcov*(n_gen-1) * * result Result vector of length n_pos; upon return, contains * the LOD scores. * * maxit Maximum number of iterations in the EM algorithm * * tol Tolerance for determining convergence in EM * * verbose If 1, print out log likelihood at each iteration * * ind_noqtl Indicators (0/1) of which individuals should be excluded * from QTL effects. * **********************************************************************/ void discan_covar(int n_ind, int n_pos, int n_gen, double ***Genoprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, int *pheno, double *start, double *result, int maxit, double tol, int verbose, int *ind_noqtl); void R_discan_covar(int *n_ind, int *n_pos, int *n_gen, double *genoprob, double *addcov, int *n_addcov, double *intcov, int *n_intcov, int *pheno, double *start, double *result, int *maxit, double *tol, int *verbose, int *ind_noqtl); /********************************************************************** * * discan_covar_em * **********************************************************************/ double discan_covar_em(int n_ind, int pos, int n_gen, int n_par, double ***Genoprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, int *pheno, double *start, int maxit, double tol, int verbose, int *ind_noqtl); /********************************************************************** * * discan_covar_loglik * **********************************************************************/ double discan_covar_loglik(int n_ind, int pos, int n_gen, int n_par, double *par, double ***Genoprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, int *pheno, int *ind_noqtl); /* end of discan_covar.h */ qtl/src/findDupMarkers_notexact.h0000644000176200001440000000307512770016226016645 0ustar liggesusers/********************************************************************** * * findDupMarkers_notexact.h * * copyright (c) 2009, Karl W Broman * * last modified Jun, 2009 * first written Jun, 2009 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * This function is for identifying duplicate markers * where the observed genotypes for one marker match those of another marker, * with no observed genotypes for which the other is missing * * Contains: R_findDupMarkers_notexact, findDupMarkers_notexact * **********************************************************************/ void R_findDupMarkers_notexact(int *nind, int *nmar, int *geno, int *order, int *markerloc, int *adjacent_only, int *result); void findDupMarkers_notexact(int nind, int nmar, int **Geno, int *order, int *markerloc, int adjacent_only, int *result); /* end of findDupMarkers_notexact.h */ qtl/src/markerlrt.c0000644000176200001440000000565412770016226014025 0ustar liggesusers/********************************************************************** * * markerlrt.c * * copyright (c) 2010, Karl W Broman * * last modified Jul, 2010 * first written Jul, 2010 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a general likelihood ratio test for * each pair of markers, to assess their association. * * Contains: R_markerlrt, markerlrt * **********************************************************************/ #include #include #include #include #include #include #include #include "markerlrt.h" #include "util.h" void R_markerlrt(int *n_ind, int *n_mar, int *geno, int *maxg, double *lod) { int **Geno; double **Lod; reorg_geno(*n_ind, *n_mar, geno, &Geno); reorg_errlod(*n_mar, *n_mar, lod, &Lod); markerlrt(*n_ind, *n_mar, Geno, *maxg, Lod); } void markerlrt(int n_ind, int n_mar, int **Geno, int maxg, double **Lod) { int i, j, k, k2, *n1, *n2, **n12, n; allocate_imatrix(maxg, maxg, &n12); allocate_int(maxg, &n1); allocate_int(maxg, &n2); for(i=0; i #include #include #include #include #include #include #include #include #include "util.h" #include "fitqtl_imp_binary.h" #include "fitqtl_hk_binary.h" #define TOL 1e-12 #define IDXINTQ 15 /* maximum no. QTLs in an interaction */ #define IDXINTC 10 /* maximum no. covariates in an interaction */ void R_fitqtl_imp_binary(int *n_ind, int *n_qtl, int *n_gen, int *n_draws, int *draws, int *n_cov, double *cov, int *model, int *n_int, double *pheno, int *get_ests, /* return variables */ double *lod, int *df, double *ests, double *ests_covar, double *design_mat, /* convergence */ double *tol, int *maxit, int *matrix_rank) { int ***Draws; double **Cov=0; /* reorganize draws */ reorg_draws(*n_ind, *n_qtl, *n_draws, draws, &Draws); /* reorganize cov (if they are not empty) */ /* currently reorg_errlod function is used to reorganize the data */ if(*n_cov != 0) reorg_errlod(*n_ind, *n_cov, cov, &Cov); fitqtl_imp_binary(*n_ind, *n_qtl, n_gen, *n_draws, Draws, Cov, *n_cov, model, *n_int, pheno, *get_ests, lod, df, ests, ests_covar, design_mat, *tol, *maxit, matrix_rank); } /********************************************************************** * * fitqtl_imp_binary * * Fits a fixed multiple-QTL model by multiple imputation. * * n_ind Number of individuals * * n_qtl Number of QTLs in the model * * n_gen Number of different genotypes * * n_draws Number of impiutations * * Draws Array of genotype imputations, indexed as * Draws[draw][mar][ind] * * Cov covariates matrix, Cov[mar][ind] * * n_cov Number of covariates * * model Model matrix * * n_int Number of interactions in the model * * pheno Phenotype data, as a vector * * get_ests 0/1: If 1, return estimated effects and their variances * * lod Return LOD score * * df Return degree of freedom * * ests Return ests (vector of length sizefull) * * ests_covar Return covariance matrix of ests (sizefull^2 matrix) * * tol Tolerance for convergence * * maxit Maximum number of iterations in IRLS * * matrix_rank Return min (across imputations) of rank of design matrix * **********************************************************************/ void fitqtl_imp_binary(int n_ind, int n_qtl, int *n_gen, int n_draws, int ***Draws, double **Cov, int n_cov, int *model, int n_int, double *pheno, int get_ests, double *lod, int *df, double *ests, double *ests_covar, double *design_mat, double tol, int maxit, int *matrix_rank) { /* create local variables */ int i, j, ii, jj, n_qc, itmp; /* loop variants and temp variables */ double llik, llik0, *LOD_array; double *the_ests, *the_covar, **TheEsts, ***TheCovar; double *dwork, **Ests_covar, tot_wt=0.0, *wts; double **Covar_mean, **Mean_covar, *mean_ests; /* for ests and cov matrix */ int *iwork, sizefull, n_trim, *index; /* number to trim from each end of the imputations */ n_trim = (int) floor( 0.5*log(n_draws)/log(2.0) ); /* initialization */ sizefull = 1; /* calculate the dimension of the design matrix for full model */ n_qc = n_qtl+n_cov; /* total number of QTLs and covariates */ /* for additive QTLs and covariates*/ for(i=0; i 0; 2 -> 1. For F2, genotype 1 -> [0 0]; 2 -> [1 0]; 3 ->[0 1]. For 4-way, 1 -> [0 0 0], 2 -> [1 0 0], 3 -> [0 1 0], 4 -> [0 0 1] and so on */ for(i=0; i=0; k--) { itmp1 = idx_int_q[k]; tmp_idx += (Draws[itmp1][j]-2)*itmp2; itmp2 *= n_gen[idx_int_q[k]]; } if(tmp_idx != 0) kk = 0; x[(idx_col+tmp_idx)*n_ind+j] = 1; /* interaction with covariates */ for(k=0; k kk) *matrix_rank = kk; /* get ests; need to permute back */ for(i=0; i #include #include #include #include #include #include "hmm_main.h" #include "hmm_bgmagic16.h" #include "hmm_bc.h" #include "util.h" double init_bgmagic16(int true_gen, int *ignored) { return(-4.0*M_LN2); /* log(1/16) */ } double emit_bgmagic16(int obs_gen, int true_gen, double error_prob, int *ignored) { if(obs_gen==0) return(0.0); if(obs_gen & (1 << (true_gen-1))) return(log(1.0-error_prob)); else return(log(error_prob)); } double step_bgmagic16(int gen1, int gen2, double rf, double junk, int *ignored) { int tempi; double p0, tempd; if(gen1 == gen2) { tempd = 1.0-rf; tempd = tempd*tempd; p0 = tempd*tempd; } else { if(gen1 > gen2) { /* order gen1 and gen2 */ tempi = gen1; gen1 = gen2; gen2 = tempi; } if((gen1 == gen2 - 1) && (gen2 % 2 == 0)) { /* 1:2 case */ p0 = rf*(1.0-rf)*(1.0-rf)*(1.0-rf); } else if((gen2 - gen1 <= 4) && ((gen2 % 4 == 3) || (gen2 % 4 == 0))) { /* 1:3 case */ p0 = rf*(1.0-rf)*(1.0-rf)/2.0; } else if(gen2 <= 8 || gen1 > 8) { /* 1:5 case */ p0 = rf*(1.0-rf)/4.0; } else { /* 1:9 case */ p0 = rf/8.0; } } return( log( (1.0-rf)*(1.0-rf)*(1.0-rf) * (p0 - 1.0/16.0) + 1.0/16.0 ) ); } void calc_genoprob_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob(*n_ind, *n_mar, 16, geno, rf, rf, *error_prob, genoprob, init_bgmagic16, emit_bgmagic16, step_bgmagic16); } void calc_genoprob_special_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob_special(*n_ind, *n_mar, 16, geno, rf, rf, *error_prob, genoprob, init_bgmagic16, emit_bgmagic16, step_bgmagic16); } void argmax_geno_bgmagic16(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax) { argmax_geno(*n_ind, *n_pos, 16, geno, rf, rf, *error_prob, argmax, init_bgmagic16, emit_bgmagic16, step_bgmagic16); } void sim_geno_bgmagic16(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws) { sim_geno(*n_ind, *n_pos, 16, *n_draws, geno, rf, rf, *error_prob, draws, init_bgmagic16, emit_bgmagic16, step_bgmagic16); } void est_map_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose) { est_map(*n_ind, *n_mar, 16, geno, rf, rf, *error_prob, init_bgmagic16, emit_bgmagic16, step_bgmagic16, nrec_bc, nrec_bc, loglik, *maxit, *tol, 0, *verbose); } void marker_loglik_bgmagic16(int *n_ind, int *geno, double *error_prob, double *loglik) { marker_loglik(*n_ind, 16, geno, *error_prob, init_bgmagic16, emit_bgmagic16, loglik); } void calc_pairprob_bgmagic16(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob, double *pairprob) { calc_pairprob(*n_ind, *n_mar, 16, geno, rf, rf, *error_prob, genoprob, pairprob, init_bgmagic16, emit_bgmagic16, step_bgmagic16); } double errorlod_bgmagic16(int obs, double *prob, double error_prob) { double p=0.0, temp; int n=0, i; if(obs==0 || (obs == (1<<16) - 1)) return(0.0); for(i=0; i<16; i++) { if(obs & 1< #include #include #include #include #include #include "hmm_main.h" #include "hmm_ri4self.h" #include "hmm_bc.h" double init_ri4self(int true_gen, int *cross_scheme) { return(-2.0*M_LN2); } double emit_ri4self(int obs_gen, int true_gen, double error_prob, int *cross_scheme) { if(obs_gen==0) return(0.0); if(obs_gen & (1 << (true_gen-1))) return(log(1.0-error_prob)); else return(log(error_prob)); } double step_ri4self(int gen1, int gen2, double rf, double junk, int *cross_scheme) { if(gen1 == gen2) return(log(1.0-rf)-log(1.0+2.0*rf)); else return(log(rf)-log(1.0+2.0*rf)); } /* this is needed for est.map; estimated recombination fractions on the RIL scale */ double step_special_ri4self(int gen1, int gen2, double rf, double junk, int *cross_scheme) { if(gen1 == gen2) return(log(1.0-rf)); else return(log(rf) - log(3.0)); } void calc_genoprob_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob(*n_ind, *n_mar, 4, geno, rf, rf, *error_prob, genoprob, init_ri4self, emit_ri4self, step_ri4self); } void calc_genoprob_special_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *genoprob) { calc_genoprob_special(*n_ind, *n_mar, 4, geno, rf, rf, *error_prob, genoprob, init_ri4self, emit_ri4self, step_ri4self); } void argmax_geno_ri4self(int *n_ind, int *n_pos, int *geno, double *rf, double *error_prob, int *argmax) { argmax_geno(*n_ind, *n_pos, 4, geno, rf, rf, *error_prob, argmax, init_ri4self, emit_ri4self, step_ri4self); } void sim_geno_ri4self(int *n_ind, int *n_pos, int *n_draws, int *geno, double *rf, double *error_prob, int *draws) { sim_geno(*n_ind, *n_pos, 4, *n_draws, geno, rf, rf, *error_prob, draws, init_ri4self, emit_ri4self, step_ri4self); } /* for estimating map, must do things with recombination fractions on the RIL scale */ void est_map_ri4self(int *n_ind, int *n_mar, int *geno, double *rf, double *error_prob, double *loglik, int *maxit, double *tol, int *verbose) { int i; /* expand rf */ for(i=0; i< *n_mar-1; i++) rf[i] = 3.0*rf[i]/(1.0+2.0*rf[i]); est_map(*n_ind, *n_mar, 4, geno, rf, rf, *error_prob, init_ri4self, emit_ri4self, step_special_ri4self, nrec_bc, nrec_bc, loglik, *maxit, *tol, 0, *verbose); /* contract rf */ for(i=0; i< *n_mar-1; i++) rf[i] = rf[i]/(3.0-2.0*rf[i]); } /* expected no. recombinants */ double nrec2_ri4self(int obs1, int obs2, double rf, int *cross_scheme) { int n1, n2, n12, nr, and, i, nstr=4; if(obs1==0 || obs2==0) return(-999.0); /* this shouldn't happen */ n1=n2=n12=0; and = obs1 & obs2; /* count bits */ for(i=0; i #include #include #include #include #include #include #include "util.h" #include "info.h" /********************************************************************** * * R_info: calculates information contained in the genotype data for * a particular chromosome. * * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * genoprob Conditional genotype probabilities * * info1 Vector of length n_pos, to contain the output * (using the entropy version of the information) * * info2 Same as info1 (for the prop'n variance version * of the information) * * which 0 = only entropy version * 1 = only variance version * 2 = both * **********************************************************************/ void R_info(int *n_ind, int *n_pos, int *n_gen, double *genoprob, double *info1, double *info2, int *which) { int i, j, k; double ***Genoprob, p, s, ss; reorg_genoprob(*n_ind, *n_pos, *n_gen, genoprob, &Genoprob); for(i=0; i< *n_pos; i++) { R_CheckUserInterrupt(); /* check for ^C */ info1[i] = info2[i] = 0.0; for(j=0; j< *n_ind; j++) { s=ss=0.0; for(k=0; k< *n_gen; k++) { p = Genoprob[k][i][j]; if(*which != 1) if(p > 0) info1[i] += p*log(p); if(*which != 0) { s += p*(double)k; ss += p*(double)(k*k); } } if(*which != 0) info2[i] += (ss - s*s); } if(*which != 1) info1[i] /= (double)(*n_ind); if(*which != 0) info2[i] /= (double)(*n_ind); } } /* end of info.c */ qtl/src/mqmscan.cpp0000644000176200001440000003507413005646766014032 0ustar liggesusers/********************************************************************** * * mqmscan.cpp * * Copyright (c) 1996-2009 by * Ritsert C Jansen, Danny Arends, Pjotr Prins and Karl W Broman * * initial MQM C code written between 1996-2002 by Ritsert C. Jansen * improved for the R-language by Danny Arends, Pjotr Prins and Karl W. Broman * * Modified by Pjotr Prins and Danny Arends * last modified December 2009 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * **********************************************************************/ #include "mqm.h" #include #include using namespace std; inline int mqmmod(int a, int b) { return a%b; } /* * Helper function for truncate */ static double ftruncate(double n, double p = 3){ int sign = 1; // Assume positive sign if(n < 0) sign = -1; // Test the assumption and change the sign if needed double val = fabs((pow(10,p)) * n); val = floor(val); val /= pow(10,p); return (double) sign * val; } /* * Truncate a floating point to 3 decimal numbers. This is used for output * functions, in particular for regression tests - so floating point problems on * different platforms are eliminated */ double ftruncate3(double n){ return ftruncate(n,3); } double Lnormal(double residual, double variance) { //Now using R-library for Lnormal double result = dnorm(residual,0,sqrt(variance),0); debug_trace("Lnormal result:%f, residual: %f, variance %f\n",result,residual,variance); return result; } void reorg_pheno(int n_ind, int n_mar, double *pheno, double ***Pheno) { //reorganisation of doubles into a matrix int i; *Pheno = (double **)R_alloc(n_mar, sizeof(double *)); (*Pheno)[0] = pheno; for (i=1; i< n_mar; i++) (*Pheno)[i] = (*Pheno)[i-1] + n_ind; } void reorg_int(int n_ind, int n_mar, int *pheno, int ***Pheno) { //reorganisation of integers into a matrix int i; *Pheno = (int **)R_alloc(n_mar, sizeof(int *)); (*Pheno)[0] = pheno; for (i=1; i< n_mar; i++) (*Pheno)[i] = (*Pheno)[i-1] + n_ind; } /* * analyseF2 - analyse one F2/RIL/BC family * This is the main controller - called by mqmscan * * Returns logL */ double analyseF2(int Nind, int *nummark, cvector *cofactor, MQMMarkerMatrix marker, vector y, int Backwards, double **QTL,vector *mapdistance, int **Chromo, int Nrun, int RMLorML, double windowsize, double stepsize, double stepmin, double stepmax, double alfa, int em, int out_Naug, int **INDlist, char reestimate, MQMCrossType crosstype, bool dominance, int verbose) { if (verbose) Rprintf("INFO: Starting C-part of the MQM analysis\n"); int Naug, Nmark = (*nummark), run = 0; bool useREML = true, fitQTL = false; bool warned = false; ivector chr = newivector(Nmark); // The chr vector contains the chromosome number for every marker for(int i = 0; i < Nmark; i++){ // Rprintf("INFO: Receiving the chromosome matrix from R"); chr[i] = Chromo[0][i]; } if(RMLorML == 1) useREML=false; // use ML instead // Create an array of marker positions - and calculate R[f] based on these locations cvector position = relative_marker_position(Nmark,chr); vector r = recombination_frequencies(Nmark, position, (*mapdistance)); //Rprintf("INFO: Initialize Frun and informationcontent to 0.0"); const int Nsteps = (int)(chr[Nmark-1]*((stepmax-stepmin)/stepsize+1)); matrix Frun = newmatrix(Nsteps,Nrun+1); vector informationcontent = newvector(Nsteps); for (int i = 0; i < (Nrun+1); i++) { for (int ii = 0; ii < Nsteps; ii++) { if(i==0) informationcontent[ii] = 0.0; Frun[ii][i]= 0.0; } } bool dropj = false; int jj=0; // Rprintf("any triple of non-segregating markers is considered to be the result of:\n"); // Rprintf("identity-by-descent (IBD) instead of identity-by-state (IBS)\n"); // Rprintf("no (segregating!) cofactors are fitted in such non-segregating IBD regions\n"); for (int j=0; j < Nmark; j++) { // WRONG: (Nmark-1) Should fix the out of bound in mapdistance, it does fix, but created problems for the last marker dropj = false; if(j+1 < Nmark){ // Check if we can look ahead if(((*mapdistance)[j+1]-(*mapdistance)[j])==0.0){ dropj=true; } } if (!dropj) { marker[jj] = marker[j]; (*cofactor)[jj] = (*cofactor)[j]; (*mapdistance)[jj] = (*mapdistance)[j]; chr[jj] = chr[j]; r[jj] = r[j]; position[jj] = position[j]; jj++; } else{ if (verbose) Rprintf("INFO: Marker %d at chr %d is dropped\n",j,chr[j]); if ((*cofactor)[j]==MCOF) { if (verbose) Rprintf("INFO: Cofactor at chr %d is dropped\n",chr[j]); } } } //if(verbose) Rprintf("INFO: Number of markers: %d -> %d\n",Nmark,jj); Nmark = jj; (*nummark) = jj; // Update the array of marker positions - and calculate R[f] based on these new locations position = relative_marker_position(Nmark,chr); r = recombination_frequencies(Nmark, position, (*mapdistance)); debug_trace("After dropping of uninformative cofactors\n"); ivector newind; // calculate Traits mean and variance vector newy; MQMMarkerMatrix newmarker; double ymean = 0.0, yvari = 0.0; //Rprintf("INFO: Number of individuals: %d Number Aug: %d",Nind,out_Naug); int cur = -1; for (int i=0; i < Nind; i++){ if(INDlist[0][i] != cur){ ymean += y[i]; cur = INDlist[0][i]; } } ymean/= out_Naug; for (int i=0; i < Nind; i++){ if(INDlist[0][i] != cur){ yvari += pow(y[i]-ymean, 2); cur = INDlist[0][i]; } } yvari /= (out_Naug-1); Naug = Nind; // Fix for not doing dataaugmentation, we just copy the current as the augmented and set Naug to Nind Nind = out_Naug; newind = newivector(Naug); newy = newvector(Naug); newmarker = newMQMMarkerMatrix(Nmark,Naug); for (int i=0; i stepmax){ fatal("ERROR: Re-estimation of the map put markers at: %f Cm, run the algorithm with a step.max larger than %f Cm", max, max); } //Check if everything still is correct positions and R[f] position = relative_marker_position(Nmark,chr); r = recombination_frequencies(Nmark, position, (*mapdistance)); /* eliminate individuals with missing trait values */ //We can skip this part iirc because R throws out missing phenotypes beforehand int oldNind = Nind; for (int i=0; i1) { for (int ii=i+1; ii Nind){ fatal("Setting %d cofactors would leave less than 10 degrees of freedom.\n", cof_cnt); } } char reestimate = 'y'; if(re_estimate == 0) reestimate = 'n'; if (crosstype != CF2) { // Determine what kind of cross we have if (verbose==1) Rprintf("INFO: Dominance setting ignored (setting dominance to 0)\n"); // Update dominance accordingly domi = 0; } bool dominance=false; if(domi != 0){ dominance=true; } //WE HAVE EVERYTHING START WITH MAIN SCANNING FUNCTION analyseF2(Nind, &Nmark, &cofactor, (MQMMarkerMatrix)markers, Pheno[(Npheno-1)], Backwards, QTL, &mapdistance, Chromo, NRUN, RMLorML, Windowsize, Steps, Stepmi, Stepma, Alfa, Emiter, out_Naug, INDlist, reestimate, crosstype, dominance, verbose); if (re_estimate) { if (verbose==1) Rprintf("INFO: Sending back the re-estimated map used during the MQM analysis\n"); for (int i=0; i< Nmark; i++) { Dist[0][i] = mapdistance[i]; } } if (Backwards) { if (verbose==1) Rprintf("INFO: Sending back the model\n"); for (int i=0; i< Nmark; i++) { Cofactors[0][i] = cofactor[i]; } } if(verbose) Rprintf("INFO: All done in C returning to R\n"); #ifndef STANDALONE R_CheckUserInterrupt(); /* check for ^C */ R_FlushConsole(); #endif return; } /* end of function mqmscan */ /********************************************************************** * * R_mqmscan * **********************************************************************/ void R_mqmscan(int *Nind,int *Nmark,int *Npheno, int *geno,int *chromo, double *dist, double *pheno, int *cofactors, int *backwards, int *RMLorML,double *alfa,int *emiter, double *windowsize,double *steps,double *stepmi,double *stepma, int *nRun, int *out_Naug, int *indlist, double *qtl, int *reestimate, int *crosstype, int *domi, int *verbose) { int **Geno; int **Chromo; double **Dist; double **Pheno; double **QTL; int **Cofactors; int **INDlist; // Reorganise the pointers into arrays, singletons are just cast into the function reorg_geno(*Nind,*Nmark,geno,&Geno); reorg_int(*Nmark,1,chromo,&Chromo); reorg_pheno(*Nmark,1,dist,&Dist); // Here we have the assumption that step.min is negative this needs to be split in 2 reorg_pheno((int)(2*(*chromo) * (((*stepma)-(*stepmi))/ (*steps))),1,qtl,&QTL); reorg_pheno(*Nind,*Npheno,pheno,&Pheno); reorg_int(*Nmark,1,cofactors,&Cofactors); reorg_int(*out_Naug,1,indlist,&INDlist); mqmscan(*Nind,*Nmark,*Npheno,Geno,Chromo,Dist,Pheno,Cofactors,*backwards,*RMLorML,*alfa,*emiter,*windowsize,*steps,*stepmi,*stepma,*nRun,*out_Naug,INDlist,QTL, *reestimate,(RqtlCrossType)*crosstype,*domi,*verbose); } qtl/src/scanone_em_covar.c0000644000176200001440000003531712770016226015322 0ustar liggesusers/********************************************************************** * * scanone_em_covar.c * * copyright (c) 2001-2014, Karl W Broman * * last modified Mar, 2014 * first written Nov, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a genome scan with a * single QTL model by interval mapping (the EM algorithm) in the * presence of covariates. * * Contains: scanone_em_covar, estep_em_covar, mstep_em_covar * **********************************************************************/ #include #include #include #include #include #include #include #include #include #include "util.h" #include "scanone_em.h" #include "scanone_em_covar.h" #define TOL 1e-12 /********************************************************************** * * scanone_em_covar * * Performs genome scan using interval mapping in the presence of * covariates. (The multipoint genotype probabilities have already * been calculated in calc.genoprob) * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * Genoprob Array of conditional genotype probabilities * indexed as Genoprob[gen][pos][ind] * * Addcov Matrix of additive covariates indexed as * Addcov[cov][ind] * * n_addcov Number of columns in Addcov * * Intcov Matrix of interactive covariates indexed as * Intcov[cov][ind] * * n_intcov Number of columns in Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * result Result vector of length n_pos; upon return, contains * the LOD scores. * * maxit Maximum number of iterations in the EM algorithm * * tol Tolerance for determining convergence in EM * * verbose If 1, print out log likelihood at each iteration * * ind_noqtl Indicators (0/1) of which individuals should be excluded * from QTL effects. * **********************************************************************/ void scanone_em_covar(int n_ind, int n_pos, int n_gen, double ***Genoprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double *result, int maxit, double tol, int verbose, int *ind_noqtl) { int i, j, k, s, flag=0, n_par; double **wts, *param, *oldparam; int error_flag; double llik, oldllik=0.0, *work1, *work2, temp, sw; /* recenter phenotype to have mean 0, for possibly increased numerical stability */ for(i=0, temp=0.0; i tol*(fabs(oldparam[k])+tol*100.0)) { flag = 1; break; } } if(!flag) break; for(k=0; k #include #include #include #include #include #include "hmm_main.h" #include "util.h" void init_stepf(double *rf, double *rf2, int n_gen, int n_mar, int *cross_scheme, double stepf(int, int, double, double, int *), double **probmat) { int j,obs1,obs2,tmp1; for(j=0; j obs2) { tmp1 = obs2; obs2 = obs1; obs1 = tmp1; } tmp1 = ((obs2 * (obs2 - 1)) / 2) - 1; return(probmat[mar][obs1 + tmp1]); } void forward_prob(int i, int n_mar, int n_gen, int curpos, int *cross_scheme, double error_prob, int **Geno, double **probmat, double **alpha, double initf(int, int *), double emitf(int, int, double, int *)) { /* forward equations */ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ int j,v,v2; double errortol,salpha; /* initialize alpha */ /* curpos = -1: use error_prob always */ /* curpos >= 0: use TOL except when j == curpos, then use error_prob */ errortol = error_prob; if(curpos > 0) errortol = TOL; for(v=0; v= 0: use TOL except when j2+1 == curpos, then use error_prob */ errortol = error_prob; if(curpos >= 0) errortol = TOL; for(j2=n_mar-2; j2>=0; j2--) { if(curpos == j2+1) errortol = error_prob; for(v=0; v= 0) { j0 = curpos; jmax = j0 + 1; } /* calculate genotype probabilities */ for(j=j0; j= y[1]) { x[0] = x[1]; x[1] = x[3]; y[0] = y[1]; y[1] = y[3]; } else { x[2] = x[0]; x[0] = x[3]; y[2] = y[0]; y[0] = y[3]; } } /* handle boundary situations cleanly */ if((x[0] == 0.0 && y[0] >= y[1]) || (x[2] == 0.0 && y[2] >= y[1])) return(0.0); if((x[0] == 1.0 && y[0] >= y[1]) || (x[2] == 1.0 && y[2] >= y[1])) return(1.0); x[1] = (x[2] + x[0]) / 2.0; /* make negative if does not converge */ if(iter >= maxit) x[1] = - x[1]; return(x[1]); } /* end of hmm_util.c */ qtl/src/scantwo_em.h0000644000176200001440000002501212770016226014154 0ustar liggesusers/********************************************************************** * * scantwo_em.h * * copyright (c) 2001-6, Karl W Broman * * last modified Oct, 2006 * first written Nov, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for performing a 2-dimensional genome scan * with a 2-QTL model by interval mapping.(the EM algorithm). * * Contains: R_scantwo_1chr_em, scantwo_1chr_em, * R_scantwo_2chr_em, scantwo_2chr_em, * scantwo_em_estep, scantwo_em_mstep, scantwo_em_loglik, * **********************************************************************/ /********************************************************************** * * R_scantwo_1chr_em * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scantwo_1chr_em. * **********************************************************************/ void R_scantwo_1chr_em(int *n_ind, int *n_pos, int *n_gen, double *pairprob, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *weights, double *result, int *maxit, double *tol, int *verbose, int *n_col2drop, int *col2drop); /********************************************************************** * * scantwo_1chr_em * * Performs a 2-dimensional genome scan using the EM algorithm * for a two-QTL model with the two QTL residing on the same * chromosome. * * n_ind Number of individuals * * n_pos Number of marker positions * * n_gen Number of different genotypes * * Pairprob Array of joint genotype probabilities for QTL * pairs; indexed as Pairprob[gen1][gen2][pos1][pos2][ind] * where pos2 > pos1 (for pos2 <= pos1, points to nothing) * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * Result Result matrix of size [n_pos x n_pos]; the lower * triangle (row > col) contains the joint LODs while * the upper triangle (row < col) contains the LODs for * testing epistasis. * Note: indexed as Result[col][row] * * maxit Maximum number of iterations for EM * * tol Tolerance for determining convergence of EM * * verbose If >0, print any messages when errors occur * >1, print out log likelihoods at end of EM * and check that log likelihood doesn't go down * >2, print out initial and final log likelihoods * >3, print out log likelihood at each iteration * * n_col2drop For X chromosome, number of columns to drop * * col2drop For X chromosome, indicates which columns to drop * **********************************************************************/ void scantwo_1chr_em(int n_ind, int n_pos, int n_gen, double *****Pairprob, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double **Result, int maxit, double tol, int verbose, int n_col2drop, int *col2drop); /********************************************************************** * * R_scantwo_2chr_em * * Wrapper for call from R; reorganizes genotype prob and result matrix * and calls scantwo_2chr_em. * **********************************************************************/ void R_scantwo_2chr_em(int *n_ind, int *n_pos1, int *n_pos2, int *n_gen1, int *n_gen2, double *genoprob1, double *genoprob2, double *addcov, int *n_addcov, double *intcov, int *n_intcov, double *pheno, double *weights, double *result_full, double *result_add, int *maxit, double *tol, int *verbose); /********************************************************************** * * scantwo_2chr_em * * Performs a 2-dimensional genome scan using the EM algorithm * for a two-QTL model with the two QTL residing on the same * chromosome. * * n_ind Number of individuals * * n_pos1 Number of marker positions on chr 1 * * n_pos2 Number of marker positions on chr 2 * * n_gen1 Number of different genotypes on chr 1 * * n_gen2 Number of different genotypes on chr 2 * * Genoprob1 Array of genotype probabilities for chr 1 * indexed as Genoprob[gen][pos][ind] * * Genoprob2 Array of genotype probabilities for chr 2 * indexed as Genoprob[gen][pos][ind] * * Addcov Matrix of additive covariates: Addcov[cov][ind] * * n_addcov Number of columns of Addcov * * Intcov Number of interactive covariates: Intcov[cov][ind] * * n_intcov Number of columns of Intcov * * pheno Phenotype data, as a vector * * weights Vector of positive weights, of length n_ind * * Result_full Result matrix of size [n_pos1 x n_pos2] * containing the joint LODs * Note: indexed as Result[pos2][pos1] * * Result_add Result matrix of size [n_pos2 x n_pos1] * containing the LODs for add've models * also indexed as Result[pos2][pos1] * * maxit Maximum number of iterations for EM * * tol Tolerance for determining convergence of EM * * verbose If >0, print any messages when errors occur * >1, print out log likelihoods at end of EM * and check that log likelihood doesn't go down * >2, print out initial and final log likelihoods * >3, print out log likelihood at each iteration * **********************************************************************/ void scantwo_2chr_em(int n_ind, int n_pos1, int n_pos2, int n_gen1, int n_gen2, double ***Genoprob1, double ***Genoprob2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double **Result_full, double **Result_add, int maxit, double tol, int verbose); /********************************************************************** * * scantwo_em_mstep: M-step of the EM algorithm * * n_ind Number of individuals * * n_gen1 Number of possible genotypes at QTL 1 * * n_gen2 Number of possible genotypes at QTL 2 * * Addcov Additive covariates * * n_addcov Number of columns in Addcov * * Intcov Interactive covariates * * n_intcov Number of columns in Intcov * * pheno Phenotypes * * weights Vector of positive weights, of length n_ind * * Wts12 Pr(QTL1=v, QTL2=w | phenotype, model, marker data), * indexed as Wts[v][w][ind] * * Wts1 Marginal weights for QTL 1 * * Wts2 Marginal weights for QTL 2 * * param On output, the updated parameter estimates (incl resid SD) * * full_model If 1, include QTLxQTL interaction * * work1 Workspace of doubles, of length (n_par-1)*(n_par-1) * * work2 Workspace of doubles, of length (n_par-1) * * error_flag Set to 1 if X'X is singular * **********************************************************************/ void scantwo_em_mstep(int n_ind, int n_gen1, int n_gen2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double ***Wts12, double **Wts1, double **Wts2, double *param, int full_model, double *work1, double *work2, int *error_flag, int n_col2drop, int *allcol2drop, int verbose); /********************************************************************** * * scantwo_em_estep: E-step of the EM algorithm * * n_ind Number of individuals * * n_gen1 Number of possible genotypes at QTL 1 * * n_gen2 Number of possible genotypes at QTL 2 * * Probs Pr(QTL1=v, QTL2=w | multipoint marker data) * Indexed as Probs[v][w][ind] * * Wts12 The output: * Pr(QTL1=v, QTL2=w | marker data, phenotype, covar, param) * Indexed as Wts[v][w][ind] * * Wts1 Marginal weights for QTL 1 * * Wts2 Marginal weights for QTL 2 * * Addcov Additive covariates * * n_addcov Number of columns in Addcov * * Intcov Interactive covariates * * n_intcov Number of columns in Intcov * * pheno Phenotypes * * weights Vector of positive weights, of length n_ind * * param Current parameter estimates (including the resid SD) * * full_model If 1, use the full model (with QTLxQTL interaction) * * rescale If 1, rescale weights so that the sum to 1. * This is done so that by taking rescale=0, we can easily * calculate the log likelihood * **********************************************************************/ void scantwo_em_estep(int n_ind, int n_gen1, int n_gen2, double ***Probs, double ***Wts12, double **Wts1, double **Wts2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double *param, int full_model, int rescale, int n_col2drop, int *allcol2drop); double scantwo_em_loglik(int n_ind, int n_gen1, int n_gen2, double ***Probs, double ***Wts12, double **Wts1, double **Wts2, double **Addcov, int n_addcov, double **Intcov, int n_intcov, double *pheno, double *weights, double *param, int full_model, int n_col2drop, int *allcol2drop); /* end of scantwo_em.h */ qtl/src/hmm_main.c0000644000176200001440000012435212770016226013604 0ustar liggesusers/********************************************************************** * * hmm_main.c * * copyright (c) 2001-2010, Karl W Broman * * last modified Aug, 2010 * first written Feb, 2001 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 3, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but without any warranty; without even the implied warranty of * merchantability or fitness for a particular purpose. See the GNU * General Public License, version 3, for more details. * * A copy of the GNU General Public License, version 3, is available * at http://www.r-project.org/Licenses/GPL-3 * * C functions for the R/qtl package * * These functions are for the main HMM engine * * Contains: calc_genoprob, calc_genoprob_special, sim_geno, est_map, argmax_geno * calc_errorlod, est_rf, calc_pairprob, calc_pairprob_condindep, * R_calc_pairprob_condindep, marker_loglik * **********************************************************************/ #include #include #include #include #include #include #include #include "hmm_main.h" #include "util.h" /********************************************************************** * * calc_genoprob * * This function uses the hidden Markov model technology to calculate * the genotype probabilities at each of marker and (optionally) at * points between markers, conditional on all marker data for a * chromosome. This assumes data on a single chromosome * * n_ind Number of individuals * * n_pos Number of markers (or really positions at which to * calculate the genotype probabilities) * * n_gen Number of different genotypes * * geno Genotype data, as a single vector storing the matrix * by columns, with each column corresponding to a marker * * rf Recombination fractions * * rf2 A second set of recombination fractions, in case of * sex-specific maps (may be ignored) * * error_prob Genotyping error probability * * genoprob Genotype probabilities (the output); a single vector * stored by columns (ind moves fastest, then mar, then * genotype * * initf Function returning log Pr(g_i) * * emitf Function returning log Pr(O_i | g_i) * * stepf Function returning log Pr(g_2 | g_1) * **********************************************************************/ /* Note: true genotypes coded as 1, 2, ... but in the alpha's and beta's, we use 0, 1, ... */ void calc_genoprob(int n_ind, int n_pos, int n_gen, int *geno, double *rf, double *rf2, double error_prob, double *genoprob, double initf(int, int *), double emitf(int, int, double, int *), double stepf(int, int, double, double, int *)) { int i, j, j2, v, v2; double s, **alpha, **beta; int **Geno; double ***Genoprob; int cross_scheme[2]; /* cross scheme hidden in genoprob argument; used by hmm_bcsft */ cross_scheme[0] = (int)genoprob[0]; cross_scheme[1] = (int)genoprob[1]; genoprob[0] = 0.0; genoprob[1] = 0.0; /* allocate space for alpha and beta and reorganize geno and genoprob */ reorg_geno(n_ind, n_pos, geno, &Geno); reorg_genoprob(n_ind, n_pos, n_gen, genoprob, &Genoprob); allocate_alpha(n_pos, n_gen, &alpha); allocate_alpha(n_pos, n_gen, &beta); for(i=0; i