Permalink
Browse files

isinstance() is the proper way to check an object's class.

  • Loading branch information...
cbrueffer authored and peterjc committed Nov 23, 2012
1 parent 6d60367 commit 85f581bea733695e9647da8694300ab07090bea5
Showing with 8 additions and 8 deletions.
  1. +8 −8 Bio/Motif/Applications/_AlignAce.py
@@ -34,28 +34,28 @@ class AlignAceCommandline(AbstractCommandline):
def __init__(self, cmd="AlignACE", **kwargs):
self.parameters = \
[
- _Option(["-i","input"],["input"],lambda x : x.__class__== str,1,
+ _Option(["-i","input"],["input"],lambda x : isinstance(x, str),1,
"Input Sequence file in FASTA format."),
- _Option(["-numcols","numcols"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-numcols","numcols"],["input"],lambda x : isinstance(x, int),0,
"Number of columns to align"),
- _Option(["-expect","expect"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-expect","expect"],["input"],lambda x : isinstance(x, int),0,
"number of sites expected in model "),
- _Option(["-gcback","gcback"],["input"],lambda x : x.__class__== float,0,
+ _Option(["-gcback","gcback"],["input"],lambda x : isinstance(x, float),0,
"background fractional GC content of input sequence"),
- _Option(["-minpass","minpass"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-minpass","minpass"],["input"],lambda x : isinstance(x, int),0,
"minimum number of non-improved passes in phase 1"),
- _Option(["-seed","seed"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-seed","seed"],["input"],lambda x : isinstance(x, int),0,
"set seed for random number generator (time)"),
- _Option(["-undersample","undersample"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-undersample","undersample"],["input"],lambda x : isinstance(x, int),0,
"possible sites / (expect * numcols * seedings)"),
- _Option(["-oversample","oversample"],["input"],lambda x : x.__class__== int,0,
+ _Option(["-oversample","oversample"],["input"],lambda x : isinstance(x, int),0,
"1/undersample"),
]
AbstractCommandline.__init__(self, cmd, **kwargs)

0 comments on commit 85f581b

Please sign in to comment.