def phenotypeArguments(parser):
    """Action that can be performed by this script"""
    parser.add_argument('-f', '--from_file', '--from-file', metavar=
        'INPUT_FILE', nargs='*', help=
        """Import phenotype from a tab or space delimited file, which can be
            standard input if a name - is specified. Samples are
            determined by sample names in the first column, or jointly by sample
            name and filename if there is another column with header 'filename'.
            Names of phenotype fields are determined by header of the input file,
            or by names provided from option --header. Non-alphanumeric
            characters in input filed names will be replaced by '_'. If
            multiple samples in a project share the same names, they will shared
            the imported phenotypes. Optionally, a list of phenotypes (columns
            of the file) can be specified after filename, in which case only the
            specified phenotypes will be imported. Parameter --samples could be
            used to limit the samples for which phenotypes are imported. Values
            that match value of parameter --na and cannot be converted to the
            probed type of phenotype (e.g. '' in a column of numbers) are recorded
            as missing values."""
        ),
    parser.add_argument('--set', nargs='*', metavar='EXPRESSION', default=[
        ], help=
        """Set a phenotype to a constant (e.g. --set aff=1), or an expression
            using other existing phenotypes (e.g. --set ratio_qt=high_qt/all_qt (the ratio
            of the number of high quality variants to the number of all variants, where
            high_qt and all_qt are obtained from sample statistics using parameter
            --from_stat). Parameter --samples could be used to limit the samples for
            which genotypes will be set."""
        ),
    parser.add_argument('--from_stat', '--from-stat', nargs='*', metavar=
        'EXPRESSION', default=[], help=
        """Set a phenotype to a summary statistics of a genotype field. For
            example, "num=count(*)" sets phenotype num to be the number of genotypes
            of a sample, "GD=avg(DP)" sets phenotype DP to be the average depth (if
            DP is one of the genotype fields) of the sample. Multiple fields (e.g.
            '--from-stat "num=count(*)" "GD=avg(DP)"') are also allowed. In addition to
            standard SQL aggregation functions, variant tools supports special functions
            #(GT), #(wtGT), #(mutGT), #(alt), #(hom), #(het) and #(other), which
            counts the number of genotypes (the same as count(*)), wildtype genotypes,
            mutant genotypes alternative alleles, homozygotes, heterozygotes, and
            genotypes with two different alternative alleles. Parameters --genotypes
            and --samples could be used to limit the genotypes to be considered and
            the samples for which genotypes will be set."""
        ),
    parser.add_argument('--output', nargs='*', metavar='EXPRESSION',
        default=[], help=
        """A list of phenotype to be outputted. SQL-compatible expressions or
            functions such as "DP/DP_all" and "avg(DP)" are also allowed"""
        ),
    parser.add_argument('-j', '--jobs', metavar='N', default=4, type=int,
        help=
        """Allow at most N concurrent jobs to obtain sample statistics for
            parameter --from-stat."""
        )
    parser.add_argument('-g', '--genotypes', nargs='*', metavar='COND',
        default=[], help=
        """Limit the operation to genotypes that match specified conditions.
            Use 'vtools show genotypes' to list usable fields for each sample."""
        ),
    parser.add_argument('-s', '--samples', nargs='*', metavar='COND',
        default=[], help=
        """Update phenotype for samples that match specified conditions.
            Use 'vtools show samples' to list usable fields in the sample table."""
        )
    grp = parser.add_argument_group('Input/Output options')
    grp.add_argument('--header', nargs='*', help=
        """A list of header names for input file if used with option
            --from-file. Otherwise a complete header or a list of names that
            will be joined by a delimiter (parameter --delimiter), for option
            --output. If a special name - is specified, the header will
            be read from the standard input, which is the preferred way to specify large
            multi-line headers (e.g. cat myheader | vtools export --header -). If this
            parameter is given without parameter, a default header will be derived from
            field names."""
        ),
    grp.add_argument('-d', '--delimiter', default='\t', help=
        "Delimiter, default to tab, a popular alternative is ',' for csv output"
        )
    grp.add_argument('--na', default='NA', help=
        'Input or output string for missing value..')
    grp.add_argument('-l', '--limit', default=-1, type=int, help=
        'Number of record to display. Default to all record.')
