当前位置: 首页>>代码示例>>Python>>正文


Python OptionParser.add_option方法代码示例

本文整理汇总了Python中IMP.OptionParser.add_option方法的典型用法代码示例。如果您正苦于以下问题:Python OptionParser.add_option方法的具体用法?Python OptionParser.add_option怎么用?Python OptionParser.add_option使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IMP.OptionParser的用法示例。


在下文中一共展示了OptionParser.add_option方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <assembly input> <refined assembly input> <proteomics.input> <mapping.input> <combinations file> <combination index>

Fit subunits locally around a combination solution with FFT."""
    parser = OptionParser(usage)
    parser.add_option("-a", "--angle", dest="angle", type="float",
                      default=5,
                      help="angle delta (degrees) for FFT rotational "
                           "search (default 5)")

    parser.add_option("-n", "--num", dest="num", type="int",
                      default=100,
                      help="Number of fits to report"
                           "(default 100)")

    parser.add_option("-v", "--angle_voxel", dest="angle_voxel", type="int",
                      default=10,
                      help="Number of angles to keep per voxel"
                           "(default 10)")

    parser.add_option("-t", "--max_trans", dest="max_trans", type="float",
                      default=10.,
                      help="maximum translational search in A"
                      "(default 10)")

    parser.add_option("-m", "--max_angle", dest="max_angle", type="float",
                      default=30.,
                      help="maximum angular search in degrees"
                      "(default 50)")

    options, args = parser.parse_args()
    if len(args) != 6:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:AljGaber,项目名称:imp,代码行数:36,代码来源:refine_fft.py

示例2: usage

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def usage():
    usage = """%prog [options] <cyclic symmetry degree>
       <monomer PDB file> <density map> <resolution> <spacing>
       <density threshold> <origin X> <origin Y> <origin Z>

A script that builds the parameters file for symmetric MultiFit.

Notice: If you have negative numbers as input, add -- as the first parameter,
so that the numbers are not treated as options."""

    parser = OptionParser(usage)
    parser.add_option("-o", "--out", dest="out", default="multifit.output",
                      metavar="FILE",
                      help="the name of the MultiFit output file. The default "
                           "filename is multifit.output")
    parser.add_option("-i", "--med", dest="med", metavar="FILE", default="",
                      help="Print intermediate results to the named file.")
    parser.add_option(
        "-p", "--params", dest="params", default="multifit.param",
        help="the name of the MultiFit parameters file. The "
        "default filename is multifit.params")
    parser.add_option("-m", "--model", dest="model", default="asmb.model",
                      help="the base filename of the solutions output by "
                           "MultiFit (.X.pdb, where X is the solution number, "
                           "is suffixed to create each output file name). "
                           "The default filename is asmb.model")
    parser.add_option(
        "-n", "--numsols", dest="numsols", default=10, type="int",
        help="the number of solutions(fits) to report; "
        "default 10")
    (options, args) = parser.parse_args()
    if len(args) != 9:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:36,代码来源:param.py

示例3: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage =  "usage %prog [options] <asmb.input> <proteomics.input> <mapping.input> <alignment params> <combinatins> <diameter> <output combinations>\n"
    usage+="A script for clustering an ensemble of solutions"
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", type="int", dest="max", default=999999999,
                      help="maximum number of combinations to consider")
    (options, args) = parser.parse_args()
    if len(args) != 7:
        parser.error("incorrect number of arguments")
    return [options,args]
开发者ID:apolitis,项目名称:imp,代码行数:12,代码来源:cluster_coarse.py

示例4: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <parameter file>

This program builds cyclic symmetric complexes in their density maps."""

    parser = OptionParser(usage)
    parser.add_option("--chimera", dest="chimera", default="", metavar="FILE",
                      help="the name of the Chimera output file, if desired")
    (options, args) = parser.parse_args()
    if len(args) != 1:
        parser.error("incorrect number of arguments")
    return args[0], options.chimera
开发者ID:newtonjoo,项目名称:imp,代码行数:14,代码来源:build.py

示例5: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <assembly input> <output anchors prefix>

Generate anchors for a density map."""
    parser = OptionParser(usage)
    parser.add_option("-s", "--size", type="int", dest="size", default=-1,
                      help="number of residues per bead")
    options, args = parser.parse_args()

    if len(args) != 2:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:AljGaber,项目名称:imp,代码行数:14,代码来源:anchors.py

示例6: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <asmb.input> <proteomics.input>
           <mapping.input> <combinations> <model prefix>

Write output models.
"""
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", type="int", dest="max", default=None,
                      help="maximum number of models to write")
    (options, args) = parser.parse_args()
    if len(args) != 5:
        parser.error("incorrect number of arguments")
    return options,args
开发者ID:apolitis,项目名称:imp,代码行数:15,代码来源:models.py

示例7: usage

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def usage():
    usage = """%prog [options] <asmb> <asmb.proteomics> <asmb.mapping>
           <alignment.params> <combinatins> <score combinations [output]>

Score each of a set of combinations.
"""
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", dest="max",default=999999999,
                      help="maximum number of fits considered")
    (options, args) = parser.parse_args()
    if len(args) != 6:
        parser.error("incorrect number of arguments")
    return [options,args]
开发者ID:apolitis,项目名称:imp,代码行数:15,代码来源:score.py

示例8: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <assembly name> <subunits file>
       <coarse level> <density map> <resolution> <spacing> <density threshold>
       <origin X> <origin Y> <origin Z>

Build the parameters files for MultiFit.

