Beispiel #1
0
def parse_args():
    desc = """Generate indexes of fitting solutions."""
    p = ArgumentParser(description=desc)
    p.add_argument("assembly_name", help="name of the assembly")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("num_fits", type=int, help="number of fits")
    p.add_argument("indexes_file", help="indexes file name")
    return p.parse_args()
Beispiel #2
0
def parse_args():
    desc = """Generate anchors for a density map."""
    p = ArgumentParser(description=desc)
    p.add_argument("-s", "--size", type=int, dest="size", default=-1,
                   help="number of residues per bead")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("anchor_prefix", help="prefix for output anchors file names")

    return p.parse_args()
Beispiel #3
0
def parse_args():
    desc =  """
Show the DOMINO merge tree to be used in the alignment procedure
"""
    p = ArgumentParser(description=desc)
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    return p.parse_args()
Beispiel #4
0
def parse_args():
    desc = """
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.
"""
    p = ArgumentParser(description=desc)
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("anchors_file", help="anchors file name")
    p.add_argument("proteomics_file", help="output proteomics file name")
    return p.parse_args()
Beispiel #5
0
def parse_args():
    parser = ArgumentParser(
        description="Plot score distributions of good-scoring models")
    parser.add_argument("-show",
                        action="store_true",
                        help="Interactively show the plot")
    parser.add_argument("score_file",
                        help="Score file generated by select_good")
    parser.add_argument("column",
                        help="PMI stat file column to plot (or 'all' to "
                        "plot all columns)")
    return parser.parse_args()
Beispiel #6
0
def parse_args():
    desc = """
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.
"""
    p = ArgumentParser(description=desc)
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("anchors_file", help="anchors file name")
    p.add_argument("proteomics_file", help="output proteomics file name")
    return p.parse_args()
Beispiel #7
0
def parse_args():
    desc =  """
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).
"""
    p = ArgumentParser(description=desc)
    p.add_argument("-d", action="store_true", dest="use_dock",
                   help="if set the docking transformation is used (and not "
                        "the fitting transformation)")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    return p.parse_args()
Beispiel #8
0
def parse_args():
    desc = """
    This program builds cyclic symmetric complexes in their density maps."""

    parser = ArgumentParser(description=desc)
    parser.add_argument("--chimera", dest="chimera", default="", metavar="FILE",
                      help="the name of the Chimera output file, if desired")
    parser.add_argument("param_file", help="parameter file name")
    return parser.parse_args()
Beispiel #9
0
def parse_args():
    desc = """
This program generates the Connolly surface for a given PDB file."""

    p = ArgumentParser(description=desc)
    p.add_argument("--density", dest="density", default=10.0, type=float,
                   metavar="D",
                   help="density of probe points, per cubic angstrom "
                        "(default 10.0)")
    p.add_argument("--radius", dest="rp", default=1.8, type=float,
                   metavar="R",
                   help="probe radius in angstroms (default 1.8)")
    p.add_argument("pdb", help="input PDB file name")

    args = p.parse_args()
    return args.pdb, args.density, args.rp
Beispiel #10
0
def parse_args():
    desc = """
This program generates the Connolly surface for a given PDB file."""

    p = ArgumentParser(description=desc)
    p.add_argument("--density",
                   dest="density",
                   default=10.0,
                   type=float,
                   metavar="D",
                   help="density of probe points, per cubic angstrom "
                   "(default 10.0)")
    p.add_argument("--radius",
                   dest="rp",
                   default=1.8,
                   type=float,
                   metavar="R",
                   help="probe radius in angstroms (default 1.8)")
    p.add_argument("pdb", help="input PDB file name")

    args = p.parse_args()
    return args.pdb, args.density, args.rp
Beispiel #11
0
def parse_args():
    desc = """Fit subunits into a density map with FFT."""
    p = ArgumentParser(description=desc)
    p.add_argument("-c",
                   "--cpu",
                   dest="cpus",
                   type=int,
                   default=1,
                   help="number of cpus to use (default 1)")
    p.add_argument("-a",
                   "--angle",
                   dest="angle",
                   type=float,
                   default=30,
                   help="angle delta (degrees) for FFT rotational "
                   "search (default 30)")

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

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

    p.add_argument("assembly_file", help="assembly file name")

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

    return p.parse_args()
