From f0f7edf152f34b92325102c0a5c2034ffec29d1d Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Sat, 21 Sep 2019 12:08:36 +0200 Subject: [PATCH] Python API: small option improvements --- python/obitools3/apps/optiongroups/__init__.py | 9 ++++++++- python/obitools3/commands/alignpairedend.pyx | 10 +++++----- python/obitools3/commands/uniq.pyx | 6 +++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/python/obitools3/apps/optiongroups/__init__.py b/python/obitools3/apps/optiongroups/__init__.py index 6dbd250..94171e3 100755 --- a/python/obitools3/apps/optiongroups/__init__.py +++ b/python/obitools3/apps/optiongroups/__init__.py @@ -222,8 +222,11 @@ def __addDMSOutputOption(optionManager): group.add_argument('--no-create-dms', action="store_true", dest="obi:nocreatedms", default=False, - help="Don't create an output DMS is it is not existing") + help="Don't create an output DMS it does not already exist") + +def __addEltLimitOption(optionManager): + group = optionManager.add_argument_group("Option to limit the number of elements per line in columns") group.add_argument('--max-elts', action="store", dest="obi:maxelts", metavar='', @@ -306,3 +309,7 @@ def addAllOutputOption(optionManager): def addNoProgressBarOption(optionManager): __addNoProgressBarOption(optionManager) +def addEltLimitOption(optionManager): + __addEltLimitOption(optionManager) + + \ No newline at end of file diff --git a/python/obitools3/commands/alignpairedend.pyx b/python/obitools3/commands/alignpairedend.pyx index 2530f63..6a1bd97 100755 --- a/python/obitools3/commands/alignpairedend.pyx +++ b/python/obitools3/commands/alignpairedend.pyx @@ -45,17 +45,17 @@ def addOptions(parser): type=float, help="Minimum score for keeping alignments") - group.add_argument('-A', '--true-ali', - action="store_true", dest="alignpairedend:trueali", - default=False, - help="Performs gap free end alignment of sequences instead of using kmers to compute alignments (slower).") +# group.add_argument('-A', '--true-ali', +# action="store_true", dest="alignpairedend:trueali", +# default=False, +# help="Performs gap free end alignment of sequences instead of using kmers to compute alignments (slower).") group.add_argument('-k', '--kmer-size', action="store", dest="alignpairedend:kmersize", metavar="#", default=3, type=int, - help="K-mer size for kmer comparisons, between 1 and 4 (not when using -A option; default: 3)") + help="K-mer size for kmer comparisons, between 1 and 4 (default: 3)") la = QSolexaReverseAssemble() diff --git a/python/obitools3/commands/uniq.pyx b/python/obitools3/commands/uniq.pyx index 5bad7a2..c0c437a 100644 --- a/python/obitools3/commands/uniq.pyx +++ b/python/obitools3/commands/uniq.pyx @@ -10,7 +10,10 @@ from obitools3.dms.column.column cimport Column, Column_line from obitools3.dms.capi.obiview cimport QUALITY_COLUMN, COUNT_COLUMN, NUC_SEQUENCE_COLUMN, ID_COLUMN, TAXID_COLUMN, \ TAXID_DIST_COLUMN, MERGED_TAXID_COLUMN, MERGED_COLUMN, MERGED_PREFIX from obitools3.dms.capi.obitypes cimport OBI_INT, OBI_STR, index_t -from obitools3.apps.optiongroups import addMinimalInputOption, addMinimalOutputOption, addTaxonomyOption +from obitools3.apps.optiongroups import addMinimalInputOption, \ + addMinimalOutputOption, \ + addTaxonomyOption, \ + addEltLimitOption from obitools3.uri.decode import open_uri from obitools3.apps.config import logger from obitools3.utils cimport tobytes, tostr @@ -27,6 +30,7 @@ def addOptions(parser): addMinimalInputOption(parser) addTaxonomyOption(parser) addMinimalOutputOption(parser) + addEltLimitOption(parser) group = parser.add_argument_group('obi uniq specific options')