Example #1
0
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
Example #2
0
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
Example #3
0
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
Example #4
0
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
Example #5
0
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
Example #6
0
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
Example #7
0
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
def main():
    IMP.base.set_log_level(IMP.base.SILENT)
    usage = "usage: %prog [options] <complex.pdb> <output: anchor_graph.cmm>\n Description: The script gets as input a PDB file of a complex and calculates an anchor graph,\n such that nodes corresponds to the centroids of its chains and \n edges are between chains that are close in space."
    parser = OptionParser(usage)
    (options, args) = parser.parse_args()
    if len(args) != 2:
        parser.error("incorrect number of arguments")
    pdb_fn = args[0]
    cmm_fn = args[1]
    # read the protein
    mdl = IMP.kernel.Model()
    mh = IMP.atom.read_pdb(pdb_fn, mdl, IMP.atom.CAlphaPDBSelector())
    IMP.atom.add_radii(mh)
    # find the centers of the individual chains
    chains = IMP.atom.get_by_type(mh, IMP.atom.CHAIN_TYPE)
    centers = []
    rbs = []
    for chain in chains:
        ps = IMP.core.XYZs(IMP.core.get_leaves(chain))
        centers.append(IMP.core.get_centroid(ps))
        IMP.atom.setup_as_rigid_body(chain)
    # fast calculations of which chains are close
    links = []
    sdps = IMP.core.SphereDistancePairScore(IMP.core.Linear(0, 1))
    rdps = IMP.core.RigidBodyDistancePairScore(sdps, IMP.core.LeavesRefiner(IMP.atom.Hierarchy.get_traits()))
    for id1, chain1 in enumerate(chains):
        for id2, chain2 in enumerate(chains[id1 + 1 :]):
            # check if the bounding boxes are intersecting
            if rdps.evaluate((chain1.get_particle(), chain2), None) < 0.5:
                links.append([id1, id1 + id2 + 1])
    # write the cmm file
    output = open(cmm_fn, "w")
    output.write('<marker_set name="centers_cryst">\n')
    for id, c in enumerate(centers):
        output.write(
            '<marker id="'
            + str(id)
            + '" x="'
            + str(c[0])
            + '" y="'
            + str(c[1])
            + '" z="'
            + str(c[2])
            + '" radius= "3.0" r= "0.9"  g= "0.05" b= "0.18" />'
        )
    for id1, id2 in links:
        output.write('<link id1="' + str(id1) + '" id2="' + str(id2) + '" radius="1."/>\n')
    output.write("</marker_set>\n")
Example #9
0
def parse_args():
    usage = """%prog [options] <subunit> <symmetry degree>
          <transformations file> <number of models> <output models>

This script, given the structure of a single subunit and the Chimera
transformations file, applies the transformations to generate a number of
complete models.

  <subunit>               subunit PDB, the same given to MultiFit.
  <symmetry degree>       Cn degree.
  <transformations file>  MultiFit output in chimera output format.
  <number of models>      number of models to print.
  <output models>         Solutions are written as output.i.pdb."""
    parser = OptionParser(usage)
    opts, args = parser.parse_args()
    if len(args) != 5:
        parser.error("incorrect number of arguments")
    return args
Example #10
0
def parse_args():
    usage = """%prog [options] <subunit> <symmetry degree>
          <transformations file> <number of models> <output models>

This script, given the structure of a single subunit and the Chimera
transformations file, applies the transformations to generate a number of
complete models.

  <subunit>               subunit PDB, the same given to MultiFit.
  <symmetry degree>       Cn degree.
  <transformations file>  MultiFit output in chimera output format.
  <number of models>      number of models to print.
  <output models>         Solutions are written as output.i.pdb."""
    parser = OptionParser(usage)
    opts, args = parser.parse_args()
    if len(args) != 5:
        parser.error("incorrect number of arguments")
    return args
Example #11
0
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
Example #12
0
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
Example #13
0
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]
Example #14
0
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]
Example #15
0
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]
Example #16
0
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
Example #17
0
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
Example #18
0
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
Example #19
0
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
Example #20
0
File: align.py Project: sirusb/imp
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
Example #21
0
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
Example #22
0
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
Example #23
0
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
Example #24
0
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]
Example #25
0
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
Example #26
0
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
Example #27
0
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]
Example #28
0
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
Example #29
0
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=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
Example #30
0
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
Example #31
0
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]
Example #32
0
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
Example #33
0
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
Example #34
0
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
Example #35
0
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
Example #36
0
def parse_args():
    usage = """%prog [options] <parameter file> <transformations file>
        <reference PDB>

This program calculates the RMSD between modeled cyclic symmetric complexes and
the reference structure. The RMSD and cross correlation of each complex is
written into a file called rmsd.output.

Notice: no structural alignment is performed!"""

    parser = OptionParser(usage)
    parser.add_option("--vec", dest="vec", default="", metavar="FILE",
                      help="output the RMSDs as a vector into the named "
                           "file, if specified")
    parser.add_option("--start", dest="start", default=0, type="int",
                      help="first model in transformations file to compare "
                           "with the reference (by default, model 0)")
    parser.add_option("--end", dest="end", default=-1, type="int",
                      help="last model in transformations file to compare "
                           "with the reference (by default, the final model)")
    (options, args) = parser.parse_args()
    if len(args) != 3:
        parser.error("incorrect number of arguments")
    return options, args
Example #37
0
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
Example #38
0
File: param.py Project: sirusb/imp
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
Example #39
0
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
Example #40
0
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
Example #41
0
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