Esempio n. 1
0
def main():
    parser = argparse.ArgumentParser(
        description=
        "Check the errors of a PDB structure and create a report log file.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('-i',
                               '--input_pdb_path',
                               required=True,
                               help="Input PDB file name")
    required_args.add_argument('-o',
                               '--output_log_path',
                               required=True,
                               help="Output log file name")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    checking_log(input_pdb_path=args.input_pdb_path,
                 output_log_path=args.output_log_path,
                 properties=properties)
Esempio n. 2
0
def main():
    parser = argparse.ArgumentParser(description='Adds counterions to a system box for an AMBER MD system using tLeap.', formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_pdb_path', required=True, help='Input 3D structure PDB file. Accepted formats: pdb.')
    required_args.add_argument('--input_lib_path', required=False, help='Input ligand library parameters file. Accepted formats: lib, zip.')
    required_args.add_argument('--input_frcmod_path', required=False, help='Input ligand frcmod parameters file. Accepted formats: frcmod, zip.')
    required_args.add_argument('--input_params_path', required=False, help='Additional leap parameter files to load with loadAmberParams Leap command. Accepted formats: leapin, in, txt, zip.')
    required_args.add_argument('--input_source_path', required=False, help='Additional leap command files to load with source Leap command. Accepted formats: leapin, in, txt, zip.')
    required_args.add_argument('--output_pdb_path', required=True, help='Output 3D structure PDB file matching the topology file. Accepted formats: pdb.')
    required_args.add_argument('--output_top_path', required=True, help='Output topology file (AMBER ParmTop). Accepted formats: top.')
    required_args.add_argument('--output_crd_path', required=True, help='Output coordinates file (AMBER crd). Accepted formats: crd.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    leap_add_ions(   input_pdb_path=args.input_pdb_path,
                    input_lib_path=args.input_lib_path,
                    input_frcmod_path=args.input_frcmod_path,
                    input_params_path=args.input_params_path,
                    input_source_path=args.input_source_path,
                    output_pdb_path=args.output_pdb_path,
                    output_top_path=args.output_top_path,
                    output_crd_path=args.output_crd_path,
                    properties=properties)
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "This class is a wrapper of the Structure Checking tool to generate summary checking results on a json file.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '-i',
        '--input_structure_path',
        required=True,
        help="Input structure file path. Accepted formats: pdb.")
    required_args.add_argument(
        '-o',
        '--output_summary_path',
        required=True,
        help="Output summary checking results. Accepted formats: json.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    structure_check(input_structure_path=args.input_structure_path,
                    output_summary_path=args.output_summary_path,
                    properties=properties)
Esempio n. 4
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Wrapper for the GROMACS make_ndx module.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_structure_path', required=True)
    required_args.add_argument('--output_ndx_path', required=True)
    parser.add_argument('--input_ndx_path', required=False)

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    make_ndx(input_structure_path=args.input_structure_path,
             output_ndx_path=args.output_ndx_path,
             input_ndx_path=args.input_ndx_path,
             properties=properties)
Esempio n. 5
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Makes predictions from an input dataset and a given classification model.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_model_path',
        required=True,
        help='Path to the input model. Accepted formats: pkl.')
    required_args.add_argument(
        '--output_results_path',
        required=True,
        help='Path to the output results file. Accepted formats: csv.')
    parser.add_argument(
        '--input_dataset_path',
        required=False,
        help='Path to the dataset to predict. Accepted formats: csv.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    classification_predict(input_model_path=args.input_model_path,
                           output_results_path=args.output_results_path,
                           input_dataset_path=args.input_dataset_path,
                           properties=properties)
