Re: Output G and R matrices?

From: Andrew Swan <andrew.swan_at_UNE.EDU.AU>
Date: Fri, 12 Jun 2009 10:52:45 +1000

Jason - provided you know a scripting language (and of course everyone
should:-)) it's pretty easy to do yourself.

Attached is an example written in python of how you can parse an asr
file to get the relevant bits out. You run it from a command line like this:

python parseASR.py asrfilename

This program is a small part of a python module I use as a wrapper for
asreml - useful for batch processing and so on.

You could do similar things in perl, bash, or whatever language you know.

I imagine it would be simple to do with asreml-r as well.

Andrew

jason wrote:
>
> I am wondering if ASReml is capable of outputting G and R matrices so
> that I can use them with other software? Thanks!
>
> Jason
>
>
>
>
> -------------------- m2f --------------------
>
> Sent using Mail2Forum (http://www.mail2forum.com).
>
> Read this topic online here:
> http://www.vsni.co.uk/forum/viewtopic.php?p=598#598
>
> -------------------- m2f --------------------
>
>
>
>
> 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.
>

-- 
Andrew Swan PhD
Animal Genetics and Breeding Unit
University of New England
Armidale NSW 2350
ph : +61 2 6773 3209
fax: +61 2 6773 3266
mob: +61 402 209 990

#/usr/bin/env python import sys # get the filename as the last argument of the command line filename = sys.argv[-1] f = open(filename) # read through the file extracting the relevant bits readvar = 0 startstring = "Source" endstring = "Covariance/Variance/Correlation" n = 0 estimates = [] for line in f.readlines(): line = line[:-1] if readvar == 1 and line.find(endstring) == 1: readvar = 0 if readvar == 1: fields = line.split() estimates.append([fields[0],float(fields[-4])]) n += 1 if line.find(startstring) == 1: readvar = 1 # once you have the information in the estimates list you can do what you # like with it for label,val in estimates: print label,val
Received on Sat Jun 12 2009 - 10:52:45 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.)