Skip to content

Commit

Permalink
Make --case|--controls|--refr args mandatory for simlike command
Browse files Browse the repository at this point in the history
The `kevlar simlike` command supports an arbitrary number of VCF files as input. As a consequence, it's impossible to support the --case, --controls, and --refr arguments as positional arguments since --controls also supports an arbitrary number of values. The --case, --controls, and --refr settings are retained as option flags, but are now marked as mandatory. Closes #348.
  • Loading branch information
standage committed Feb 7, 2019
1 parent 3a3b8a0 commit 062e4e0
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions kevlar/cli/simlike.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,30 @@


def subparser(subparsers):
"""Define the `kevlar simlike` command-line interface."""

desc = "Sort variants by likelihood score"
subparser = subparsers.add_parser('simlike', description=desc,
add_help=False)
subparser = subparsers.add_parser(
'simlike', description='Sort variants by likelihood score',
add_help=False
)

count_args = subparser.add_argument_group(
'K-mer count files',
'Likelihood scores are based on the abundance of alternate allele '
'k-mers in each sample and on the abundance of reference allele '
'k-mers in the reference genome.'
)
count_args.add_argument('--case', metavar='CT',
help='k-mer counttable for case/proband')
count_args.add_argument('--controls', nargs='+', metavar='CT',
help='k-mer counttables for controls/parents/'
'siblings, 1 counttable per sample')
count_args.add_argument('--refr', metavar='REFR', help='k-mer '
'smallcounttable for reference genome')
count_args.add_argument(
'--case', metavar='CT', required=True,
help='k-mer counttable for case/proband'
)
count_args.add_argument(
'--controls', nargs='+', metavar='CT', required=True,
help='k-mer counttables for controls/parents/siblings, 1 counttable '
'per sample'
)
count_args.add_argument(
'--refr', metavar='REFR', required=True,
help='k-mer smallcounttable for reference genome'
)

thresh_args = subparser.add_argument_group(
'K-mer count thresholds',
Expand Down

0 comments on commit 062e4e0

Please sign in to comment.