Esempio n. 6
0
def main(config, system=None):
    conf = settings.ConfReader(config, system)
    global_log, _ = fu.get_logs(path=conf.get_working_dir_path(),
                                light_format=True)

    for mutation in conf.properties['mutations']:
        for ligand in conf.properties['ligands']:

            traj_code = "_".join([mutation, ligand])
            traj_code_path = os.path.join(mutation, ligand)
            ensemble_prop = conf.get_prop_dic(prefix=traj_code_path)
            ensemble_paths = conf.get_paths_dic(prefix=traj_code_path)

            # Image
            global_log.info("Imaging " + traj_code +
                            " trajectory to remove PBC issues")
            # /gpfs/projects/bsc23/bsc23513/BioExcel/BioExcel_EGFR_pmx/MDs/WT/WT_apo_md_FULL.xtc
            folder = conf.properties['workdir'] + "/" + mutation
            traj = folder + "/" + traj_code + "_md_FULL.xtc"
            top = folder + "/" + traj_code + "_md_1.tpr"
            out = folder + "/" + traj_code + "_md_FULL.imaged.xtc"
            global_log.info("Traj in:" + traj)
            global_log.info("Top in:" + top)
            global_log.info("Traj out:" + out)
            ensemble_paths['image']['input_traj_path'] = traj
            ensemble_paths['image']['input_top_path'] = top
            ensemble_paths['image']['output_traj_path'] = out
            gmx_image_pc(**ensemble_paths["image"],
                         properties=ensemble_prop["image"])
Esempio n. 7
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Wrapper of the scikit-learn PLSRegression method.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_dataset_path',
        required=True,
        help='Path to the input dataset. Accepted formats: csv.')
    required_args.add_argument(
        '--output_results_path',
        required=True,
        help=
        'Table with R2 and MSE for calibration and cross-validation data for the best number of components. Accepted formats: csv.'
    )
    parser.add_argument(
        '--output_plot_path',
        required=False,
        help='Path to the Mean Square Error plot. Accepted formats: png.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    pls_components(input_dataset_path=args.input_dataset_path,
                   output_results_path=args.output_results_path,
                   output_plot_path=args.output_plot_path,
                   properties=properties)
Esempio n. 8
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Sets the center and the size of a rectangular parallelepiped box around a selection of residues found in a given PDB.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_pdb_path',
        required=True,
        help=
        'PDB protein structure for which the box will be build. Its size and center will be set around the \'resid_list\' property once mapped against this PDB. Accepted formats: pdb.'
    )
    required_args.add_argument(
        '--output_pdb_path',
        required=True,
        help=
        'PDB including the annotation of the box center and size as REMARKs. Accepted formats: pdb.'
    )

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    box_residues(input_pdb_path=args.input_pdb_path,
                 output_pdb_path=args.output_pdb_path,
                 properties=properties)
Esempio n. 9
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "This class is a wrapper for downloading a MMCIF structure from the Protein Data Bank.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '-o',
        '--output_mmcif_path',
        required=True,
        help="Path to the output MMCIF file. Accepted formats: cif, mmcif.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    mmcif(output_mmcif_path=args.output_mmcif_path, properties=properties)
