Skip to content

Commit d77d3a6

Browse files
committed
Update headers
1 parent aea8f36 commit d77d3a6

File tree

8 files changed

+112
-42
lines changed

8 files changed

+112
-42
lines changed

b3clf/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# The B3clf library provides a set of functions for transforming
3-
# a matrix to make it as similar as possible to a target matrix.
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
44
#
55
# Copyright (C) 2021 The Ayers Lab
66
#

b3clf/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# The B3clf library provides a set of functions for transforming
3-
# a matrix to make it as similar as possible to a target matrix.
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
44
#
55
# Copyright (C) 2021 The Ayers Lab
66
#
@@ -61,11 +61,11 @@ def main():
6161
args = parser.parse_args()
6262

6363
# Input variables
64-
_ = b3clf(descriptors_path=args.mol,
64+
_ = b3clf(mol_in=args.mol,
6565
sep=args.sep,
66-
clf_str=args.clf,
67-
sampling_str=args.sampling,
68-
xlsx_output=args.output,
66+
classification=args.clf,
67+
sampling=args.sampling,
68+
output=args.output,
6969
)
7070

7171

b3clf/b3clf.py

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
4+
#
5+
# Copyright (C) 2021 The Ayers Lab
6+
#
7+
# This file is part of B3clf.
8+
#
9+
# B3clf is free software; you can redistribute it and/or
10+
# modify it under the terms of the GNU General Public License
11+
# as published by the Free Software Foundation; either version 3
12+
# of the License, or (at your option) any later version.
13+
#
14+
# B3clf is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, see <http://www.gnu.org/licenses/>
21+
#
22+
# --
23+
124
"""
225
Main B3clf Script.
326
@@ -17,69 +40,48 @@
1740
]
1841

1942

20-
def b3clf(descriptors_path,
43+
def b3clf(mol_in,
2144
sep,
22-
clf_str,
23-
sampling_str,
24-
xlsx_output,
45+
classification,
46+
sampling,
47+
output,
2548
):
2649
"""Use B3clf for BBB classifications."""
2750

2851
features_out = "internal_padel_descriptors.xlsx"
2952
internal_sdf = "internal.sdf"
3053

31-
# ===================
32-
# Pipeline
33-
# ===================
34-
35-
# ===================
3654
# Geometry optimization
37-
# ===================
3855
# Input:
3956
# * Either an SDF file with molecular geometries or a text file with SMILES strings
4057

41-
geometry_optimize(input_fname=descriptors_path, output_sdf=internal_sdf, sep=sep)
58+
geometry_optimize(input_fname=mol_in, output_sdf=internal_sdf, sep=sep)
4259

43-
# ===================
4460
# Compute descriptors with PaDel
45-
# ===================
4661
# Internal file name passed should be relative to this directory I think
4762
_ = compute_descriptors(sdf_file=internal_sdf, excel_out=features_out)
4863

49-
# ===================
5064
# Get computed descriptors
51-
# ===================
5265
X_features, info_df = get_descriptors(df=features_out)
5366
# X_features, info_df = get_descriptors(internal_df)
5467

55-
# ===================
5668
# Select descriptors
57-
# ===================
5869
X_features = select_descriptors(df=X_features)
5970

60-
# ===================
6171
# Scale descriptors
62-
# ===================
6372
X_features = scale_descriptors(df=X_features)
6473

65-
# ===================
6674
# Get classifier
67-
# ===================
68-
69-
clf = get_clf(clf_str=clf_str, sampling_str=sampling_str)
75+
clf = get_clf(clf_str=classification, sampling_str=sampling)
7076

71-
# ===================
7277
# Get classifier
73-
# ===================
7478
result_df = predict_permeability(clf=clf, features_df=X_features, info_df=info_df)
7579

76-
# ===================
7780
# Get classifier
78-
# ===================
7981
display_cols = ["ID", "SMILES", "B3clf_predicted_probability", "B3clf_predicted_label"]
8082

8183
display_df = result_df[[col for col in result_df.columns.to_list() if col in display_cols]]
8284
# print(display_df)
8385

84-
display_df.to_excel(xlsx_output, index=None)
86+
display_df.to_excel(output, index=None)
8587
return display_df

b3clf/descriptor_padel.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
4+
#
5+
# Copyright (C) 2021 The Ayers Lab
6+
#
7+
# This file is part of B3clf.
8+
#
9+
# B3clf is free software; you can redistribute it and/or
10+
# modify it under the terms of the GNU General Public License
11+
# as published by the Free Software Foundation; either version 3
12+
# of the License, or (at your option) any later version.
13+
#
14+
# B3clf is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, see <http://www.gnu.org/licenses/>
21+
#
22+
# --
23+
124
import pandas as pd
225
from padelpy import from_sdf
326
from rdkit import Chem

b3clf/geometry_opt.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
# import os
2-
# import subprocess
1+
# -*- coding: utf-8 -*-
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
4+
#
5+
# Copyright (C) 2021 The Ayers Lab
6+
#
7+
# This file is part of B3clf.
8+
#
9+
# B3clf is free software; you can redistribute it and/or
10+
# modify it under the terms of the GNU General Public License
11+
# as published by the Free Software Foundation; either version 3
12+
# of the License, or (at your option) any later version.
13+
#
14+
# B3clf is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, see <http://www.gnu.org/licenses/>
21+
#
22+
# --
323

424
import pandas as pd
525
from rdkit import Chem

b3clf/utils.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
4+
#
5+
# Copyright (C) 2021 The Ayers Lab
6+
#
7+
# This file is part of B3clf.
8+
#
9+
# B3clf is free software; you can redistribute it and/or
10+
# modify it under the terms of the GNU General Public License
11+
# as published by the Free Software Foundation; either version 3
12+
# of the License, or (at your option) any later version.
13+
#
14+
# B3clf is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, see <http://www.gnu.org/licenses/>
21+
#
22+
# --
23+
124
"""
225
B3clf utility functions
326

b3clf/version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# The B3clf library provides a set of functions for transforming
3-
# a matrix to make it as similar as possible to a target matrix.
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
44
#
55
# Copyright (C) 2021 The Ayers Lab
66
#
@@ -20,6 +20,7 @@
2020
# along with this program; if not, see <http://www.gnu.org/licenses/>
2121
#
2222
# --
23+
2324
"""Version Information for B3clf."""
2425

2526
VERSION = (0, 0, 1, "beta")

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
# The B3clf library provides a set of functions for transforming
3-
# a matrix to make it as similar as possible to a target matrix.
2+
# The B3clf library computes the blood-brain barrier (BBB) permeability
3+
# of organic molecules with resampling strategies.
44
#
55
# Copyright (C) 2021 The Ayers Lab
66
#
@@ -20,6 +20,7 @@
2020
# along with this program; if not, see <http://www.gnu.org/licenses/>
2121
#
2222
# --
23+
2324
"""Installation script for B3clf.
2425
2526
Directly calling this script is only needed by B3clf developers in special

0 commit comments

Comments
 (0)