Re: User Created Inverse Matrix for Genetic Analysis

From: Butler, David <David.Butler_at_DEEDI.QLD.GOV.AU>
Date: Fri, 7 Aug 2009 12:49:48 +1000

Hi Michelle, My results from your example: > library(asreml, lib.loc="~/MyRlibrary") Loading required package: lattice > RMATINV.giv = read.table("rmatinv_208.txt", header=FALSE) #inverted matrix > testgeno = read.table("testgeno_180.txt", header=TRUE) #genotypes with phenotypes file > test.ped = read.table("testped_874.txt", header=TRUE) #pedigree file > testgeno$Animal<-as.factor(testgeno$Animal) > RMATINV2.giv = as.matrix(RMATINV.giv) > colnames(RMATINV2.giv) = c("9001":"9010") > rownames(RMATINV2.giv) = c("9001":"9010") > > test.asr = asreml(Fert ~ ARS.BFGL.BAC.10172, + random= ~ giv(Animal,var=T), + control = asreml.control(ginverse=list(Animal=RMATINV2.giv)), data=testgeno) asreml(): 2.00 Library: 2.00bi Run: Fri Aug 7 12:05:03 2009 Equations: 12 (2 dense) Initial update shrinkage factor: 0.316 LogLik S2 DF 11.0858 0.0140 8 12:05:03 (1 component(s) constrained) 11.1206 0.0152 8 12:05:03 (1 component(s) constrained) 11.1231 0.0152 8 12:05:03 (1 component(s) constrained) 11.1233 0.0152 8 12:05:03 (1 component(s) constrained) 11.1233 0.0152 8 12:05:03 (1 component(s) constrained) 11.1233 0.0152 8 12:05:03 11.1233 0.0152 8 12:05:03 Finished on: Fri Aug 7 12:05:03 2009 LogLikelihood Converged > summary(test.asr)$varcomp gamma component std.error z.ratio constraint giv(Animal, var = T) 1.011929e-07 1.543191e-09 7.715957e-10 2 Boundary R!variance 1.000000e+00 1.525000e-02 7.624999e-03 2 Positive In answer to your questions: 1. The ginverse as supplied in matrix form looks to have been used in tha analysis, and the variance component is bounded. I also checked the "harvey" example in the manual using a full A inverse instead of the sparse form and it seemed ok. 2. While it's not necessary to wrap it with "asreml.control()", the inverse matrix in whatever form must be given in the "ginverse" argument as you have done. Asreml determines if it is a matrix or 3 column dataframe and continues accordingly. A matrix with <= 3 columns will confuse it. 3. Animals in the data must appear in the ginverse. The ginv produced by asreml.Ainverse() has an attribute "rowNames" derived from the pedigree and naming the rows of the ginverse matrix. Asreml uses this to firstly check if all names in the data are in the pedigree and secondly "relabel" the factor levels if necessary. Dave. ________________________________ From: ASReml users discussion group [mailto:ASREML-L@DPI.NSW.GOV.AU] On Behalf Of Michelle Sent: Friday, 7 August 2009 2:51 AM To: ASREML-L@DPI.NSW.GOV.AU Subject: User Created Inverse Matrix for Genetic Analysis Hi- I have recently installed ASReml for R in Linux (Suse 11.1) and am attempting to do a genetic analysis (mixed model analysis) of some data and have been following the information provided in Chapter 5 of the ASReml-R instruction manual. What I would like to do, is incorporate an inverted genomic relationship matrix which I have already created instead of using an inverted matrix generated from the pedigree (created using asreml.Ainverse() as I understand it). From what I can tell, this is possible, but I am not sure if I am doing it correctly. This is what I have created so far that is generating some data: RMATINV.giv = read.table(file.choose(), header=FALSE) #inverted matrix testgeno = read.table(file.choose(), header=TRUE) #genotypes with phenotypes file test.ped = read.table(file.choose(), header=TRUE) #pedigree file testgeno$Animal<-as.factor(testgeno$Animal) RMATINV2.giv = as.matrix(RMATINV.giv) colnames(RMATINV2.giv) = c("9001":"9010") rownames(RMATINV2.giv) = c("9001":"9010") test.asr = asreml(Fert ~ ARS.BFGL.BAC.10172, random= ~ giv(Animal,var=T), control = asreml.control(ginverse=list(Animal=RMATINV2.giv)), data=testgeno) My questions are: 1) the pedigree file does not seem to be incorporatted into the analysis- is this ok and correct? 2) the format of my relationship matrix is a 10 by 10 matrix (not the default format of asreml which likes a row column value format.) It seems that it is ok and possible to leave the matrix in this format as long as this is indicated in control = asreml.control(ginverse=list(Animal=RMATINV2.giv)) as I have done. Is this correct? 3) Also, it is noted in the ASReml-R manual that all forms of an imported inverted matrix need to have a "rowNames" indicator...I'm not sure if I have done this. Files mentioned in the above code are attached. Thanks to anyone who can provide some information on this subject. Michelle -------------------- m2f -------------------- Sent using Mail2Forum (http://www.mail2forum.com). Read this topic online here: http://www.vsni.co.uk/forum/viewtopic.php?p=715#715 -------------------- m2f -------------------- Attachments: RMATInv.txt <http://www.vsni.co.uk/forum/files/rmatinv_208.txt> test.ped.txt <http://www.vsni.co.uk/forum/files/testped_874.txt> testgeno.txt <http://www.vsni.co.uk/forum/files/testgeno_180.txt> This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of their organisation. ********************************DISCLAIMER**************************** The information contained in the above e-mail message or messages (which includes any attachments) is confidential and may be legally privileged. It is intended only for the use of the person or entity to which it is addressed. If you are not the addressee any form of disclosure, copying, modification, distribution or any action taken or omitted in reliance on the information is unauthorised. Opinions contained in the message(s) do not necessarily reflect the opinions of the Queensland Government and its authorities. If you received this communication in error, please notify the sender immediately and delete it from your computer system network.
Received on Sat Aug 07 2009 - 12:49:48 EST

This webpage is part of the ASReml-l discussion list archives 2004-2010. More information on ASReml can be found at the VSN website. This discussion list is now deprecated - please use the VSN forum for discussion on ASReml. (These online archives were generated using the hypermail package.)