Changeset 117

Show
Ignore:
Timestamp:
10/18/09 22:22:12 (3 years ago)
Author:
mauro
Message:

fix #8

Location:
plone4bio.base/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • plone4bio.base/trunk/docs/CHANGES.txt

    r113 r117  
    55plone4bio.base 1.0.2 (unreleased) 
    66================================= 
     7 
     8Bug Fixes 
     9--------- 
     10 
     11* fix #8 "sequence feature diagram generator does not support feature types containing ' '" 
    712 
    813plone4bio.base 1.0.1 (2009-09-21) 
  • plone4bio.base/trunk/src/plone4bio/base/browser/seqrecord.py

    r86 r117  
    4747        # FIXME: 
    4848        self.context.Description() 
    49         ## CHECK LUNGHEZZA LOCUS < 16 
    5049        seqrecord = self.context.seqrecord 
    51         if len(seqrecord.name) > 16: 
    52                 seqrecord.name = '' 
     50        # the maximum length of locus name, for genbak format, is 16 
     51        seqrecord.name = seqrecord.name[:16] 
     52        # features 
     53        for f in seqrecord.features: 
     54            f.type = f.type.replace(" ", "_") 
    5355        SeqIO.write([seqrecord, ], io, "genbank") 
    5456        return io.getvalue() 
  • plone4bio.base/trunk/src/plone4bio/base/png/seqrecord.py

    r85 r117  
    6060    seqrecord = context.seqrecord 
    6161    seqrecord.name = seqrecord.name[:16] 
     62    for f in seqrecord.features: 
     63        f.type = f.type.replace(" ", "_") 
    6264    SeqIO.write([seqrecord, ], genbank, "genbank") 
    6365    (stdoutdata, stderrdata) = graphics.communicate(genbank.getvalue())