biocore / Evident-initial-demo

Elucidating sampling effort for microbial analysis studies
7 stars 12 forks source link

Alpha rarefaction #16

Closed ElDeveloper closed 12 years ago

ElDeveloper commented 12 years ago

This branch integrates the functions from qiime.make_rarefaction_plots, removes some unused files and updates the test module for the evident.rarefaction module.

Things to check is to run the test_rarefaction.py script, note that it will take a while to run this script no longer than 3~4 minutes. If you need to inspect this file do not open it with any other text editor than Text Wrangler, all the others just fail horribly.

antgonza commented 12 years ago

Some issues:

FAILED (failures=1)

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/psp.py", line 351, in handler p.run()

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/psp.py", line 257, in run exec code in global_scope

File "/Users/antoniog/Sites/evident/evident/www/handler.psp", line 147, in webgl_string = make_pcoa_webgl_string_from_files(pcoa_headers, points, map_headers, map_data)

TypeError: make_pcoa_webgl_string_from_files() takes exactly 5 arguments (4 given)

= No demo alpha: Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/psp.py", line 351, in handler p.run()

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_python/psp.py", line 257, in run exec code in global_scope

File "/Users/antoniog/Sites/evident/evident/www/handler.psp", line 173, in tree_object=tree_object, std_type=form_input['viz'][6:])

TypeError: generate_alpha_rarefaction_plots_from_point_in_omega() got an unexpected keyword argument 'mapping_file_tuple'

ElDeveloper commented 12 years ago
evident:tests$ python test_rarefaction.py 
.....
----------------------------------------------------------------------
Ran 5 tests in 231.123s

OK

Which version of python are you using? We perhaps can discuss about the specific tests of this module.

antgonza commented 12 years ago

$ python --version Python 2.7.1

Maybe a problem with spaces and tabs?

ElDeveloper commented 12 years ago

Good point, are we using tabs or spaces? I'm asking this cause there are files that were changed from spaces to tabs whilst other were left with spaces, I'm not sure what could be the issue. I think we should stick to spaces, as that is what the PyCogent coding guidelines state but then again if that is an issue with some python version I wouldn't know what to choose.

ElDeveloper commented 12 years ago

I have ran this tests in two platforms and have seen them work correctly, if someone else can run this and confirm it is working that should be enough. :ghost:

ElDeveloper commented 12 years ago

The eleventh is the charm.