Notice: If you have negative numbers as input, add -- as the first parameter,
so that the numbers are not treated as options."""

    parser = OptionParser(usage)
    parser.add_option("-i", "--asmb_input", dest="asmb_input",
                      default="asmb.input",
                      help="the name of the MultiFit input file. The default "
                           "filename is asmb.input")
    parser.add_option("-m", "--model", dest="model", default="asmb.model",
                      help="the base filename of the solutions output by "
                           "MultiFit (.X.pdb, where X is the solution number, "
                           "is suffixed to create each output file name). "
                           "The default filename is asmb.model")
    parser.add_option("-a", "--anchor_dir", dest="anchor_dir", default="./",
                      help="the name of the directory to store anchor points. "
                           "The default is ./")
    parser.add_option("-f", "--fit_dir", dest="fit_dir", default="./",
                      help="the name of the directory to store fitting "
                           "solutions. The default is ./")
    (options, args) = parser.parse_args()
    if len(args) < 10:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:newtonjoo,项目名称:imp,代码行数:32,代码来源:param.py

示例9: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <asmb.input> <proteomics.input>
           <mapping.input> <combinations>

Compare output models to a reference structure.
The reference structure for each subunit is read from the rightmost column
of the asmb.input file.
"""
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", type="int", dest="max", default=None, help="maximum number of models to compare")
    (options, args) = parser.parse_args()
    if len(args) != 4:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:AljGaber,项目名称:imp,代码行数:16,代码来源:reference.py

示例10: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <assembly input>

Fit subunits into a density map with FFT."""
    parser = OptionParser(usage)
    parser.add_option("-c", "--cpu", dest="cpus", type="int", default=1,
                      help="number of cpus to use (default 1)")
    parser.add_option("-a", "--angle", dest="angle", type="float",
                      default=30,
                      help="angle delta (degrees) for FFT rotational "
                           "search (default 30)")

    parser.add_option("-n", "--num", dest="num", type="int",
                      default=100,
                      help="Number of fits to report"
                           "(default 100)")

    parser.add_option("-v", "--angle_voxel", dest="angle_voxel", type="int",
                      default=10,
                      help="Number of angles to keep per voxel"
                           "(default 10)")

    # parser.add_option("-n", "--num", dest="num", type="int",
    #                  default=100,
    #                  help="Number of fits to report"
    #                      "(default 100)")

    options, args = parser.parse_args()
    if len(args) != 1:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:j-ma-bu-l-l-ock,项目名称:imp,代码行数:33,代码来源:fit_fft.py

示例11: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage =  """%prog [options] <asmb> <asmb.proteomics> <asmb.mapping>
           <alignment.params> <combinations[output]>
           <Fitting scores[output]>

Align proteomics graph with the EM map.
"""
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", type="int", dest="max", default=999999999,
                      help="maximum number of fits considered")

    options, args = parser.parse_args()
    if len(args) != 6:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:newtonjoo,项目名称:imp,代码行数:17,代码来源:align.py

示例12: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <asmb.input> <scores> <output file>

Write assembly transformation file in other formats.

""" + "\n\n".join(x.__doc__ for x in formatters.values())

    parser = OptionParser(usage)
    parser.add_option("-f", "--format", default='chimera', type="choice",
                      choices=list(formatters.keys()),
                      help="type of output to generate ("
                           + ", ".join(formatters.keys())
                           + "; default: chimera)")
    options, args = parser.parse_args()
    if len(args) != 3:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:AljGaber,项目名称:imp,代码行数:19,代码来源:transforms.py

示例13: usage

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def usage():
    usage =  """%prog [options] <asmb> <asmb.proteomics> <asmb.mapping>
           <alignment.params> <combinations> <output: clustered combinations>

Clustering of assembly solutions.

This program uses the Python 'fastcluster' module, which can be obtained from
http://math.stanford.edu/~muellner/fastcluster.html
"""
    parser = OptionParser(usage)
    parser.add_option("-m", "--max", type="int", dest="max", default=999999999,
                      help="maximum solutions to consider")
    parser.add_option("-r", "--rmsd", type="float", dest="rmsd", default=5,
                      help="maximum rmsd within a cluster")
    options, args = parser.parse_args()
    if len(args) != 6:
        parser.error("incorrect number of arguments")
    return options, args
开发者ID:AljGaber,项目名称:imp,代码行数:20,代码来源:cluster.py

示例14: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage =  """%prog [options] <asmb.input> <proteomics> <mapping> <align param>

Given a set of local fits (e.g. generated by fit_fft), the RMSD between each
subunit and a reference orientation is calculated and added to each fitting
file, in the final "RMSD to reference" column. (The original fitting file is
not modified; a new fitting file is created with a '.RMSD' extension.)

Note that the assembly input file must contain a reference PDB filename for
each subunit (in the rightmost column).
"""
    parser = OptionParser(usage)
    parser.add_option("-d", action="store_true", dest="use_dock",
                      help="if set the docking transformation is used (and not the fitting transformation)")
    (options, args) = parser.parse_args()
    if len(args) != 4:
        parser.error("incorrect number of arguments")
    return [options,args]
开发者ID:apolitis,项目名称:imp,代码行数:20,代码来源:add_fit_rmsd.py

示例15: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import add_option [as 别名]
def parse_args():
    usage = """%prog [options] <pdb file name>

This program generates the Connolly surface for a given PDB file."""

    parser = OptionParser(usage)
    parser.add_option("--density", dest="density", default=10.0, type="float",
                      metavar="D",
                      help="density of probe points, per cubic angstrom "
                           "(default 10.0)")
    parser.add_option("--radius", dest="rp", default=1.8, type="float",
                      metavar="R",
                      help="probe radius in angstroms (default 1.8)")

    opts, args = parser.parse_args()
    if len(args) != 1:
        parser.error("incorrect number of arguments")
    return args[0], opts.density, opts.rp
开发者ID:newtonjoo,项目名称:imp,代码行数:20,代码来源:surface.py


注:本文中的IMP.OptionParser.add_option方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。