diff --git a/python/obi.py b/python/obi.py index 7f92fec..31fdb03 100644 --- a/python/obi.py +++ b/python/obi.py @@ -21,9 +21,15 @@ default_config = { 'software' : "The OBITools", 'log' : False, 'loglevel' : 'INFO', 'progress' : True, + 'inputURI' : None, 'defaultdms' : None, 'inputview' : None, - 'outputview' : None + 'outputview' : None, + 'skip' : 0, + 'only' : None, + 'skiperror' : True, + 'qualityformat' : 'sanger', + 'moltype' : 'nuc' } root_config_name='obi' diff --git a/python/obitools3/apps/optiongroups/__init__.py b/python/obitools3/apps/optiongroups/__init__.py index e2adef6..fcc142c 100644 --- a/python/obitools3/apps/optiongroups/__init__.py +++ b/python/obitools3/apps/optiongroups/__init__.py @@ -1,17 +1,23 @@ def addInputOption(optionManager): + + optionManager.add_argument( + dest='obi:inputURI', + metavar='index', + help='index root filename (produced by the oa index command)') + group = optionManager.add_argument_group("Restriction to a sub-part options", "Allow to limit analysis to a sub-part of the data file") group.add_argument('--skip', - action="store", dest="skip", + action="store", dest="obi:skip", metavar='', default=None, type='int', help="skip the N first sequences") group.add_argument('--only', - action="store", dest="only", + action="store", dest="obi:only", metavar='', default=None, type='int', @@ -21,30 +27,30 @@ def addInputOption(optionManager): "If not specified, a test is done to determine the file format") group.add_argument('--skip-on-error', - action="store_true", dest="skiperror", + action="store_true", dest="obi:skiperror", default=False, help="Skip sequence entries with parse error") group.add_argument('--quality-sanger', - action="store_const", dest="seqinformat", + action="store_const", dest="obi:qualityformat", default=None, const='sanger', help="Input file is in sanger fastq nucleic format (standard fastq)") group.add_argument('--quality-solexa', - action="store_const", dest="seqinformat", + action="store_const", dest="obi:qualityformat", default=None, const='solexa', help="Input file is in fastq nucleic format produced by solexa sequencer") group.add_argument('--nuc', - action="store_const", dest="moltype", + action="store_const", dest="obi:moltype", default=None, const='nuc', help="Input file contains nucleic sequences") group.add_argument('--prot', - action="store_const", dest="moltype", + action="store_const", dest="obi:moltype", default=None, const='pep', help="Input file contains protein sequences") diff --git a/python/obitools3/commands/grep.pyx b/python/obitools3/commands/grep.pyx index eebaac6..1852624 100644 --- a/python/obitools3/commands/grep.pyx +++ b/python/obitools3/commands/grep.pyx @@ -12,7 +12,8 @@ import time __title__="Grep view lines that match the given predicates" default_config = { 'inputview' : None, - 'outputview' : None + 'outputview' : None, + 'predicates' : [] } def addOptions(parser):