Skip to content

Commit

Permalink
Add parameter checking to m/M/s options in oases_pipeline.py (Issue #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Mar 22, 2015
1 parent 09d7a40 commit a44b534
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/oases_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ def getOptions():
parser.add_option('-r', '--mergeOnly',dest='mergeOnly',help='Only do the merge',action='store_true',default=False)
parser.add_option('-c', '--clean',dest='clean',help='Clean temp files',action='store_true',default=False)
options, args = parser.parse_args()
if options.kmin % 2 == 0:
print '-m / --kmin must be an odd number'
sys.exit(2);
if options.kmax % 2 == 0:
print '-M / --kmax must be an odd number'
sys.exit(2);
if options.kstep % 2 != 0:
print '-s / --kstep must be an even number'
sys.exit(2);
if not options.mergeOnly and len(options.data) == 0:
parser.print_help()
print ''
Expand Down

0 comments on commit a44b534

Please sign in to comment.