Commits

James Taylor committed 5de81f6

motif.pwm.ScoringMatrix: unscored positions are set to nan.

Comments (0)

Files changed (1)

lib/bx/motif/pwm.py

     def score_string( self, string ):
         """
         Score each valid position in `string` using this scoring matrix. 
+        Positions which were not scored are set to nan.
         """
         rval = zeros( len( string ), float32 )
+        rval[:] = nan
         _pwm.score_string( self.values, self.char_to_index, string, rval )
         return rval