Data Integrator (Python API)
Public Member Functions | Static Public Attributes | List of all members
cls.ArgumentParserBase.CArgumentParserBase Class Reference

Argument parser for Dintegrator shell scripts. More...

Inheritance diagram for cls.ArgumentParserBase.CArgumentParserBase:
Inheritance graph
[legend]
Collaboration diagram for cls.ArgumentParserBase.CArgumentParserBase:
Collaboration graph
[legend]

Public Member Functions

def __init__ (s, version, **kw)
 Ctor. More...
 
def GetVersion (s)
 Get the program version string. More...
 
def AddHeaderArg (s)
 Add argument for optional header availability. More...
 
def AddColumnArg (s, help="", required=True)
 Add argument for a column specifier. More...
 
def AddNoDataSpecifier (s)
 Adds 'no data in cell' specifier option. More...
 
def AddChooseDataVersionArg (s)
 Adds the data version setting parameter. More...
 
def AddPositionalTSVFileArg (s)
 Adds the frequently used input file name argument. More...
 
def AddPermissiveness (s, default=PERMISSIVENESS_ECHO)
 Add argument on how to behave if the input file is inconsistent. More...
 

Static Public Attributes

 ap
 

Detailed Description

Argument parser for Dintegrator shell scripts.

This class attempts to unify the interface between different scripts. If
you find a parameter that is not specific to a certain task, feel free to
add it to this base class. Candidates to be added to this class:
- --in  Input format for gene ID conversion.
- --out Output format for gene ID conversion.

This class registers a special action which allows to print a list of
choices in a help-like manner. The new action type is called @c choices
and needs the @c choices argument set to a @c list of @c strings that will
be printed when invoked. After that, the program exits gracefully without
any more parsing and argument checking.

Constructor & Destructor Documentation

◆ __init__()

def cls.ArgumentParserBase.CArgumentParserBase.__init__ (   s,
  version,
**  kw 
)

Ctor.

    Already implements --version.
    @param version Version string of the command line tool. Format:
     major.minor

Member Function Documentation

◆ AddChooseDataVersionArg()

def cls.ArgumentParserBase.CArgumentParserBase.AddChooseDataVersionArg (   s)

Adds the data version setting parameter.

◆ AddColumnArg()

def cls.ArgumentParserBase.CArgumentParserBase.AddColumnArg (   s,
  help = "",
  required = True 
)

Add argument for a column specifier.

    Stores integer result in 'column'.
    @param help Help text associated with the column optional argument.
    @param required True for positional, False for optional argument.

◆ AddHeaderArg()

def cls.ArgumentParserBase.CArgumentParserBase.AddHeaderArg (   s)

Add argument for optional header availability.

    Stores boolean result in 'haveHeader'.

◆ AddNoDataSpecifier()

def cls.ArgumentParserBase.CArgumentParserBase.AddNoDataSpecifier (   s)

Adds 'no data in cell' specifier option.

◆ AddPermissiveness()

def cls.ArgumentParserBase.CArgumentParserBase.AddPermissiveness (   s,
  default = PERMISSIVENESS_ECHO 
)

Add argument on how to behave if the input file is inconsistent.

Stores a string result in 'permissiveness'.

Parameters
[optional]Default permissiveness model.

◆ AddPositionalTSVFileArg()

def cls.ArgumentParserBase.CArgumentParserBase.AddPositionalTSVFileArg (   s)

Adds the frequently used input file name argument.

◆ GetVersion()

def cls.ArgumentParserBase.CArgumentParserBase.GetVersion (   s)

Get the program version string.

Member Data Documentation

◆ ap

cls.ArgumentParserBase.CArgumentParserBase.ap
static

The documentation for this class was generated from the following file: