Skip to content

Commit

Permalink
removed plot_protein fail if tm_dict.txt not found
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Nov 21, 2024
1 parent cf51dc6 commit d01ed0f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions basicrta/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,12 @@ def make_residue_plots(results, comps=None, show=False):

def plot_protein(residues, t_slow, bars, prot=None, label_cutoff=3, ylim=None,
major_tick=None, minor_tick=None, scale=1):
with open('tm_dict.txt', 'r') as f:
contents = f.read()
prots = ast.literal_eval(contents)
try:
with open('tm_dict.txt', 'r') as f:
contents = f.read()
prots = ast.literal_eval(contents)
except FileNotFoundError("tm_dict.txt not found"):
prot = None

if not os.path.exists('figs'):
os.mkdir('figs')
Expand Down

0 comments on commit d01ed0f

Please sign in to comment.