# LICENSE: LGPL ############################################################################### from PyPedal import pyp_db from PyPedal import pyp_graphics from PyPedal import pyp_newclasses from PyPedal import pyp_nrm from PyPedal import pyp_reports from PyPedal.pyp_utils import pyp_nice_time if __name__ == '__main__': example = pyp_newclasses.loadPedigree(optionsfile='new_graphics.ini') # example_inbreeding = pyp_nrm.inbreeding(example) pyp_graphics.rmuller_spy_matrix_pil(example.nrm.nrm, fname='dog_sparsity.png', cutoff=0.01, do_outline=0, height=example.nrm.nrm.shape[0], width=example.nrm.nrm.shape[0]) pyp_graphics.rmuller_pcolor_matrix_pil(example.nrm.nrm, fname='dog_long_pcolored.png', do_outline=0, height=example.nrm.nrm.shape[0], width=example.nrm.nrm.shape[0]) #pyp_db.loadPedigreeTable(example) pyp_db.deleteTable(example) pyp_db.populatePedigreeTable(example) coi_by_year = pyp_reports.meanMetricBy(example, metric='fa', byvar='by') print 'coi_by_year: ', coi_by_year cby = coi_by_year del(cby[1900]) pyp_graphics.plot_line_xy(coi_by_year, gfilename='dog_coi_by_year', gtitle='', gxlabel='Birth year', gylabel='Coefficient of inbreeding') pyp_graphics.draw_pedigree(example, gfilename='dog_pedigree', gtitle='Dog pedigree',gformat='jpg',gsize='f')
from PyPedal import pyp_graphics from PyPedal import pyp_newclasses from PyPedal import pyp_nrm from PyPedal.pyp_utils import pyp_nice_time if __name__ == '__main__': print 'Starting pypedal.py at %s' % ( pyp_nice_time() ) example = pyp_newclasses.loadPedigree(optionsfile='new_classes.ini') if example.kw['messages'] == 'verbose': print '[INFO]: Forming numerator relationship matrix at %s' % ( pyp_nice_time() ) my_a = pyp_nrm.fast_a_matrix_r(example.pedigree,example.kw) if example.kw['messages'] == 'verbose': print '[INFO]: Visualizing NRM sparsity at %s' % ( pyp_nice_time() ) pyp_graphics.rmuller_spy_matrix_pil(my_a,fname='boichard2_spy.png') if example.kw['messages'] == 'verbose': print '[INFO]: Visualizing NRM in pseudocolor at %s' % ( pyp_nice_time() ) pyp_graphics.rmuller_pcolor_matrix_pil(my_a,fname='boichard2_pcolor.png') pyp_graphics.draw_pedigree(example, gfilename='boichard2_pedigree', \ gtitle='', gorient='p', gdirec='RL', gfontsize=12) print 'Stopping pypedal.py at %s' % ( pyp_nice_time() )
from PyPedal import pyp_db from PyPedal import pyp_graphics from PyPedal import pyp_newclasses from PyPedal import pyp_nrm from PyPedal import pyp_reports from PyPedal.pyp_utils import pyp_nice_time if __name__ == '__main__': example = pyp_newclasses.loadPedigree(optionsfile='new_graphics.ini') # example_inbreeding = pyp_nrm.inbreeding(example) pyp_graphics.rmuller_spy_matrix_pil(example.nrm.nrm, fname='dog_sparsity.png', cutoff=0.01, do_outline=0, height=example.nrm.nrm.shape[0], width=example.nrm.nrm.shape[0]) pyp_graphics.rmuller_pcolor_matrix_pil(example.nrm.nrm, fname='dog_long_pcolored.png', do_outline=0, height=example.nrm.nrm.shape[0], width=example.nrm.nrm.shape[0]) #pyp_db.loadPedigreeTable(example) pyp_db.deleteTable(example) pyp_db.populatePedigreeTable(example) coi_by_year = pyp_reports.meanMetricBy(example, metric='fa', byvar='by') print 'coi_by_year: ', coi_by_year cby = coi_by_year
from PyPedal import pyp_nrm from PyPedal.pyp_utils import pyp_nice_time if __name__ == '__main__': print 'Starting pypedal.py at %s' % (pyp_nice_time()) example = pyp_newclasses.loadPedigree(optionsfile='new_classes.ini') if example.kw['messages'] == 'verbose': print '[INFO]: Forming numerator relationship matrix at %s' % ( pyp_nice_time()) my_a = pyp_nrm.fast_a_matrix_r(example.pedigree, example.kw) if example.kw['messages'] == 'verbose': print '[INFO]: Visualizing NRM sparsity at %s' % (pyp_nice_time()) pyp_graphics.rmuller_spy_matrix_pil(my_a, fname='boichard2_spy.png') if example.kw['messages'] == 'verbose': print '[INFO]: Visualizing NRM in pseudocolor at %s' % ( pyp_nice_time()) pyp_graphics.rmuller_pcolor_matrix_pil(my_a, fname='boichard2_pcolor.png') pyp_graphics.draw_pedigree(example, gfilename='boichard2_pedigree', \ gtitle='', gorient='p', gdirec='RL', gfontsize=12) print 'Stopping pypedal.py at %s' % (pyp_nice_time())