pypedal-devel Mailing List for PyPedal
Brought to you by:
wintermind
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John B. C. <jc...@ai...> - 2007-04-12 11:34:41
|
Gregor- Thanks very much for your kind remarks, as well as for your helpful comments. I'll take a look at the installer and see if I can sort that out. If you can help me put together a .deb for PyPedal that would be greatly appreciated. Please let me know a little about what you're doing with PyPedal, and if it's missing any tools that would help you. Best wishes, John -- Dr. John B. Cole, Research Geneticist Animal Improvement Programs Laboratory 10300 Baltimore Avenue BARC-West, Building 005, Room 306 Beltsville, Maryland 20705-2350 Telephone: (301) 504-8665 FAX: (301) 504-8092 E-mail: jc...@ai... |
From: Gregor G. <gre...@bf...> - 2007-04-12 09:54:18
|
Hi! I have taken some time to try your PyPedal package, which I find awesome! I am trying to install it on my Debian GNU/Linux box. I have some problems, but I think they might be related to system specific stuff. I will report you the whole procedure for Debian as it is very handy with its "apt" approach. I also did read some of the files in PyPedal folder after extracting. I noticed some small inconsistencies. Nothing spectacular, but I thought I might contribute something back, given that you give us whole package for free. --------------------------------------------------------------------------------------- Statement in README.txt <stolen from FLTK README>Contrary to popular belief, it can be used in commercial software! (Even Bill Gates could use it.) </stolen from FLTK README> is not all there it is to it. If you use GPL then commercial software can use your code only if they give their source. You need to use LGPL for what FLTK readme is referring to. I notice that LGPL is actually specified in setup.py and PKG_INFO files. I guess that README.txt i.e. licence stuff and whole COPYRIGHT section needs revision. * Expand copyright range in README.txt from 2001-2005 to 2001-2007. * Use this text for COPYRIGHT section if LGPL is the right licence This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This package 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA You can also download it from http://www.gnu.org/copyleft/lgpl.html in HTML and from http://www.gnu.org/copyleft/lgpl.txt in plain text format. --------------------------------------------------------------------------------------- * Why are pyparsing and ReportLab commented out in setup.py? * setup.py is referring to COPYING file, but there is no such file. * Now I see the source of my problem with installation. It is the use of setuptools. I might be totally wrong here as this is my first excursion to Python, but I guess that setuptools is also needed and you might add this info to the manual. When I have setuptools installed as a debian package I issued # python setup.py install running install running bdist_egg running egg_info writing requirements to PyPedal.egg-info/requires.txt writing PyPedal.egg-info/PKG-INFO writing top-level names to PyPedal.egg-info/top_level.txt writing dependency_links to PyPedal.egg-info/dependency_links.txt reading manifest file 'PyPedal.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'PyPedal.egg-info/SOURCES.txt' installing library code to build/bdist.linux-i686/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install creating build creating build/bdist.linux-i686 creating build/bdist.linux-i686/egg creating build/bdist.linux-i686/egg/EGG-INFO copying PyPedal.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO copying PyPedal.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO copying PyPedal.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO copying PyPedal.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO copying PyPedal.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/PyPedal-2.0.0b21-py2.4.egg' and adding 'build/bdist.linux-i686/egg' to it removing 'build/bdist.linux-i686/egg' (and everything under it) Processing PyPedal-2.0.0b21-py2.4.egg Copying PyPedal-2.0.0b21-py2.4.egg to /usr/lib/python2.4/site-packages Adding PyPedal 2.0.0b21 to easy-install.pth file Installed /usr/lib/python2.4/site-packages/PyPedal-2.0.0b21-py2.4.egg ---------------------------------------------------------------------- Log continues, but I can see PyPedal was installed! But why does the install continue (see bellow) with other dependencies? I have installed them before PyPedal; all of them and with versions that conform with conditions given in setup.py! ---------------------------------------------------------------------- Processing dependencies for PyPedal==2.0.0b21 Searching for testoob>=0.4 Reading http://www.python.org/pypi/testoob/ Reading http://testoob.sourceforge.net Reading http://sourceforge.net/project/showfiles.php?group_id=138557 Reading http://www.python.org/pypi/testoob/1.13 Best match: testoob 1.13 Downloading http://cheeseshop.python.org/packages/2.4/t/testoob/testoob-1.13-py2.4.egg#md5=6f3dd5eb45652e45a149790af37c6118 Processing testoob-1.13-py2.4.egg creating /usr/lib/python2.4/site-packages/testoob-1.13-py2.4.egg Extracting testoob-1.13-py2.4.egg to /usr/lib/python2.4/site-packages Adding testoob 1.13 to easy-install.pth file Installing testoob script to /usr/bin Installed /usr/lib/python2.4/site-packages/testoob-1.13-py2.4.egg Searching for pysqlite>=2.0.6 Reading http://www.python.org/pypi/pysqlite/ Reading http://pysqlite.org/ Reading http://www.python.org/pypi/pysqlite/2.3.3 Best match: pysqlite 2.3.3 Downloading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2.3.3.tar.gz Processing pysqlite-2.3.3.tar.gz Running pysqlite-2.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-3xpM20/pysqlite-2.3.3/egg-dist-tmp-nZUUnL warning: no files found matching 'doc/*.html' In file included from src/module.c:24: src/connection.h:33:21: error: sqlite3.h: No such file or directory In file included from src/module.c:24: src/connection.h:38: error: expected specifier-qualifier-list before ‘sqlite3’ In file included from src/module.c:25: src/statement.h:37: error: expected specifier-qualifier-list before ‘sqlite3’ src/module.c: In function ‘module_complete’: src/module.c:91: warning: implicit declaration of function ‘sqlite3_complete’ src/module.c: At top level: src/module.c:214: error: ‘SQLITE_OK’ undeclared here (not in a function) src/module.c:215: error: ‘SQLITE_DENY’ undeclared here (not in a function) src/module.c:216: error: ‘SQLITE_IGNORE’ undeclared here (not in a function) src/module.c:217: error: ‘SQLITE_CREATE_INDEX’ undeclared here (not in a function) src/module.c:218: error: ‘SQLITE_CREATE_TABLE’ undeclared here (not in a function) src/module.c:219: error: ‘SQLITE_CREATE_TEMP_INDEX’ undeclared here (not in a function) src/module.c:220: error: ‘SQLITE_CREATE_TEMP_TABLE’ undeclared here (not in a function) src/module.c:221: error: ‘SQLITE_CREATE_TEMP_TRIGGER’ undeclared here (not in a function) src/module.c:222: error: ‘SQLITE_CREATE_TEMP_VIEW’ undeclared here (not in a function) src/module.c:223: error: ‘SQLITE_CREATE_TRIGGER’ undeclared here (not in a function) src/module.c:224: error: ‘SQLITE_CREATE_VIEW’ undeclared here (not in a function) src/module.c:225: error: ‘SQLITE_DELETE’ undeclared here (not in a function) src/module.c:226: error: ‘SQLITE_DROP_INDEX’ undeclared here (not in a function) src/module.c:227: error: ‘SQLITE_DROP_TABLE’ undeclared here (not in a function) src/module.c:228: error: ‘SQLITE_DROP_TEMP_INDEX’ undeclared here (not in a function) src/module.c:229: error: ‘SQLITE_DROP_TEMP_TABLE’ undeclared here (not in a function) src/module.c:230: error: ‘SQLITE_DROP_TEMP_TRIGGER’ undeclared here (not in a function) src/module.c:231: error: ‘SQLITE_DROP_TEMP_VIEW’ undeclared here (not in a function) src/module.c:232: error: ‘SQLITE_DROP_TRIGGER’ undeclared here (not in a function) src/module.c:233: error: ‘SQLITE_DROP_VIEW’ undeclared here (not in a function) src/module.c:234: error: ‘SQLITE_INSERT’ undeclared here (not in a function) src/module.c:235: error: ‘SQLITE_PRAGMA’ undeclared here (not in a function) src/module.c:236: error: ‘SQLITE_READ’ undeclared here (not in a function) src/module.c:237: error: ‘SQLITE_SELECT’ undeclared here (not in a function) src/module.c:238: error: ‘SQLITE_TRANSACTION’ undeclared here (not in a function) src/module.c:239: error: ‘SQLITE_UPDATE’ undeclared here (not in a function) src/module.c:240: error: ‘SQLITE_ATTACH’ undeclared here (not in a function) src/module.c:241: error: ‘SQLITE_DETACH’ undeclared here (not in a function) src/module.c: In function ‘init_sqlite’: src/module.c:368: warning: implicit declaration of function ‘sqlite3_libversion’ src/module.c:368: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast error: Setup script exited with error: command 'gcc' failed with exit status 1 -- Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana PhD student Biotechnical Faculty www: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department blog: http://ggorjan.blogspot.com Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe tel: +386 (0)1 72 17 861 ---------------------------------------------------------------------- |
From: John C. <joh...@gm...> - 2004-09-10 20:05:15
|
I finally realized that I sent this to myself rather than to the list. D'oh! ---------- Forwarded message ---------- From: John B. Cole <jc...@ai...> Date: Thu, 02 Sep 2004 13:59:26 -0400 Subject: Re: [Pypedal-devel] Gianluca to John To: John Cole <joh...@gm...> Gianluca- Your questions do not seem boring. I am sometimes embarassed because a lot of the stuff in PyPedal happened on-the-fly rather than as the result of a planning process. > <>I'm sorry if I appear a little boring, but in this way I can > understand your > programming point of view... No problem. > <>I'd prefer to use the mailing list. I've still subscribed it. I installed it last night buyt have not yet used it much. Its CVS support does not fit well tieh Sourceforge. >Did you try eric3? > > Okay, I see what you mean now. If this is important to you we can look at that. My suggestion would be to put stubs in place while we focus on getting the basics working well. Once we feel like things work well then we can add the plugins (if you will) to handle things like GEDCOM. I did look at GEDCOM a while back but it is much more complicated than I need at the moment. If you are working with human pedigrees, though, we will probably need it in there. >When I talk about multiple sources I mean databases, plain text files, gedcom >files, xmls, pickled files and so on. Each one store pedigrees in a different >way. For this reason is better to do a Pedigree class that doesn't care about >pedigree format. if source is a list, you can define a factory function like >those: > > Ah, yes, the joys of writing good documentation! >you only save some parameter declarations. but in taht way you make your code >harder to understand > > I will look at them when I have some more time. Given that I have not really done anything with the config file yet maybe we should just not worry about it for the moment. I am still not sure that it will help much to have a configuration file, at least for the CLI. >I attach two files, an xml and a little class to parse it. To support both >options is not a good idea. decide what's the better for you; however this is >a secondary aspects. > > What you are proposing is more like, say, Numarray or PyGSL. Well, even R for that matter. Let's think about this some more. From the development point of view it would not be TOO hard to start off by wrapping the individual "libraries" that I have (pyp_io, pyp_nrm, etc.) into classes. Then we would get: myped = Pedigree(<stuff>) mymetrics = Metrics(myped) f_a = mymetrics.effective_founders_lacy() I kind of like that! >Ok, sorry. Regarding this point. I thinked that there are two different >strategies in structuring classes of pypedal. One is to build a pedigree >class that contains all calculation methods. The other is to build a pedigree >class that only store a pedigree and different classes that take a pedigree >instance as __init__ argument and perform specific calculation. > > See the note below on pad_id() >Than -1 can be a reasonable value? So animals without "by" in sorting pedigree >comes allways before all others > > Boichard, D., Maignel, L., and Verrier, E. 1997. The value of using probabilities of gene origin to measure genetic variability in a population. Genetics, Selection, Evolution. 29:5-23. >Have you an article or a something else that can be attached in an e-mail that >can me explain the Boichard algorithms? I googled for that but I didn't find >nothing. > > The pad_id() function is used by the fast_reorder() procedure in pyp_utils. It is basically a hash function that uses an individual's birthdate to insure that parents will precede their offspring when a sort is performed on the padded ID. This makes reordering the pedigree MUCH faster ( O(n) ) than reordering by inspection, which can require multiple passes through the pedigree. That is one of the reasons that there is a default birthyear of 1900. Given that, using a default of "-1" for by will not break this routine because any offspring with known bys will sort after the parents. >A question, what is the pad_id() function intended for? > > Right, which would be used by the (so-far nonexistent) peeling module. >At the moment there is not need for managing multiple markers information, but >in the (far?) future the class pedigree can be extended to perform some >calculation on genotype, for example haplotype extimation, linkage >disequilibrium etc... > > I put a note about your feature request on the website. In short, I think that we can use str(hash(<name>)) to assign an animalID from a name. The name could be retained in the name field. This would only break when using names with spaces and reading from a space-delimited text file. > #gs: This concerns the feature I ask for. Do you think it is possible >to use STRING animal's(person's) ID? > John. -- Dr. John B. Cole, Research Geneticist Animal Improvement Programs Laboratory 10300 Baltimore Avenue BARC-West, Building 005, Room 306 Beltsville, Maryland 20705-2350 Telephone: (301) 504-8666 FAX: (301) 504-8092 E-mail: jc...@ai... -- Dr. John B. Cole, Research Geneticist Animal Improvement Programs Laboratory 10300 Baltimore Avenue BARC-West, Building 005, Room 306 Beltsville, Maryland 20705-2350 |
From: John C. <joh...@gm...> - 2004-09-02 00:37:25
|
Alle 21:36, mercoled=EC 01 settembre 2004, John Cole, ha scritto: > I have attached a file, pyp_newclasses_gianluca.py, with responses to > your questions. They are denoted "JB:". Let me know if I failed to > answer your questions clearly. Please remember that I have only > worked on pyp_newclasses.py a little bit -- the code does NOT work yet > and there are lots of missing pieces. I'm sorry if I appear a little boring, but in this way I can understand you= r programming point of view... > Also please bear in mind that > the code evolved to meet my personal needs, so my design decisions may > not always make sense. There were a lot of deadlines that I had to > meet to get my dissertation done in time to graduate. :-) I am going > to create a developer forum on the Sourceforge site -- I think that it > would be better to have these design discussions there so that I do > not lose any ideas. I'd prefer to use the mailing list. I've still subscribed it. > As far as spaces versus tabs goes, I do not really care. If you > prefer spaces then we will use spaces. You will see that there is a > mix of the two styles in the CVS tree; I keep trying different editors > and cannot find one that I really like. Maybe I should try WingIDE. Did you try eric3? http://www.die-offenbachs.de/detlev/eric3.html It's a little boring to install, 'cause it runs with qt and needs also qscintilla, sip, pyqt, but when I tried it, I really SAW THE LIGHT! # JB: At the moment source is not checked until the file is opened (= if if exists), so for now it assumes that the # user will know what to do when Python throws a file-not-found exception. We can check it here to save a little # time, I guess. # JB: As far as source being multiple files...we would have to do a little more work to make sure that there are no # animalID collisions between the two files but I do not see any reason why pedigree data could not be loaded # from more than one source. This would require multiple calls = to load() but that is doable. When I talk about multiple sources I mean databases, plain text files, gedc= om files, xmls, pickled files and so on. Each one store pedigrees in a differe= nt way. For this reason is better to do a Pedigree class that doesn't care abo= ut pedigree format. if source is a list, you can define a factory function lik= e those: def pedigree_from_file(inputfile, format, ecc.): list=3Dsome_operation_on_input_file() return Pedigree(list, other_arguments) def pedigree_from_db(driver, user, passwd, db, sql_statement): list=3Dsome_operation_on_db() return Pedigree(list, other_arguments) # GS: Here all arguments specified in kw becomes class attributes: (python 2.2 and later) # JB: I have not used the **kw construct before, but I want to. If you look at some of the # procedures in pyp_utils.py you will see that a ridiculous numb= er of aprameters are # passed explicitly. Using **kw is a little bit better way to handle that. you only save some parameter declarations. but in taht way you make your co= de harder to understand # So let's learn how to read things in from a configuration file. #GS: for such kind of operations I prefer to use XML file. Xmls are harder to modify by and, by easier to #GS: modify by a routine. Please, remeber me to send you a little class to manage configuration xml. # JB: This is probably a matter of personal preference. I feel that an XML configuration file is needlessly # complex. In fact, I feel strongly enough about that to insist on using ConfigParser OR to support both # styles of configuration file. You can try and change my mind = if you like, but you probably will not # succeed. :-) I attach two files, an xml and a little class to parse it. To support both options is not a good idea. decide what's the better for you; however this = is a secondary aspects. #GS: From where renumber comes? have you forgotten module reference? # JB: This is NOT working code. The idea is that renumber will = be moved from # pyp_utils.py to a method of this class. Ok, sorry. Regarding this point. I thinked that there are two different strategies in structuring classes of pypedal. One is to build a pedigree class that contains all calculation methods. The other is to build a pedigr= ee class that only store a pedigree and different classes that take a pedigree instance as __init__ argument and perform specific calculation. I make a little schema to better understand myself :-)) class Pedigree: def __init__(self, arguments...): methods and attributes class demog: def __init__(self, PedInstance, ecc) ... def age_distribution(self): pass class metrics: def __init__(self, pedinstance): ecc __init__(self,animalID,sireID,damID,gen=3D'0',by=3D1900,sex=3D'u',fa=3D0.,n= ame=3D'u',alleles=3D['',''],species=3D'u',breed=3D'u',age=3D-999,alive=3D-9= 99): #GS: Why to set by=3D1900? In humans pedigree this can provide some matters. I'd prefer None # JB: This is an arbitrary number. The code was originally written = to work with dog pedigrees that had complete # birthdate information. If we set it to None then we will need to trap that in some other procedures/methods. Than -1 can be a reasonable value? So animals without "by" in sorting pedig= ree comes allways before all others # For example, the Boichard algorithms for effective founder and ancestor numbers require generation information. # When generations are not provided in the pedigree file they ar= e inferred using, in part, birth year. I am open to # changing this. Have you an article or a something else that can be attached in an e-mail t= hat can me explain the Boichard algorithms? I googled for that but I didn't fin= d nothing. # JB: Oh! The pad_id() method uses the birthdate to form the padded ID. A question, what is the pad_id() function intended for? #GS: As soon as I can understand only two alleles can be specified. # JB: Because I only added alleles to support gene dropping. I am open to changing this as well -- # human geneticists probably need to handle more information tha= n that. At the moment there is not need for managing multiple markers information, = but in the (far?) future the class pedigree can be extended to perform some calculation on genotype, for example haplotype extimation, linkage disequilibrium etc... so can be useful a structure like a dictionary: genotype=3D{'markerName':["allele1", "allelee"],'anothermarkerName':["allel= e1", "allelee"],...} if alleles =3D=3D ['',''] and self.founder =3D=3D 'y': _allele_1 =3D '%s%s' % (self.paddedID,'__1') _allele_2 =3D '%s%s' % (self.paddedID,'__2') here is an answer for the question above. #gs: This concerns the feature I ask for. Do you think it is possib= le to use STRING animal's(person's) ID? #gs: perhaps with a mandatoru renumber. # JB: I think that it would not be too hard to do that. We just nee= d to hash the string to an integer somehow. # Once that is done the reorder and renumber routines should handle it from there. # JB: The DEBUG statements should (perhaps) have a different name. = I use them to track what the program # is doing even when it is working correctly. Maybe a verbose switch would be a good replacement here. # the debug statements are called even when there are no eception= s thrown (and therefore no tracebacks). Ok --=20 Dr. John B. Cole, Research Geneticist Animal Improvement Programs Laboratory 10300 Baltimore Avenue BARC-West, Building 005, Room 306 Beltsville, Maryland 20705-2350 |