Mercurial > repos > devteam > dna_filtering
comparison plot_filter.py @ 0:9c0d844f4e48 draft
Imported from capsule None
| author | devteam |
|---|---|
| date | Mon, 28 Jul 2014 11:30:12 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9c0d844f4e48 |
|---|---|
| 1 | |
| 2 def validate(incoming): | |
| 3 """Validator for the plotting program""" | |
| 4 | |
| 5 bins = incoming.get("bins","") | |
| 6 col = incoming.get("col","") | |
| 7 | |
| 8 if not bins or not col: | |
| 9 raise Exception, "You need to specify a number for bins and columns" | |
| 10 | |
| 11 try: | |
| 12 bins = int(bins) | |
| 13 col = int(col) | |
| 14 except: | |
| 15 raise Exception, "Parameters are not valid numbers, columns:%s, bins:%s" % (col, bins) | |
| 16 | |
| 17 if not 1<bins<100: | |
| 18 raise Exception, "The number of bins %s must be a number between 1 and 100" % bins | |
| 19 |
