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


Python OptionParser.parse_args方法代码示例

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


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

示例1: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例2: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例3: usage

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例4: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [as 别名]
def parse_args():
    usage = """%prog [options] <density.mrc> <number of clusters>
              <density threshold> <output.pdb>

Segments all voxels in the given density map, above the given threshold,
into the given number of clusters, and links between neighboring ones.

The cluster centers are written out into a single output PDB file, each
as a single CA atom.
"""
    parser = OptionParser(usage)
    parser.add_option("--apix", type="float", default=None,
                      help="map spacing, in angstroms/pix (default: read "
                           "from MRC file)")
    parser.add_option("-x", "--x", type="float", default=None,
                      help="X origin of the density map")
    parser.add_option("-y", "--y", type="float", default=None,
                      help="Y origin of the density map")
    parser.add_option("-z", "--z", type="float", default=None,
                      help="Z origin of the density map")
    parser.add_option("--cmm", type="str", default="",
                      help="write results in CMM format")
    parser.add_option("--seg", type="str", default="",
                      help="write out each cluster as an MRC file called "
                           "<seg>_.mrc, and write load_segmentation.cmd file "
                           "to easily load all segments into Chimera")
    parser.add_option("--txt", type="str", default="",
                      help="write anchor points file in text format")
    options, args = parser.parse_args()

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

示例5: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例6: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例7: parse_args

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

Generate indexes of fitting solutions.
"""
    parser = OptionParser(usage)
    options, args = parser.parse_args()
    if len(args) != 4:
        parser.error("incorrect number of arguments")
    return options,args
开发者ID:apolitis,项目名称:imp,代码行数:12,代码来源:indexes.py

示例8: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例9: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例10: parse_args

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

Show the DOMINO merge tree to be used in the alignment procedure
"""
    parser = OptionParser(usage)

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

示例11: parse_args

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

Generate a proteomics file automatically from the anchor graph and fitting
results. No interaction data is entered here, but the file can be modified
manually afterwards to add additional proteomics information.
"""
    parser = OptionParser(usage)
    options, args = parser.parse_args()
    if len(args) != 3:
        parser.error("incorrect number of arguments")
    return args
开发者ID:newtonjoo,项目名称:imp,代码行数:15,代码来源:proteomics.py

示例12: usage

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例13: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例14: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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

示例15: parse_args

# 需要导入模块: from IMP import OptionParser [as 别名]
# 或者: from IMP.OptionParser import parse_args [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


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