Beispiel #12
0
def parse_args():
    desc = """
Fit subunits locally around a combination solution with FFT."""
    p = ArgumentParser(description=desc)
    p.add_argument("-a",
                   "--angle",
                   dest="angle",
                   type=float,
                   default=5,
                   help="angle delta (degrees) for FFT rotational "
                   "search (default 5)")

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

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

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

    p.add_argument("-m",
                   "--max_angle",
                   dest="max_angle",
                   type=float,
                   default=30.,
                   help="maximum angular search in degrees (default 50)")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("ref_assembly_file", help="refined assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("combination_index",
                   type=int,
                   help="number of the combination to read from the "
                   "combinations file")
    return p.parse_args()
Beispiel #13
0
def parse_args():
    parser = ArgumentParser(
        description="First stages of analysis for assessing sampling "
        "convergence")
    parser.add_argument('--sysname',
                        '-n',
                        dest="sysname",
                        help='name of the system',
                        default="")
    parser.add_argument('--path',
                        '-p',
                        dest="path",
                        help='path to the good-scoring models',
                        default="./")
    parser.add_argument('--extension',
                        '-e',
                        dest="extension",
                        help='extension of the file',
                        choices=['rmf', 'pdb'],
                        default="rmf")
    parser.add_argument('--mode',
                        '-m',
                        dest="mode",
                        help='pyRMSD calculator',
                        choices=['cuda', 'cpu_omp', 'cpu_serial'],
                        default="cuda")
    parser.add_argument('--cores',
                        '-c',
                        dest="cores",
                        type=int,
                        help='number of cores for RMSD matrix calculations; '
                        'only for cpu_omp',
                        default=1)
    parser.add_argument(
        '--subunit',
        '-su',
        dest="subunit",
        help='calculate RMSD/sampling and cluster precision/densities '
        'etc over this subunit only',
        default=None)
    parser.add_argument('--align',
                        '-a',
                        dest="align",
                        help='boolean flag to allow superposition of models',
                        default=False,
                        action='store_true')
    parser.add_argument('--ambiguity',
                        '-amb',
                        dest="symmetry_groups",
                        help='file containing symmetry groups',
                        default=None)
    parser.add_argument(
        '--scoreA',
        '-sa',
        dest="scoreA",
        help='name of the file having the good-scoring scores for sample A',
        default="scoresA.txt")
    parser.add_argument(
        '--scoreB',
        '-sb',
        dest="scoreB",
        help='name of the file having the good-scoring scores for sample B',
        default="scoresB.txt")
    parser.add_argument('--rmfA',
                        '-ra',
                        dest="rmf_A",
                        help='RMF file with conformations from Sample A',
                        default=None)
    parser.add_argument('--rmfB',
                        '-rb',
                        dest="rmf_B",
                        help='RMF file with conformations from Sample B',
                        default=None)
    parser.add_argument('--gridsize',
                        '-g',
                        dest="gridsize",
                        type=float,
                        help='grid size for calculating sampling precision',
                        default=10.0)
    parser.add_argument(
        '--skip',
        '-s',
        dest="skip_sampling_precision",
        help="This option will bypass the calculation of sampling "
        "precision. This option needs to be used with the clustering "
        "threshold option. Otherwise by default, sampling precision "
        "is calculated and the clustering threshold is the "
        "calculated sampling precision.",
        default=False,
        action='store_true')
    parser.add_argument(
        '--cluster_threshold',
        '-ct',
        dest="cluster_threshold",
        type=float,
        help='final clustering threshold to visualize clusters. Assumes '
        'that the user has previously calculated sampling precision '
        'and wants clusters defined at a threshold higher than the '
        'sampling precision for ease of analysis (lesser number of '
        'clusters).',
        default=30.0)
    parser.add_argument('--voxel',
                        '-v',
                        dest="voxel",
                        type=float,
                        help='voxel size for the localization densities',
                        default=5.0)
    parser.add_argument('--density_threshold',
                        '-dt',
                        type=float,
                        dest="density_threshold",
                        help='threshold for localization densities',
                        default=20.0)
    parser.add_argument(
        '--density',
        '-d',
        dest="density",
        help='file containing dictionary of density custom ranges',
        default=None)
    parser.add_argument('--gnuplot',
                        '-gp',
                        dest="gnuplot",
                        help="plotting automatically with gnuplot",
                        default=False,
                        action='store_true')
    return parser.parse_args()