Esempio n. 10
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Wrapper for the Protein Data Bank in Europe (https://www.ebi.ac.uk/pdbe/) and the MMB PDB mirror (http://mmb.irbbarcelona.org/api/) for downloading a single PDB ligand.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    #Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '-o',
        '--output_pdb_path',
        required=True,
        help="Path to the output PDB ligand file. Accepted formats: pdb.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    #Specific call of each building block
    ligand(output_pdb_path=args.output_pdb_path, properties=properties)
Esempio n. 11
0
def main():
    parser = argparse.ArgumentParser(description='Running molecular dynamics using pmemd tool from the AMBER MD package.', formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_top_path', required=True, help='Input topology file (AMBER ParmTop). Accepted formats: top, prmtop, parmtop.')
    required_args.add_argument('--input_crd_path', required=True, help='Input coordinates file (AMBER crd). Accepted formats: crd, mdcrd.')
    required_args.add_argument('--input_mdin_path', required=False, help='Input configuration file (MD run options) (AMBER mdin). Accepted formats: mdin, in, txt.')
    required_args.add_argument('--input_cpin_path', required=False, help='Input constant pH file (AMBER cpin). Accepted formats: cpin.')
    required_args.add_argument('--input_ref_path', required=False, help='Input reference coordinates for position restraints. Accepted formats: rst, rst7.')
    required_args.add_argument('--output_log_path', required=True, help='Output log file. Accepted formats: log, out, txt.')
    required_args.add_argument('--output_traj_path', required=True, help='Output trajectory file. Accepted formats: trj, crd, mdcrd, x.')
    required_args.add_argument('--output_rst_path', required=True, help='Output restart file. Accepted formats: rst, rst7.')
    required_args.add_argument('--output_cpout_path', required=False, help='Output constant pH file (AMBER cpout). Accepted formats: cpout.')
    required_args.add_argument('--output_cprst_path', required=False, help='Output constant pH restart file (AMBER rstout). Accepted formats: cprst.')
    required_args.add_argument('--output_mdinfo_path', required=False, help='Output MD info. Accepted formats: mdinfo.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    pmemd_mdrun(    input_top_path=args.input_top_path,
                    input_crd_path=args.input_crd_path,
                    input_mdin_path=args.input_mdin_path,
                    input_cpin_path=args.input_cpin_path,
                    input_ref_path=args.input_ref_path,
                    output_log_path=args.output_log_path,
                    output_traj_path=args.output_traj_path,
                    output_rst_path=args.output_rst_path,
                    output_cpout_path=args.output_cpout_path,
                    output_cprst_path=args.output_cprst_path,
                    output_mdinfo_path=args.output_mdinfo_path,
                    properties=properties)
Esempio n. 12
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Sets the center and the size of a rectangular parallelepiped box around a set of residues from a given PDB or a pocket from a given PQR.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_pdb_path',
        required=True,
        help=
        'PDB file containing a selection of residue numbers or PQR file containing the pocket. Accepted formats: pdb, pqr.'
    )
    required_args.add_argument(
        '--output_pdb_path',
        required=True,
        help=
        'PDB including the annotation of the box center and size as REMARKs. Accepted formats: pdb.'
    )

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    box(input_pdb_path=args.input_pdb_path,
        output_pdb_path=args.output_pdb_path,
        properties=properties)
Esempio n. 13
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Removes hydrogen atoms to small molecules.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_path',
        required=True,
        help=
        'Path to the input file. Accepted formats: dat, ent, fa, fasta, gro, inp, log, mcif, mdl, mmcif, mol, mol2, pdb, pdbqt, png, sdf, smi, smiles, txt, xml, xtc.'
    )
    required_args.add_argument(
        '--output_path',
        required=True,
        help=
        'Path to the output file. Accepted formats: ent, fa, fasta, gro, inp, mcif, mdl, mmcif, mol, mol2, pdb, pdbqt, png, sdf, smi, smiles, txt.'
    )

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    babel_remove_hydrogens(input_path=args.input_path,
                           output_path=args.output_path,
                           properties=properties)
Esempio n. 14
0
def main():
    parser = argparse.ArgumentParser(
        description="Flip the clashing amide groups to avoid clashes.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('-i',
                               '--input_pdb_path',
                               required=True,
                               help="Input PDB file name")
    required_args.add_argument('-o',
                               '--output_pdb_path',
                               required=True,
                               help="Output PDB file name")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    fix_amides(input_pdb_path=args.input_pdb_path,
               output_pdb_path=args.output_pdb_path,
               properties=properties)
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Remove the selected ligand atoms from a 3D structure.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('-i',
                               '--input_structure_path',
                               required=True,
                               help="Input structure file name")
    required_args.add_argument('-o',
                               '--output_structure_path',
                               required=True,
                               help="Output structure file name")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    extract_atoms(input_structure_path=args.input_structure_path,
                  output_structure_path=args.output_structure_path,
                  properties=properties)
Esempio n. 16
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "This class is a wrapper for the PDBe REST API Binding Sites endpoint",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    #Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '-o',
        '--output_json_path',
        required=True,
        help=
        "Path to the JSON file with the binding sites for the requested structure. Accepted formats: json."
    )

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    #Specific call of each building block
    api_binding_site(output_json_path=args.output_json_path,
                     properties=properties)
Esempio n. 17
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Extracts energy components from a given GROMACS energy file.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    #Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_energy_path',
        required=True,
        help='Path to the input EDR file. Accepted formats: edr.')
    required_args.add_argument(
        '--output_xvg_path',
        required=True,
        help='Path to the XVG output file. Accepted formats: xvg.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    #Specific call of each building block
    gmx_energy(input_energy_path=args.input_energy_path,
               output_xvg_path=args.output_xvg_path,
               properties=properties)
Esempio n. 18
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Wrapper of the scikit-learn SpectralClustering method.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_dataset_path',
        required=True,
        help='Path to the input dataset. Accepted formats: csv.')
    required_args.add_argument(
        '--output_results_path',
        required=True,
        help='Path to the clustered dataset. Accepted formats: csv.')
    parser.add_argument(
        '--output_plot_path',
        required=False,
        help='Path to the clustering plot. Accepted formats: png.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    spectral_clustering(input_dataset_path=args.input_dataset_path,
                        output_results_path=args.output_results_path,
                        output_plot_path=args.output_plot_path,
                        properties=properties)
