From 7b70d9d21bea2fc56022c2d1e2d84ebed7d35303 Mon Sep 17 00:00:00 2001 From: Alex Carlin Date: Wed, 16 Aug 2017 18:32:40 -0700 Subject: [PATCH 1/2] Added my awesome script --- apps/PointMutations/PointMutation.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 apps/PointMutations/PointMutation.py diff --git a/apps/PointMutations/PointMutation.py b/apps/PointMutations/PointMutation.py new file mode 100644 index 0000000..e69de29 From 9cf49bc48ba9075f0a80b7b698e003d4f58ed9fc Mon Sep 17 00:00:00 2001 From: Alex Carlin Date: Wed, 16 Aug 2017 18:53:40 -0700 Subject: [PATCH 2/2] Added an example script that makes a point mutation --- apps/PointMutations/PointMutation.py | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/apps/PointMutations/PointMutation.py b/apps/PointMutations/PointMutation.py index e69de29..a433390 100644 --- a/apps/PointMutations/PointMutation.py +++ b/apps/PointMutations/PointMutation.py @@ -0,0 +1,29 @@ +import pyrosetta +from pyrosetta.rosetta import protocols +import argparse +from Bio.Data import IUPACData + +# parse command line arguments +parser = argparse.ArgumentParser() +parser.add_argument('--input_pose', help='PDB file of input pose') +parser.add_argument('--mutation', help='The mutation you would like to make in the form A123B') +parser.add_argument('--output_filename', help='Name of the output PDB') +args = parser.parse_args() + +# initialize PyRosetta +pyrosetta.init() + +# create a pose +pose = pyrosetta.pose_from_file(args.input_pose) + +# get a scorefxn +score_function = pyrosetta.create_score_function('ref2015') + +# mutate the residue +target = int(args.mutation[1:-1]) +new_res = IUPACData.protein_letters_1to3[args.mutation[-1]].upper() +mutate = protocols.simple_moves.MutateResidue(target, new_res) +mutate.apply(pose) + +# output a PDB of the mutation +pose.dump_pdb(args.output_filename)