#9010: Upgrade biopython package to 1.54
---------------------------------+------------------------------------------
   Reporter:  mhampton           |       Owner:  tbd       
       Type:  enhancement        |      Status:  new       
   Priority:  major              |   Milestone:  sage-4.4.3
  Component:  optional packages  |    Keywords:            
     Author:                     |    Upstream:  N/A       
   Reviewer:                     |      Merged:            
Work_issues:                     |  
---------------------------------+------------------------------------------

Comment(by awebb):

 I tried the new Phylo module and it is nice. I had a problem with one
 example with networkx. (files in Tests/PhyloXML)
 {{{
 sage: from Bio import Phylo
 sage: import networkx, pylab
 sage: tree = Phylo.read('example.xml', 'phyloxml')
 sage: net = Phylo.to_networkx(tree)
 sage: networkx.draw(net)
 TypeError                                 Traceback (most recent call
 last)

 /home/adamwebb/download/biopython-1.54.p0/src/Tests/PhyloXML/<ipython
 console> in <module>()

 /home/math/sage/local/lib/python/networkx/drawing/nx_pylab.pyc in draw(G,
 pos, ax, hold, **kwds)
     108
     109     if pos is None:
 --> 110         pos=networkx.drawing.spring_layout(G) # default to spring
 layout
     111
     112     cf=pylab.gcf()

 /home/math/sage/local/lib/python/networkx/drawing/layout.pyc in
 fruchterman_reingold_layout(G, dim, pos, fixed, iterations, weighted,
 scale)
     209                                          weighted=weighted)
     210     except:
 --> 211         A=networkx.to_numpy_matrix(G)
     212         pos=_fruchterman_reingold(A,
     213                                   pos=pos_arr,

 /home/math/sage/local/lib/python/networkx/convert.pyc in
 to_numpy_matrix(G, nodelist, dtype, order)
     478         if (u in nodeset) and (v in nodeset):
     479             i,j = index[u],index[v]
 --> 480             M[i,j] += attrs.get('weight', 1)
     481             if undirected:
     482                 M[j,i] = M[i,j]

 TypeError: unsupported operand type(s) for +=: 'numpy.float64' and 'str'

 }}}

 The next line would be.
 sage: pylab.show()


 I installed pygraphviz as well and the other graphing examples worked.

 Adam

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9010#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to