Giter Site home page Giter Site logo

udem-lbit / gatc Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 2.72 MB

Genetic Algorithm for gene Tree Construction/Correction optimal under sequence likelihood and reconciliation score

License: GNU General Public License v3.0

Python 22.88% C 77.12%
gene-trees genetic-algorithm

gatc's People

Contributors

maclandrol avatar victor333huesca avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gatc's Issues

errors when using --rectype lkl

Hello, first off, thanks for making this tool! I've been wanting a model-based tree reconciliation algorithm that works on large trees for years! (DLRS can't seem to handle very large trees with many many duplication events). Anyway, unfortunately it seems that the model-based function in your program isn't working right- when I run the example command with "--rectype par" it seems to work fine, but changing it to "--rectype lkl" causes it to throw the following error:

Traceback (most recent call last):
File "/usr/local/bin/gatc", line 793, in
crossrate=args.crossrate, fastconv=args.fastconv, sclparam=scalparam, selector=selectors[args.selector], logfile=args.output + "_ga.log")
File "/usr/local/bin/gatc", line 279, in evolve_ga
ga.setScaleParam(sclparam)
File "/home/sean/tools/GATC/lib/ga/evolve/GSimpleGA.py", line 302, in setScaleParam
self.internalPop.setScaleMethod(param.get_scaling_func())
File "/usr/local/bin/gatc", line 86, in get_scaling_func
return partial(scalemet, weight=self.weight, keepraw=self.keepraw)
AttributeError: ScalingParams instance has no attribute 'keepraw'

Looking at the ScalingParams class in the gatc script, it appears that in the init script the keepraw argument doesn't get added to the attributes. Hoping for an easy fix, I added "self.keepraw=keepraw" to the init function, and that just caused the following error:

Traceback (most recent call last):
File "/usr/local/bin/gatc", line 794, in
crossrate=args.crossrate, fastconv=args.fastconv, sclparam=scalparam, selector=selectors[args.selector], logfile=args.output + "_ga.log")
File "/usr/local/bin/gatc", line 321, in evolve_ga
ga.evolve(freq_stats=freqstat)
File "/home/sean/tools/GATC/lib/ga/evolve/GSimpleGA.py", line 595, in evolve
self.internalPop.evaluate(ga_engine=self)
File "/home/sean/tools/GATC/lib/ga/evolve/GPopulation.py", line 468, in evaluate
ind.evaluate(**args)
File "/home/sean/tools/GATC/lib/ga/evolve/GenomeBase.py", line 103, in evaluate
for it in self.evaluator.applyFunctions(self, **args):
File "/home/sean/tools/GATC/lib/ga/evolve/FunctionSlot.py", line 177, in applyFunctions
yield f(obj, **args)
File "/home/sean/tools/GATC/lib/ga/GPolySolver.py", line 436, in costEvaluate
return engine.recparam.computeRecCost(genome, **args)
File "/home/sean/tools/GATC/lib/ga/ReconParams.py", line 183, in computeRecCost
Qef = computeMat(dtlparams.getHash(), self, dtlparams)
File "/home/sean/tools/GATC/lib/TreeLib/memorize.py", line 26, in call
if self.cache.has_key(hashrep):
File "/usr/lib/python2.7/shelve.py", line 107, in has_key
return key in self.dict
File "/usr/lib/python2.7/_abcoll.py", line 388, in contains
self[key]
File "/usr/lib/python2.7/bsddb/init.py", line 270, in getitem
return _DeadlockWrap(lambda: self.db[key]) # self.db[key]
File "/usr/lib/python2.7/bsddb/dbutils.py", line 68, in DeadlockWrap
return function(*_args, **_kwargs)
File "/usr/lib/python2.7/bsddb/init.py", line 270, in
return _DeadlockWrap(lambda: self.db[key]) # self.db[key]
TypeError: Integer keys only allowed for Recno and Queue DB's

At this point I'm beyond my debugging capacity, and I figured that it's possible that I'm just supposed to use different arguments with the lkl rectype so I thought I'd just ask how to run it.

Thanks!
Sean

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.