Esempio n. 19
0
def main():
    parser = argparse.ArgumentParser(
        description="Wrapper for the GROMACS solvate module.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_solute_gro_path', required=True)
    required_args.add_argument('--output_gro_path', required=True)
    required_args.add_argument('--input_top_zip_path', required=True)
    required_args.add_argument('--output_top_zip_path', required=True)

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    Solvate(input_solute_gro_path=args.input_solute_gro_path,
            output_gro_path=args.output_gro_path,
            input_top_zip_path=args.input_top_zip_path,
            output_top_zip_path=args.output_top_zip_path,
            properties=properties).launch()
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Adds hydrogen atoms to small molecules.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_path',
        required=True,
        help='Path to the input file. Accepted formats: pdb.')
    required_args.add_argument(
        '--output_path',
        required=True,
        help='Path to the output file. Accepted formats: pdb.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    reduce_add_hydrogens(input_path=args.input_path,
                         output_path=args.output_path,
                         properties=properties)
Esempio n. 21
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description=
        "Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to download a simulation.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument(
        '-c',
        '--config',
        required=False,
        help="This file can be a YAML file, JSON file or JSON string")

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '-o',
        '--output_simulation',
        required=True,
        help=
        "Path to the output simulation in a ZIP file. Accepted formats: zip.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call of each building block
    memprotmd_sim(output_simulation=args.output_simulation,
                  properties=properties)