Beispiel #14
0
def parse_args():
    desc = """
This script, given the structure of a single subunit and the Chimera
transformations file, applies the transformations to generate a number of
complete models."""

    p = ArgumentParser(description=desc)
    p.add_argument('subunit', help="subunit PDB, the same given to MultiFit")
    p.add_argument('degree', type=int, help="Cn symmetry degree")
    p.add_argument('transform_file',
                   help="MultiFit output file in Chimera output format")
    p.add_argument('num_models', type=int, help="number of output models")
    p.add_argument('output',
                   help="solution filename prefix; solutions are written "
                   "as <output>.i.pdb")
    return p.parse_args()
Beispiel #15
0
def parse_args():
    desc = """
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."""

    p = ArgumentParser(description=desc)
    p.add_argument("-i", "--asmb_input", dest="asmb_input",
                   default="asmb.input",
                   help="the name of the MultiFit input file. The default "
                        "filename is asmb.input")
    p.add_argument("-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")
    p.add_argument("-a", "--anchor_dir", dest="anchor_dir", default="./",
                   help="the name of the directory to store anchor points. "
                        "The default is ./")
    p.add_argument("-f", "--fit_dir", dest="fit_dir", default="./",
                   help="the name of the directory to store fitting "
                        "solutions. The default is ./")
    p.add_argument("asmb_name",
                   help="name of the assembly (used as the prefix for "
                        "several MultiFit files)")
    p.add_argument("subunit_file",
                   help="file containing a list of subunit PDB file names")
    p.add_argument("coarse_level", type=int,
                   help="level of coarse graining (number of residues "
                        "per anchor)")
    p.add_argument("density", help="density map file name")
    p.add_argument("resolution", type=float,
                   help="density map resolution, in angstroms")
    p.add_argument("spacing", type=float,
                   help="density map voxel spacing, in angstroms")
    p.add_argument("threshold", type=float,
                   help="the threshold of the density map, used for "
                        "PCA matching")
    p.add_argument("origin_x", type=float,
                   help="density map origin X coordinate")
    p.add_argument("origin_y", type=float,
                   help="density map origin Y coordinate")
    p.add_argument("origin_z", type=float,
                   help="density map origin Z coordinate")
    return p.parse_args()
Beispiel #16
0
def usage():
    usage = """%prog [options] <asmb> <asmb.proteomics> <asmb.mapping>
           <alignment.params> <combinatins> <score combinations [output]>

Score each of a set of combinations.
"""
    p = ArgumentParser(usage)
    p.add_argument("-m",
                   "--max",
                   dest="max",
                   type=int,
                   default=999999999,
                   help="maximum number of fits considered")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("scores_file", help="output scores file name")
    return p.parse_args()
Beispiel #17
0
def parse_args():
    desc = """Write output models."""
    p = ArgumentParser(description=desc)
    p.add_argument("-m",
                   "--max",
                   type=int,
                   dest="max",
                   default=None,
                   help="maximum number of models to write")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("model_prefix", help="model output file name prefix")
    return p.parse_args()
Beispiel #18
0
def parse_args():
    desc = """Generate indexes of fitting solutions."""
    p = ArgumentParser(description=desc)
    p.add_argument("assembly_name", help="name of the assembly")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("num_fits", type=int, help="number of fits")
    p.add_argument("indexes_file", help="indexes file name")
    return p.parse_args()
Beispiel #19
0
def parse_args():
    desc = """%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!"""

    p = ArgumentParser(description=desc)
    p.add_argument("--vec",
                   dest="vec",
                   default="",
                   metavar="FILE",
                   help="output the RMSDs as a vector into the named "
                   "file, if specified")
    p.add_argument("--start",
                   dest="start",
                   default=0,
                   type=int,
                   help="first model in transformations file to compare "
                   "with the reference (by default, model 0)")
    p.add_argument("--end",
                   dest="end",
                   default=-1,
                   type=int,
                   help="last model in transformations file to compare "
                   "with the reference (by default, the final model)")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("trans_file", help="transformations file name")
    p.add_argument("ref_pdb", help="reference PDB file name")

    return p.parse_args()
Beispiel #20
0
def parse_args():
    desc = """
Write assembly transformation file in other formats.

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

    p = ArgumentParser(description=desc)
    p.add_argument("-f",
                   "--format",
                   default='chimera',
                   choices=list(formatters.keys()),
                   help="type of output to generate (" +
                   ", ".join(formatters.keys()) + "; default: chimera)")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("output_file", help="output file name")
    return p.parse_args()
Beispiel #21
0
def parse_args():
    parser = ArgumentParser(description="Show fields in a PMI stat file.")
    parser.add_argument("statfile", help="Name of the PMI stat file")
    return parser.parse_args()
Beispiel #22
0
def usage():
    desc = """
Clustering of assembly solutions.

This program uses the Python 'fastcluster' module, which can be obtained from
http://math.stanford.edu/~muellner/fastcluster.html
"""
    p = ArgumentParser(description=desc)
    p.add_argument("-m",
                   "--max",
                   type=int,
                   dest="max",
                   default=999999999,
                   help="maximum solutions to consider")
    p.add_argument("-r",
                   "--rmsd",
                   type=float,
                   dest="rmsd",
                   default=5,
                   help="maximum rmsd within a cluster")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("cluster_file", help="output clusters file name")

    return p.parse_args()
Beispiel #23
0
def parse_args():
    parser = ArgumentParser(
        description="List and extract good-scoring models from a set of "
        "sampling runs. Example of usage: "
        "%(prog)s -rd <run_directory_for_sampling> -rp <run_prefix> -sl "
        "ExcludedVolumeSphere_None GaussianEMRestraint_None "
        "-pl CrossLinkingMassSpectrometryDataScore|"
        "XLDSS CrossLinkingMassSpectrometryDataScore|XLEDC -agl -9999999.0 "
        "-99999.0 -aul 99999999.0 999999.0 -mlt 0 0 -mut 0 0. Flag -h "
        "for more details.")

    parser.add_argument("-rd", "--run_directory", dest="run_dir",
                        help="directory in which sampling results are stored",
                        required=True)

    parser.add_argument("-rp", "--run_prefix", dest="run_prefix",
                        help="prefix of runs", required=True)

    parser.add_argument("-sl", "--selection_keywords_list", nargs='+',
                        type=str, dest="selection_keywords_list",
                        help="list of stat file keywords corresponding to "
                             "selection criteria")
    parser.add_argument("-pl", "--printing_keywords_list", nargs='+',
                        type=str, dest="printing_keywords_list",
                        help="list of stat file keywords whose values are "
                             "printed out for selected models")

    # thresholds only apply to selection keywords
    parser.add_argument("-alt", "--aggregate_lower_thresholds", nargs='+',
                        type=float, dest="aggregate_lower_thresholds",
                        help="aggregate lower thresholds")
    parser.add_argument("-aut", "--aggregate_upper_thresholds", nargs='+',
                        type=float, dest="aggregate_upper_thresholds",
                        help="aggregate upper thresholds")
    parser.add_argument("-mlt", "--member_lower_thresholds", nargs='+',
                        type=float, dest="member_lower_thresholds",
                        help="member lower thresholds")
    parser.add_argument("-mut", "--member_upper_thresholds", nargs='+',
                        type=float, dest="member_upper_thresholds",
                        help="member upper thresholds")

    parser.add_argument("-e", "--extract", default=False, dest="extract",
                        action='store_true',
                        help="Type -e to extract all good scoring model "
                             "RMFs from the trajectory files")
    parser.add_argument("-sf", "--score_file", default="scores", type=str,
                        dest="score_file_prefix",
                        help="Score file prefix for samples A and B. "
                             "Default is %(default)r")
    result = parser.parse_args()

    return result
Beispiel #24
0
def parse_args():
    desc =  """Align proteomics graph with the EM map."""
    p = ArgumentParser(description=desc)
    p.add_argument("-m", "--max", type=int, dest="max", default=999999999,
                   help="maximum number of fits considered")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name (output)")
    p.add_argument("scores_file", help="fitting scores file name (output)")

    return p.parse_args()
Beispiel #25
0
def parse_args():
    desc = """
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.
"""
    p = ArgumentParser(description=desc)
    p.add_argument("--apix", type=float, default=None,
                   help="map spacing, in angstroms/pix (default: read "
                        "from MRC file)")
    p.add_argument("-x", "--x", type=float, default=None,
                   help="X origin of the density map")
    p.add_argument("-y", "--y", type=float, default=None,
                   help="Y origin of the density map")
    p.add_argument("-z", "--z", type=float, default=None,
                   help="Z origin of the density map")
    p.add_argument("--cmm", default="",
                   help="write results in CMM format")
    p.add_argument("--seg", 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")
    p.add_argument("--txt", default="",
                   help="write anchor points file in text format")
    p.add_argument("density", help="density map filename (in MRC format)")
    p.add_argument("num_cluster", type=int,
                   help="number of clusters")
    p.add_argument("threshold", type=float,
                   help="density threshold")
    p.add_argument("output", help="output PDB file name")
    return p.parse_args()
Beispiel #26
0
def parse_args():
    desc = """Fit subunits into a density map with FFT."""
    p = ArgumentParser(description=desc)
    p.add_argument("-c", "--cpu", dest="cpus", type=int, default=1,
                   help="number of cpus to use (default 1)")
    p.add_argument("-a", "--angle", dest="angle", type=float, default=30,
                   help="angle delta (degrees) for FFT rotational "
                        "search (default 30)")

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

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

    p.add_argument("assembly_file", help="assembly file name")

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

    return p.parse_args()
Beispiel #27
0
def parse_args():
    desc = """
    Create a GMM from either density file (.mrc), a pdb file (.pdb)
    Will detect input format from extension.
    Outputs as text and optionally as a density map
    see help(-h)
"""
    p = ArgumentParser(description=desc)

    p.add_argument("-t",
                   "--covar_type",
                   dest="covar_type",
                   default='full',
                   choices=['spherical', 'tied', 'diag', 'full'],
                   help="covariance type for the GMM")
    p.add_argument("-m",
                   "--out_map",
                   dest="out_map",
                   default='',
                   help="write out the gmm to an mrc file")
    p.add_argument(
        "-a",
        "--apix",
        dest="apix",
        default=1.0,
        type=float,
        help=
        "if you don't provide a map, set the voxel_size here (for sampling)")
    p.add_argument("-n",
                   "--num_samples",
                   dest="num_samples",
                   default=1000000,
                   type=int,
                   help="num samples to draw from the density map")
    p.add_argument("-i",
                   "--num_iter",
                   dest="num_iter",
                   default=100,
                   type=int,
                   help="num iterations of GMM")
    p.add_argument("-s",
                   "--threshold",
                   dest="threshold",
                   default=0.0,
                   type=float,
                   help="threshold for the map before sampling")

    p.add_argument(
        "-f",
        "--force_radii",
        dest="force_radii",
        default=-1.0,
        type=float,
        help="force radii to be this value (spherical) -1 means deactivated ")
    p.add_argument(
        "-w",
        "--force_weight",
        dest="force_weight",
        default=-1.0,
        type=float,
        help="force weight to be this value (spherical) -1 means deactivated ")
    p.add_argument("-e",
                   "--force_weight_frac",
                   dest="force_weight_frac",
                   action="store_true",
                   default=False,
                   help="force weight to be 1.0/(num centers). "
                   "Takes precedence over -w")
    p.add_argument("-d",
                   "--use_dirichlet",
                   dest="use_dirichlet",
                   default=False,
                   action="store_true",
                   help="use dirichlet process for fit")

    p.add_argument(
        "-k",
        "--multiply_by_mass",
        dest="multiply_by_mass",
        default=False,
        action="store_true",
        help=
        "if set, will multiply all weights by the total mass of the particles (PDB ONLY)"
    )
    p.add_argument("-x",
                   "--chain",
                   dest="chain",
                   default=None,
                   help="If you passed a PDB file, read this chain")

    p.add_argument(
        "-z",
        "--use_cpp",
        dest="use_cpp",
        default=False,
        action="store_true",
        help="EXPERIMENTAL. Uses the IMP GMM code. Requires isd_emxl")
    p.add_argument("data_file", help="data file name")
    p.add_argument("n_centers", type=int, help="number of centers")
    p.add_argument("out_file", help="output file name")
    return p.parse_args()
Beispiel #28
0
def parse_args():
    desc = """
