Skip to content

Commit

Permalink
add limited handling of deprecated cli options
Browse files Browse the repository at this point in the history
Also fixed example for --jre-option in documentation. Was misnamed and
requires a value.
  • Loading branch information
MikkelSchubert committed Sep 2, 2020
1 parent 255424d commit 734fbec
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Fixed
- Updated shebangs to 'python3'. Patch courtesy of Andreas Tille.
- Added minimal support for previously removed command-line options, to prevent the
pipelines from failing when used with old configuration files.


## [1.3.0] - 2020-08-31
Expand Down
2 changes: 1 addition & 1 deletion docs/bam_pipeline/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is accomplished by writing options in `~/.paleomix/bam_pipeline.ini`::
jar-root = /home/username/install/jar_root
bwa-max-threads = 1
temp-root = /tmp/username/bam_pipeline
jre-options =
jre-option = -Xmx4g
bowtie2-max-threads = 1

Options in the configuration file correspond directly to command-line options for the BAM pipeline, with leading dashes removed. For example, the command-line option `--max-threads` becomes `max-threads` in the configuration file.
Expand Down
7 changes: 6 additions & 1 deletion paleomix/pipelines/bam/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import paleomix.common.logging

from paleomix.resources import add_copy_example_command
from paleomix.common.argparse import ArgumentParser
from paleomix.common.argparse import ArgumentParser, SUPPRESS


_DEFAULT_CONFIG_FILES = [
Expand Down Expand Up @@ -176,3 +176,8 @@ def add_run_command(subparsers):
"to the JRE (Jave Runtime Environment); e.g. to change the "
"maximum amount of memory (default is -Xmx4g)",
)

# Removed options
parser.add_argument("--gatk-max-threads", help=SUPPRESS)
parser.add_argument("--progress-ui", help=SUPPRESS)
parser.add_argument("--ui-colors", help=SUPPRESS)
6 changes: 5 additions & 1 deletion paleomix/pipelines/phylo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def build_parser():
default="./data/prefixes",
help="Location of prefixes (FASTAs) [%(default)s]",
)
group.add_argument("--refseq-root", help=SUPPRESS)
group.add_argument(
"--destination",
default="./results",
Expand Down Expand Up @@ -127,4 +126,9 @@ def build_parser():
"with version requirements (if any).",
)

# Removed options
parser.add_argument("--refseq-root", help=SUPPRESS)
parser.add_argument("--progress-ui", help=SUPPRESS)
parser.add_argument("--ui-colors", help=SUPPRESS)

return parser
4 changes: 4 additions & 0 deletions paleomix/pipelines/zonkey/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,8 @@ def add_run_command(subparsers):
"with version requirements (if any).",
)

# Removed options
parser.add_argument("--progress-ui", help=SUPPRESS)
parser.add_argument("--ui-colors", help=SUPPRESS)

return parser

0 comments on commit 734fbec

Please sign in to comment.