Esempio n. 22
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(
        description="Generates a correlation matrix from a given dataset",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_dataset_path',
        required=True,
        help='Path to the input dataset. Accepted formats: csv.')
    required_args.add_argument(
        '--output_plot_path',
        required=True,
        help='Path to the correlation matrix plot. Accepted formats: png.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config).get_prop_dic()

    # Specific call of each building block
    correlation_matrix(input_dataset_path=args.input_dataset_path,
                       output_plot_path=args.output_plot_path,
                       properties=properties)
Esempio n. 23
0
def main():
    parser = argparse.ArgumentParser(
        description='Description for the template module.',
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # 10. Include specific args of each building block following the examples. They should match step 2
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_file_path1',
        required=True,
        help='Description for the first input file path. Accepted formats: top.'
    )
    parser.add_argument(
        '--input_file_path2',
        required=False,
        help=
        'Description for the second input file path (optional). Accepted formats: dcd.'
    )
    required_args.add_argument(
        '--output_file_path',
        required=True,
        help='Description for the output file path. Accepted formats: zip.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # 11. Adapt to match Class constructor (step 2)
    # Specific call of each building block
    Template(input_file_path1=args.input_file_path1,
             input_file_path2=args.input_file_path2,
             output_file_path=args.output_file_path,
             properties=properties).launch()
Esempio n. 24
0
def main():
    parser = argparse.ArgumentParser(
        description=
        'Parses the AMBER (sander) minimization output file (log) and dumps statistics that can then be plotted. Using the process_minout.pl tool from the AmberTools MD package.',
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_log_path',
        required=True,
        help=
        'AMBER (sander) minimization output (log) file. Accepted formats: log, out, txt, o.'
    )
    required_args.add_argument(
        '--output_dat_path',
        required=True,
        help=
        'Dat output file containing data from the specified terms along the minimization process. File type: output. Accepted formats: dat, txt, csv.'
    )

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    process_minout(input_log_path=args.input_log_path,
                   output_dat_path=args.output_dat_path,
                   properties=properties)
def main():
    parser = argparse.ArgumentParser(
        description="Small molecule parameterization for AMBER MD package.",
        formatter_class=lambda prog: argparse.RawTextHelpFormatter(
            prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')
    parser.add_argument(
        '--system',
        required=False,
        help=
        "Check 'https://biobb-common.readthedocs.io/en/latest/system_step.html' for help"
    )
    parser.add_argument(
        '--step',
        required=False,
        help=
        "Check 'https://biobb-common.readthedocs.io/en/latest/system_step.html' for help"
    )

    # Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument(
        '--input_path',
        required=True,
        help='Path to the input file. Accepted formats: pdb, mdl, mol2.')
    required_args.add_argument(
        '--output_path_frcmod',
        required=True,
        help='Path to the FRCMOD output file. Accepted formats: frcmod.')
    required_args.add_argument(
        '--output_path_inpcrd',
        required=True,
        help='Path to the INPCRD output file. Accepted formats: inpcrd.')
    required_args.add_argument(
        '--output_path_lib',
        required=True,
        help='Path to the LIB output file. Accepted formats: lib.')
    required_args.add_argument(
        '--output_path_prmtop',
        required=True,
        help='Path to the PRMTOP output file. Accepted formats: prmtop.')

    args = parser.parse_args()
    args.config = args.config or "{}"
    properties = settings.ConfReader(config=args.config,
                                     system=args.system).get_prop_dic()
    if args.step:
        properties = properties[args.step]

    # Specific call of each building block
    AcpypeParamsAC(input_path=args.input_path,
                   output_path_frcmod=args.output_path_frcmod,
                   output_path_inpcrd=args.output_path_inpcrd,
                   output_path_lib=args.output_path_lib,
                   output_path_prmtop=args.output_path_prmtop,
                   properties=properties).launch()
def main():
    parser = argparse.ArgumentParser(description='Building a 3D structure from a DNA sequence using nab.', formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--output_pdb_path', required=True, help='Linear (unfolded) 3D structure PDB file. Accepted formats: pdb.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    nab_build_dna_structure(output_pdb_path=args.output_pdb_path,
             properties=properties)
Esempio n. 27
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(description="Wrapper for the UNIPROT (http://www.uniprot.org/) mirror of the MMB group REST API (http://mmb.irbbarcelona.org/api/) for creating a list of all the variants mapped to a PDB code from the corresponding UNIPROT entries.", formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('-c', '--config', required=False, help="This file can be a YAML file, JSON file or JSON string")

    #Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('-o', '--output_mutations_list_txt', required=True, help="Path to the TXT file containing an ASCII comma separated values of the mutations. Accepted formats: txt.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    #Specific call of each building block
    pdb_variants(output_mutations_list_txt=args.output_mutations_list_txt, 
                properties=properties)
Esempio n. 28
0
def main():
    """Command line execution of this building block. Please check the command line documentation."""
    parser = argparse.ArgumentParser(description="Download a component in SDF format from the Drugbank (https://www.drugbank.ca/).", formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('-c', '--config', required=False, help="This file can be a YAML file, JSON file or JSON string")

    #Specific args of each building block
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('-o', '--output_sdf_path', required=True, help="Path to the output SDF component file. Accepted formats: sdf.")

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    #Specific call of each building block
    drugbank(output_sdf_path=args.output_sdf_path, 
            properties=properties)
Esempio n. 29
0
def main():
    parser = argparse.ArgumentParser(description='Performs a Hydrogen Mass Repartition from an AMBER topology file using parmed tool from the AmberTools MD package.', formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_top_path', required=True, help='Input AMBER topology file. Accepted formats: top, parmtop, prmtop.')
    required_args.add_argument('--output_top_path', required=False, help='Output topology file (AMBER ParmTop). Accepted formats: top, parmtop, prmtop.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    parmed_hmassrepartition(   input_top_path=args.input_top_path,
                            output_top_path=args.output_top_path,
                            properties=properties)
Esempio n. 30
0
def main():
    parser = argparse.ArgumentParser(description='Analyse PDB files and clean them for further usage, especially with the LEaP programs of Amber, using pdb4amber tool from the AmberTools MD package.', formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999))
    parser.add_argument('--config', required=False, help='Configuration file')

    # Specific args
    required_args = parser.add_argument_group('required arguments')
    required_args.add_argument('--input_pdb_path', required=True, help='Input 3D structure PDB file. Accepted formats: pdb.')
    required_args.add_argument('--output_pdb_path', required=True, help='Output 3D structure PDB file. Accepted formats: pdb.')

    args = parser.parse_args()
    config = args.config if args.config else None
    properties = settings.ConfReader(config=config).get_prop_dic()

    # Specific call
    pdb4amber_run(    input_pdb_path=args.input_pdb_path,
                    output_pdb_path=args.output_pdb_path,
                    properties=properties)