當前位置: 首頁>>代碼示例>>Python>>正文


Python OptionParser.error方法代碼示例

本文整理匯總了Python中IMP.OptionParser.error方法的典型用法代碼示例。如果您正苦於以下問題:Python OptionParser.error方法的具體用法?Python OptionParser.error怎麽用?Python OptionParser.error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在IMP.OptionParser的用法示例。


在下文中一共展示了OptionParser.error方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: parse_args

# 需要導入模塊: from IMP import OptionParser [as 別名]
# 或者: from IMP.OptionParser import error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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 error [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.error方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。