Skip to content

Commit

Permalink
Updates setup.py to include minimum package requirements to run RABDAM
Browse files Browse the repository at this point in the history
  • Loading branch information
kls93 committed Sep 28, 2021
1 parent dd163bd commit 26149cb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion rabdam/Subroutines/CalculateBDamage.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ def rabdam_dataframe(self, test=False):
'--USER INPUT-- type your choice and press RETURN\n'
'yes = continue RABDAM run\n'
'no = terminate RABDAM run\n')
owChoice = None
owChoice = None # Change to yes for batch running to prevent user
# input being required
# owChoice = 'yes'
while owChoice not in ['yes', 'no', 'y', 'n']:
if test is True:
owChoice = 'yes'
Expand Down
10 changes: 5 additions & 5 deletions rabdam/Subroutines/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def plot_Bnet_histogram(self, bnet_df, median, prot_or_na):
x_min = min(bnet_df.BDAM.values) - (3*tail_width)
x_max = max(bnet_df.BDAM.values) + (3*tail_width)

kde = gaussian_kde(dataset=bnet_df.BDAM.values, bw_method='scott', weights=None)
kde = gaussian_kde(dataset=bnet_df.BDAM.values, bw_method='scott')
x_values = np.linspace(x_min, x_max, 100)
y_values = kde(x_values)
height = (x_values[-1]-x_values[0]) / (len(x_values)-1)
Expand All @@ -378,9 +378,9 @@ def plot_Bnet_histogram(self, bnet_df, median, prot_or_na):
total_area_RHS = total_area_RHS + area_RHS

# Calculates area ratio (= Bnet)
ratio = total_area_RHS / total_area_LHS
kde_ratio = total_area_RHS / total_area_LHS

plt.annotate('Bnet = {:.1f}'.format(ratio),
plt.annotate('Bnet = {:.1f}'.format(kde_ratio),
xy=(max(x_values)*0.65, max(y_values)*0.9),
fontsize=10)
plt.annotate('Median = {:.2f}'.format(median),
Expand All @@ -394,11 +394,11 @@ def plot_Bnet_histogram(self, bnet_df, median, prot_or_na):
bnet_list.write('Bnet' + '\n')
bnet_list.close()
bnet_list = open('Logfiles/Bnet_{}.csv'.format(prot_or_na), 'a')
bnet_list.write('%s,%s\n' % (self.pdb_code, ratio))
bnet_list.write('%s,%s\n' % (self.pdb_code, kde_ratio))
bnet_list.close()

bnet_df = pd.DataFrame({'PDB': [self.pdb_code],
'Bnet': [ratio]})
'Bnet': [kde_ratio]})
if os.path.isfile('Logfiles/Bnet_{}.pkl'.format(prot_or_na)):
old_bnet_df = pd.read_pickle('Logfiles/Bnet_{}.pkl'.format(prot_or_na))
else:
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

numpy
matplotlib
scipy
seaborn
pandas
numpy >= 1.15.0
matplotlib >= 2.2.0
scipy >= 1.1.0
seaborn >= 0.8.0
pandas >= 0.24.1
requests
setuptools
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
packages=find_packages(),
package_data={'rabdam': ['Subroutines/HTML_stylesheet.css',
'Subroutines/HTML_stylesheet.js']},
version='1.6.3',
version='1.6.4',
description=('RABDAM: A program to identify and quantify specific '
'radiation damage within individual protein crystal '
'structures'),
Expand All @@ -22,8 +22,8 @@
license='LGPL v3',
keywords=['radiation damage', 'specific damage', 'atomic Bfactors',
'atomic displacement parameters', 'BDamage', 'Bnet'],
install_requires=['numpy', 'matplotlib', 'scipy', 'seaborn', 'pandas',
'requests', 'setuptools'],
install_requires=['numpy>=1.15.0', 'matplotlib>=2.2.0', 'scipy>=1.1.0',
'seaborn>=0.8.0', 'pandas>=0.24.1', 'requests', 'setuptools'],
classifiers=['Programming Language :: Python'],
python_requires=('>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, '
'!=3.5.*, <4'),
Expand Down

0 comments on commit 26149cb

Please sign in to comment.