Commandline interface functions

class changeo.Commandline.CommonHelpFormatter(prog, indent_increment=2, max_help_position=24, width=None)

Bases: argparse.RawDescriptionHelpFormatter, argparse.ArgumentDefaultsHelpFormatter

Custom argparse.HelpFormatter


Checks that arguments have been provided and prints help if they have not.

Parameters:parser – An argparse.ArgumentParser defining the commandline arguments.
Returns:True if arguments are present. Prints help and exits if not.
Return type:boolean
changeo.Commandline.getCommonArgParser(seq_in=True, seq_out=True, paired=False, db_in=False, db_out=False, failed=True, log=True, annotation=True, multiproc=False)

Defines an ArgumentParser object with common pRESTO arguments

  • seq_in – If True include sequence input arguments
  • seq_out – If True include sequence output arguments
  • paired – If True defined paired-end sequence input and output arguments
  • db_in – If True include tab delimited database input arguments
  • db_out – If True include tab delimited database output arguments
  • failed – If True include arguments for output of failed results
  • log – If True include log arguments
  • annotation – If True include annotation arguments
  • multiproc – If True include multiprocessing arguments

An ArgumentParser object

Return type:


changeo.Commandline.parseCommonArgs(args, in_arg=None, in_types=None)

Checks common arguments from getCommonArgParser and transforms output options to a dictionary

  • args – Argument Namespace defined by ArgumentParser.parse_args
  • in_arg – String defining a non-standard input file argument to verify; by default [‘db_files’, ‘seq_files’, ‘seq_files_1’, ‘seq_files_2’, ‘primer_file’] are supported in that order
  • in_types – List of types (file extensions as strings) to allow for files in file_arg if None do not check type

Dictionary copy of args with output arguments embedded in the dictionary out_args

Return type: