Mercurial > repos > chemteam > biomd_rmsd_clustering
changeset 2:b9c46dbe9605 draft default tip
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit f1c3c88c7395f2e84cbc533199406aadb79c5c07"
| author | chemteam |
|---|---|
| date | Fri, 13 Nov 2020 19:38:57 +0000 |
| parents | b001ebc8bf58 |
| children | |
| files | NEQGamma.py get_clusters.py rmsd_clustering.py rmsd_clustering.xml test-data/NEQGamma_ofrict.txt test-data/NEQGamma_ofrict1.txt test-data/NEQGamma_ofrict2.txt test-data/NEQGamma_outp.txt test-data/NEQGamma_outp1.txt test-data/NEQGamma_outp2.txt test-data/Z_unnormalized.tabular test-data/dendrogram.png test-data/outp_mat_unnormalized.tabular |
| diffstat | 13 files changed, 644 insertions(+), 623 deletions(-) [+] |
line wrap: on
line diff
--- a/NEQGamma.py Fri Sep 11 21:55:34 2020 +0000 +++ b/NEQGamma.py Fri Nov 13 19:38:57 2020 +0000 @@ -129,17 +129,18 @@ dist = open(output, "w") frict = open(output_frict, "w") - dist.write( - "#x force_integral frict_coeff wdiss corrected_force_integral\n") + dist.write('\t'.join(('#x', 'force_integral', 'frict_coeff', + 'wdiss', 'corrected_force_integral\n'))) for i in range(length_data): - dist.write("{:15.8f} {:20.8f} {:20.8f} {:20.8f} {:20.8f}\n".format( + dist.write("{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\n".format( x[i], av_forceintegral[i], av_intcorr[i], wdiss[i], av_forceintegral[i] - wdiss[i])) - frict.write("""#x ACF frict_coeff """ - """gauss_filtered_frict_coeff av_window_frict_coeff\n""") + frict.write('\t'.join(('#x', 'ACF', 'frict_coeff', + 'gauss_filtered_frict_coeff', + 'av_window_frict_coeff\n'))) for i in range(length_data): - frict.write("{:15.8f} {:20.8f} {:20.8f} {:20.8f} {:20.8f}\n".format( + frict.write("{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\n".format( x[i], autocorr_set[i], av_intcorr[i], blurred[i], runn_av[i])) dist.close() @@ -149,7 +150,7 @@ def main(): - parser = argparse.ArgumentParser(description="""dcTMD friciton correction + parser = argparse.ArgumentParser(description="""dcTMD friction correction (please cite: Wolf, S., Stock, G. Targeted Molecular Dynamics Calculations of Free Energy Profiles Using a Nonequilibrium Friction Correction. J. Chem. Theory Comput. 2018, 14(12), 6175-6182,
--- a/get_clusters.py Fri Sep 11 21:55:34 2020 +0000 +++ b/get_clusters.py Fri Nov 13 19:38:57 2020 +0000 @@ -23,7 +23,7 @@ parser = argparse.ArgumentParser() parser.add_argument('--Z', required=True, help='File for cluster linkage array.') - parser.add_argument('--threshold', type=int, required=True, + parser.add_argument('--threshold', type=float, required=True, help='Distance cutoff.') parser.add_argument('--min-members', type=int, required=True, help='Minimum number of members of the cluster.')
--- a/rmsd_clustering.py Fri Sep 11 21:55:34 2020 +0000 +++ b/rmsd_clustering.py Fri Nov 13 19:38:57 2020 +0000 @@ -48,7 +48,8 @@ def plot_dendrogram(Z, output): - plt.figure(figsize=(25, 10)) + # figure width scales with number of leaves + plt.figure(figsize=(0.25 * Z.shape[0], 10)) plt.title('Hierarchical Clustering Dendrogram') plt.xlabel('Trajectory index') plt.ylabel('distance')
--- a/rmsd_clustering.xml Fri Sep 11 21:55:34 2020 +0000 +++ b/rmsd_clustering.xml Fri Nov 13 19:38:57 2020 +0000 @@ -2,7 +2,7 @@ <description>from MD RMSD matrix data</description> <macros> <token name="@TOOL_VERSION@">1.5.2</token> - <token name="@GALAXY_VERSION@">0</token> + <token name="@GALAXY_VERSION@">1</token> </macros> <requirements> <requirement type="package" version="@TOOL_VERSION@">scipy</requirement> @@ -28,7 +28,7 @@ #end if --start '$start' --end '$end' - '$normalize' + $normalize ]]></command> <inputs> <param label="JSON or tabular input file" type="data" format="json,tabular" name="inp" argument="--json"/> @@ -75,6 +75,18 @@ <output name="hmap" value="heatmap.png"/> <output name="Z" value="Z.tabular"/> </test> + <test expect_num_outputs="2"> + <param name="inp" value="inp.json"/> + <param name="dendrogram" value="false"/> + <param name="heatmap" value="false"/> + <param name="clustering_method" value="average"/> + <param name="cmap" value="plasma"/> + <param name="start" value="0"/> + <param name="end" value="-1"/> + <param name="normalize" value="false"/> + <output name="outp_mat" value="outp_mat_unnormalized.tabular"/> + <output name="Z" value="Z_unnormalized.tabular"/> + </test> </tests> <help><