Compare output models to a reference structure.
The reference structure for each subunit is read from the rightmost column
of the asmb.input file.
"""
    p = ArgumentParser(description=desc)
    p.add_argument("-m", "--max", type=int, dest="max", default=None,
                   help="maximum number of models to compare")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("combinations_file", help="combinations file name")
    return p.parse_args()
Beispiel #29
0
def parse_args():
    desc = """
Fit subunits locally around a combination solution with FFT."""
    p = ArgumentParser(description=desc)
    p.add_argument("-a", "--angle", dest="angle", type=float, default=5,
                   help="angle delta (degrees) for FFT rotational "
                        "search (default 5)")

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

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

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

    p.add_argument("-m", "--max_angle", dest="max_angle", type=float,
                   default=30.,
                   help="maximum angular search in degrees (default 50)")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("ref_assembly_file", help="refined assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("combination_index", type=int,
                   help="number of the combination to read from the "
                        "combinations file")
    return p.parse_args()
Beispiel #30
0
def parse_args():
    desc = """
This script, given the structure of a single subunit and the Chimera
transformations file, applies the transformations to generate a number of
complete models."""

    p = ArgumentParser(description=desc)
    p.add_argument('subunit', help="subunit PDB, the same given to MultiFit")
    p.add_argument('degree', type=int, help="Cn symmetry degree")
    p.add_argument('transform_file',
                   help="MultiFit output file in Chimera output format")
    p.add_argument('num_models', type=int,
                   help="number of output models")
    p.add_argument('output',
                   help="solution filename prefix; solutions are written "
                        "as <output>.i.pdb")
    return p.parse_args()
Beispiel #31
0
def parse_args():
    desc = """
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."""

    p = ArgumentParser(description=desc)
    p.add_argument("-o",
                   "--out",
                   dest="out",
                   default="multifit.output",
                   metavar="FILE",
                   help="the name of the MultiFit output file. The default "
                   "filename is multifit.output")
    p.add_argument("-i",
                   "--med",
                   dest="med",
                   metavar="FILE",
                   default="",
                   help="Print intermediate results to the named file.")
    p.add_argument("-p",
                   "--params",
                   dest="params",
                   default="multifit.param",
                   help="the name of the MultiFit parameters file. The "
                   "default filename is multifit.param")
    p.add_argument("-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")
    p.add_argument("-n",
                   "--numsols",
                   dest="numsols",
                   default=10,
                   type=int,
                   help="the number of solutions(fits) to report; "
                   "default 10")
    p.add_argument("degree", type=int, help="cyclic symmetry degree")
    p.add_argument("monomer", help="monomer PDB file name")
    p.add_argument("density", help="density map file name")
    p.add_argument("resolution",
                   type=float,
                   help="density map resolution, in angstroms")
    p.add_argument("spacing",
                   type=float,
                   help="density map voxel spacing, in angstroms")
    p.add_argument("threshold",
                   type=float,
                   help="the threshold of the density map, used for "
                   "PCA matching")
    p.add_argument("origin_x",
                   type=float,
                   help="density map origin X coordinate")
    p.add_argument("origin_y",
                   type=float,
                   help="density map origin Y coordinate")
    p.add_argument("origin_z",
                   type=float,
                   help="density map origin Z coordinate")
    return p.parse_args()
Beispiel #32
0
def parse_args():
    desc = "A script for clustering an ensemble of solutions"
    p = ArgumentParser(description=desc)
    p.add_argument("-m",
                   "--max",
                   type=int,
                   dest="max",
                   default=999999999,
                   help="maximum number of combinations to consider")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("diameter", type=float, help="cluster diameter")
    p.add_argument("cluster_file", help="output clusters file name")
    return p.parse_args()
Beispiel #33
0
def parse_args():
    desc = """
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.
"""
    p = ArgumentParser(description=desc)
    p.add_argument("--apix",
                   type=float,
                   default=None,
                   help="map spacing, in angstroms/pix (default: read "
                   "from MRC file)")
    p.add_argument("-x",
                   "--x",
                   type=float,
                   default=None,
                   help="X origin of the density map")
    p.add_argument("-y",
                   "--y",
                   type=float,
                   default=None,
                   help="Y origin of the density map")
    p.add_argument("-z",
                   "--z",
                   type=float,
                   default=None,
                   help="Z origin of the density map")
    p.add_argument("--cmm", default="", help="write results in CMM format")
    p.add_argument("--seg",
                   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")
    p.add_argument("--txt",
                   default="",
                   help="write anchor points file in text format")
    p.add_argument("density", help="density map filename (in MRC format)")
    p.add_argument("num_cluster", type=int, help="number of clusters")
    p.add_argument("threshold", type=float, help="density threshold")
    p.add_argument("output", help="output PDB file name")
    return p.parse_args()
Beispiel #34
0
def parse_args():
    desc = """Write output models."""
    p = ArgumentParser(description=desc)
    p.add_argument("-m", "--max", type=int, dest="max", default=None,
                   help="maximum number of models to write")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("model_prefix", help="model output file name prefix")
    return p.parse_args()
Beispiel #35
0
def usage():
    usage = """%prog [options] <asmb> <asmb.proteomics> <asmb.mapping>
           <alignment.params> <combinatins> <score combinations [output]>

