Mercurial > repos > chemteam > mdanalysis_ramachandran_plot
annotate end-to-end.py @ 4:70a2d548e62c draft
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
author | chemteam |
---|---|
date | Mon, 24 Aug 2020 16:23:14 -0400 |
parents | |
children |
rev | line source |
---|---|
4
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
1 #!/usr/bin/env python |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
2 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
3 import argparse |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
4 import itertools |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
5 import sys |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
6 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
7 import MDAnalysis as mda |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
8 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
9 import matplotlib |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
10 import matplotlib.pyplot as plt |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
11 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
12 import numpy as np |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
13 import numpy.linalg |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
14 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
15 matplotlib.use('Agg') # noqa |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
16 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
17 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
18 def parse_command_line(argv): |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
19 parser = argparse.ArgumentParser() |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
20 parser.add_argument('--itraj', help='input traj') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
21 parser.add_argument('--istr', help='input str') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
22 parser.add_argument('--itrajext', help='input traj ext') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
23 parser.add_argument('--istrext', help='input str ext') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
24 parser.add_argument('--isegid1', help='segid 1') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
25 parser.add_argument('--ilabel', help='plot label') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
26 parser.add_argument('--ititle1', help='plot title') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
27 parser.add_argument('--output1', help='output1 - timeseries') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
28 parser.add_argument('--o_plot', help='End to End plot') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
29 return parser.parse_args() |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
30 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
31 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
32 args = parse_command_line(sys.argv) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
33 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
34 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
35 u = mda.Universe(args.istr, args.itraj, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
36 topology_format=args.istrext, format=args.itrajext) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
37 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
38 ntermatoms = "(segid %s and name N)" % \ |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
39 (args.isegid1) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
40 ctermatoms = "(segid %s and name C)" % \ |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
41 (args.isegid1) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
42 # not sure how robust this selection really is |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
43 nterm = u.select_atoms(ntermatoms)[0] # first atom named N |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
44 cterm = u.select_atoms(ctermatoms)[-1] # takes the last atom named 'C' |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
45 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
46 enddist = [] |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
47 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
48 for ts in u.trajectory: # iterate through all frames |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
49 r = cterm.position - nterm.position # e-to-e vector from atom positions |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
50 d = numpy.linalg.norm(r) # end-to-end distance |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
51 enddist.append((ts.frame, d)) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
52 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
53 enddist = np.array(enddist) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
54 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
55 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
56 color = itertools.cycle(['r', 'b', 'gold']) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
57 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
58 fig, axs = plt.subplots(1, 2, sharex=False, sharey=False, tight_layout=True) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
59 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
60 params = { |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
61 'axes.labelsize': 8, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
62 'legend.fontsize': 10, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
63 'xtick.labelsize': 10, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
64 'ytick.labelsize': 10, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
65 'text.usetex': False, |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
66 'figure.figsize': [4.5, 4.5], |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
67 'figure.dpi': 300 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
68 } |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
69 plt.rcParams.update(params) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
70 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
71 axs[0].plot(enddist[:, 0], enddist[:, 1], 'r-', lw=2, label=args.ilabel) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
72 axs[0].set_xlabel("number of frames") |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
73 axs[0].set_ylabel(r"End to end distance ($\AA$)") |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
74 axs[0].legend() |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
75 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
76 n, bins, patches = axs[1].hist(enddist[:, 1], color=next( |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
77 color), label=args.ilabel, alpha=0.5, density=True, stacked=True) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
78 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
79 axs[1].legend() |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
80 axs[1].set_ylabel('Density Normalised Frequency') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
81 axs[1].set_xlabel(r'End to end distance ($\AA$)') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
82 fig.suptitle(args.ititle1, fontsize=12, fontweight='bold') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
83 fig.subplots_adjust(top=0.45) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
84 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
85 print( |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
86 " \n".join( |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
87 [ |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
88 'The End to End distance is measured between the following atoms:', |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
89 str(nterm), |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
90 str(cterm)])) |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
91 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
92 # svg is better but sticking with png for now |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
93 plt.savefig(args.o_plot, format='png') |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
94 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
95 |
70a2d548e62c
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 1b23e024af45cc0999d9142d07de6897d4189ec2"
chemteam
parents:
diff
changeset
|
96 np.savetxt(args.output1, enddist, delimiter='\t') |