INNER CODE UNIT · Python
validate_pipe_args
wwood/singlem · singlem/main.py:217
def validate_pipe_args(args, subparser='pipe'):
if not args.otu_table and not args.archive_otu_table and not args.taxonomic_profile and not args.taxonomic_profile_krona:
raise Exception("At least one of --output-taxonomic-profile, --output-taxonomic-profile-krona, --otu-table, or --archive-otu-table must be specified")
if args.output_jplace and args.assignment_method != pipe.PPLACER_ASSIGNMENT_METHOD:
raise Exception("If --output-jplace is specified, then --assignment-method must be set to %s" % pipe.PPLACER_ASSIGNMENT_METHOD)
if args.metapackage and args.singlem_packages:
raise Exception("Can only specify a metapackage or a singlem package set, not both")
if args.output_extras and not args.otu_table:
raise Exception("Can't use --output-extras without --otu-table")
if subparser == 'pipe':
if args.context_window is not None and args.context_window < 0:
raise Exception("--context-window must be a non-negative integer")
if args.include_inserts and not args.otu_table and not args.archive_otu_table:
raise Exception("Can't use --include-inserts without --otu-table or --archive-otu-table")
if args.metapackage and args.diamond_prefilter_db:
raise Exception("Can't use a metapackage with --diamond-prefilter-db")
if args.output_jplace and args.known_otu_tables:
raise Exception("Currently --output-jplace and --known-otu-tables are incompatible")