Score each of a set of combinations.
"""
    p = ArgumentParser(usage)
    p.add_argument("-m", "--max", dest="max", type=int, default=999999999,
                   help="maximum number of fits considered")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("scores_file", help="output scores file name")
    return p.parse_args()
Beispiel #36
0
def parse_args():
    desc = """Align proteomics graph with the EM map."""
    p = ArgumentParser(description=desc)
    p.add_argument("-m",
                   "--max",
                   type=int,
                   dest="max",
                   default=999999999,
                   help="maximum number of fits considered")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name (output)")
    p.add_argument("scores_file", help="fitting scores file name (output)")

    return p.parse_args()
Beispiel #37
0
def usage():
    desc =  """
Clustering of assembly solutions.

This program uses the Python 'fastcluster' module, which can be obtained from
http://math.stanford.edu/~muellner/fastcluster.html
"""
    p = ArgumentParser(description=desc)
    p.add_argument("-m", "--max", type=int, dest="max", default=999999999,
                   help="maximum solutions to consider")
    p.add_argument("-r", "--rmsd", type=float, dest="rmsd", default=5,
                   help="maximum rmsd within a cluster")
    p.add_argument("assembly_file", help="assembly file name")
    p.add_argument("proteomics_file", help="proteomics file name")
    p.add_argument("mapping_file", help="mapping file name")
    p.add_argument("param_file", help="parameter file name")
    p.add_argument("combinations_file", help="combinations file name")
    p.add_argument("cluster_file", help="output clusters file name")

    return p.parse_args()