MASSA-Algorithm 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSA.py +4 -1
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAlogos.py +2 -2
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAopen_files.py +14 -14
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/PKG-INFO +181 -167
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/PKG-INFO +181 -167
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/README.md +3 -1
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/setup.cfg +4 -4
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/setup.py +1 -1
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/LICENSE +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MANIFEST.in +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAargs.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAcluster.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAdescriptors.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAextraction.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAmoloutput.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAod.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSApreparation.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/MASSAsplit.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/__init__.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm/pyMASSA.py +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/SOURCES.txt +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/dependency_links.txt +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/entry_points.txt +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/requires.txt +0 -0
- {massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/top_level.txt +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import time
|
|
1
2
|
from MASSA_Algorithm import MASSAlogos
|
|
2
3
|
from MASSA_Algorithm import MASSAargs
|
|
3
4
|
from MASSA_Algorithm import MASSAod
|
|
@@ -8,7 +9,8 @@ from MASSA_Algorithm import MASSApreparation
|
|
|
8
9
|
from MASSA_Algorithm import MASSAcluster
|
|
9
10
|
from MASSA_Algorithm import MASSAsplit
|
|
10
11
|
from MASSA_Algorithm import MASSAmoloutput
|
|
11
|
-
import
|
|
12
|
+
from joblib import parallel_backend
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
def returns_zero(total, test, validation):
|
|
@@ -49,6 +51,7 @@ def main():
|
|
|
49
51
|
Main subroutine, allows the program to run directly from
|
|
50
52
|
the command line when installed via pip.
|
|
51
53
|
"""
|
|
54
|
+
parallel_backend('multiprocessing')
|
|
52
55
|
# Initializing from the command line.
|
|
53
56
|
# Print the program logo:
|
|
54
57
|
MASSAlogos.initial_print()
|
|
@@ -20,7 +20,7 @@ def initial_print():
|
|
|
20
20
|
██░░░▓▓▓▓░░░░░░░▓▓▓▓░░░░░░░▓▓▓▓░░░░█
|
|
21
21
|
██░░░░▓▓▓▓▓▓░░░░░▓▓▓▓▓▓░░░░░▓▓▓▓▓▓░░░░█ MASSA Algorithm:
|
|
22
22
|
████░░░░░▓▓▓▓░░░░░░░▓▓▓▓░░░░░░░▓▓▓▓░░░░░█████ Molecular data set sampling — Training-Test Separation
|
|
23
|
-
█▓▓▓███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███▓▓▓█ Version: v. 2.0.
|
|
23
|
+
█▓▓▓███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███▓▓▓█ Version: v. 2.0.1
|
|
24
24
|
█▒▓▓▒▒▒████░░░░░░░░░░░░░░░░░░░░░░░░░░░░████▒▒▓▓▒█
|
|
25
25
|
██▓▒▒▒▓▓▓▓██████████████████████████████▓▓▓▒▒▒▒▓█ Developed by: Gabriel Corrêa Veríssimo
|
|
26
26
|
██▒▒▒▓▓▒▒▒▒▓▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▓▓▒▒▒▓▓▒▒██ LICENSE: AGPL-3.0
|
|
@@ -31,4 +31,4 @@ def initial_print():
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def python_logo():
|
|
34
|
-
print("🍕 MASSA Algorithm v. 2.0.
|
|
34
|
+
print("🍕 MASSA Algorithm v. 2.0.1: Molecular data set sampling")
|
|
@@ -50,33 +50,33 @@ def find_name_column(columns):
|
|
|
50
50
|
Returns:
|
|
51
51
|
column_name (str): returns the name of the molecule name column.
|
|
52
52
|
"""
|
|
53
|
-
|
|
53
|
+
name_column = ""
|
|
54
54
|
for column in columns:
|
|
55
55
|
if "molecule name" == column.lower():
|
|
56
56
|
print((f"Found '{column}' column."
|
|
57
57
|
" Using it to name the molecules."))
|
|
58
58
|
name_column = column
|
|
59
|
-
|
|
59
|
+
break
|
|
60
60
|
elif "name" == column.lower():
|
|
61
61
|
print((f"Found '{column}' column."
|
|
62
62
|
" Using it to name the molecules."))
|
|
63
63
|
name_column = column
|
|
64
|
-
|
|
64
|
+
break
|
|
65
65
|
elif "molecule chembl id" == column.lower():
|
|
66
66
|
print((f"Found '{column}' column."
|
|
67
67
|
" Using it to name the molecules."))
|
|
68
68
|
name_column = column
|
|
69
|
-
|
|
69
|
+
break
|
|
70
70
|
elif "id" == column.lower():
|
|
71
71
|
print((f"Found '{column}' column."
|
|
72
72
|
" Using it to name the molecules."))
|
|
73
73
|
name_column = column
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
break
|
|
75
|
+
if name_column == "":
|
|
76
|
+
print(("Unable to find a column with molecule names."
|
|
77
|
+
" Using the index to name the molecules."))
|
|
78
|
+
name_column = "index"
|
|
79
|
+
return name_column
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
def read_df_smiles(df, write_log, drop_errors):
|
|
@@ -131,13 +131,13 @@ def read_df_smiles(df, write_log, drop_errors):
|
|
|
131
131
|
return mols
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
def read_EXCEL_smiles(file, write_log):
|
|
134
|
+
def read_EXCEL_smiles(file, write_log, drop_errors):
|
|
135
135
|
df_supplier = pd.read_excel(file)
|
|
136
136
|
mols_sanitized = read_df_smiles(df_supplier, write_log, drop_errors)
|
|
137
137
|
return mols_sanitized
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
def read_CSV_smiles(file, write_log):
|
|
140
|
+
def read_CSV_smiles(file, write_log, drop_errors):
|
|
141
141
|
df_supplier = pd.read_csv(file, sep=",")
|
|
142
142
|
mols_sanitized = read_df_smiles(df_supplier, write_log, drop_errors)
|
|
143
143
|
return mols_sanitized
|
|
@@ -280,9 +280,9 @@ def read_molecules(file, write_log, drop_errors):
|
|
|
280
280
|
elif file.endswith(".sdf") or file.endswith(".mol"):
|
|
281
281
|
molecules = read_SDF(file, write_log, drop_errors)
|
|
282
282
|
elif file.endswith(".xlsx") or file.endswith(".xls"):
|
|
283
|
-
molecules = read_EXCEL_smiles(file, write_log)
|
|
283
|
+
molecules = read_EXCEL_smiles(file, write_log, drop_errors)
|
|
284
284
|
elif file.endswith(".csv"):
|
|
285
|
-
molecules = read_CSV_smiles(file, write_log)
|
|
285
|
+
molecules = read_CSV_smiles(file, write_log, drop_errors)
|
|
286
286
|
return molecules
|
|
287
287
|
|
|
288
288
|
|
|
@@ -1,167 +1,181 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name: MASSA_Algorithm
|
|
3
|
-
Version: 2.0.
|
|
4
|
-
Summary: MASSA Algorithm is a Python package to separate data sets of molecules into training and test sets, considering the diversity of structural, physicochemical and biological characteristics of these molecules.
|
|
5
|
-
Home-page: https://github.com/gcverissimo/MASSA_Algorithm
|
|
6
|
-
Author: Gabriel Corrêa Veríssimo
|
|
7
|
-
Author-email: gcverissimo@outlook.com
|
|
8
|
-
License: AGPLv3
|
|
9
|
-
Keywords: chemoinformatics,training,test,training-test,dataset preparation,data set preparation,rdkit
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
16
|
-
Classifier: Operating System :: OS Independent
|
|
17
|
-
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
18
|
-
Requires-Python: >=3.8
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: numpy<2.0
|
|
22
|
-
Requires-Dist: rdkit
|
|
23
|
-
Requires-Dist: pandas
|
|
24
|
-
Requires-Dist: matplotlib>=3.2
|
|
25
|
-
Requires-Dist: scipy>=1.6
|
|
26
|
-
Requires-Dist: scikit-learn>0.24
|
|
27
|
-
Requires-Dist: kmodes>=0.10
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* **
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
*
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* Default =
|
|
125
|
-
* **
|
|
126
|
-
*
|
|
127
|
-
* Default =
|
|
128
|
-
* **
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
* Default =
|
|
132
|
-
* **
|
|
133
|
-
*
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MASSA_Algorithm
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: MASSA Algorithm is a Python package to separate data sets of molecules into training and test sets, considering the diversity of structural, physicochemical and biological characteristics of these molecules.
|
|
5
|
+
Home-page: https://github.com/gcverissimo/MASSA_Algorithm
|
|
6
|
+
Author: Gabriel Corrêa Veríssimo
|
|
7
|
+
Author-email: gcverissimo@outlook.com
|
|
8
|
+
License: AGPLv3
|
|
9
|
+
Keywords: chemoinformatics,training,test,training-test,dataset preparation,data set preparation,rdkit
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: numpy<2.0
|
|
22
|
+
Requires-Dist: rdkit
|
|
23
|
+
Requires-Dist: pandas
|
|
24
|
+
Requires-Dist: matplotlib>=3.2
|
|
25
|
+
Requires-Dist: scipy>=1.6
|
|
26
|
+
Requires-Dist: scikit-learn>0.24
|
|
27
|
+
Requires-Dist: kmodes>=0.10
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+
# MASSA Algorithm
|
|
42
|
+
MASSA Algorithm: A tool for separating data sets of molecules into training and test sets. Developed with the objective of preparing data sets for the generation of prediction models in cheminformatics.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Version 1.0.0
|
|
46
|
+
- Version 1.0.0 includes a code refactoring and adds the ability to split data into training, test, and validation subsets.
|
|
47
|
+
|
|
48
|
+
## Version 2.0.0
|
|
49
|
+
- Version 2.0.0 introduces algorithm changes to better handle large datasets. Specifically, for datasets with 10,000 molecules or more, Hierarchical Clustering Analysis (HCA) is automatically replaced by MiniBatch K-Means. This is the new default behavior, but it can be controlled using the flag -a / --large-datasets. Since dendrograms are generated from HCA, dendrogram plotting is disabled for large datasets. In such cases, the flag -f / --dendrogram-plot is automatically disabled, regardless of user input.
|
|
50
|
+
|
|
51
|
+
- This version introduces the ability to call the MASSA Algorithm from any Python script using MASSA_Algorithm.pyMASSA.py_massa(). However, instructions and documentation for doing so will be provided in future updates.
|
|
52
|
+
|
|
53
|
+
- Version 2.0.0 also addresses the "NaN/None values in y" error, which was caused by duplicate molecule names. In this version, molecules with identical names are detected and renamed by appending their original index as a suffix to ensure uniqueness.
|
|
54
|
+
|
|
55
|
+
- MASSA now preserves the input order of molecules in its output. However, molecules with chemical errors are skipped and excluded from the process.
|
|
56
|
+
|
|
57
|
+
## Instalation
|
|
58
|
+
MASSA Algorithm can be installed using pip:
|
|
59
|
+
```
|
|
60
|
+
pip install MASSA_Algorithm
|
|
61
|
+
```
|
|
62
|
+
To upgrade to the latest version (recommended), also use pip:
|
|
63
|
+
```
|
|
64
|
+
pip install --upgrade MASSA_Algorithm
|
|
65
|
+
```
|
|
66
|
+
Alternatively, you can build the latest development version from source:
|
|
67
|
+
```
|
|
68
|
+
git clone https://github.com/gcverissimo/MASSA_Algorithm.git
|
|
69
|
+
cd MASSA_Algorithm
|
|
70
|
+
python setup.py install
|
|
71
|
+
```
|
|
72
|
+
### Requirements
|
|
73
|
+
* python: >= 3.8;
|
|
74
|
+
* rdkit;
|
|
75
|
+
* numpy: < 2.0;
|
|
76
|
+
* pandas;
|
|
77
|
+
* matplotlib: >= 3.2;
|
|
78
|
+
* scipy: >= 1.6;
|
|
79
|
+
* scikit-learn: > 0.24;
|
|
80
|
+
* kmodes:¹ >= 0.10.
|
|
81
|
+
|
|
82
|
+
Newer versions of the packages may also work, but they need to be tested.
|
|
83
|
+
NOTE: Also tested on: scikit-learn: 1.7.0, scipy: 1.16.1, numpy: 2.0.2, rdkit: 2025.03.5.
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
Once installed, the program can be run directly from the command line:
|
|
87
|
+
```
|
|
88
|
+
MASSA_Algorithm -i <input_file>.sdf -o <output_file>.sdf
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Required arguments:
|
|
92
|
+
* **Input file**: ```-i``` or ```--input```.
|
|
93
|
+
* MASSA Algorithm accepts input files in the formats: .sdf, .mol, .mol2, .xlsx, .xls, and .csv. However, the .sdf format is preferred. Notes:
|
|
94
|
+
* .mol2 files have limitations in storing molecular properties and follow different saving patterns. Due to this, we only support .mol2 files that are generated by Discovery Studio Visualizer.
|
|
95
|
+
* For .xlsx, .xls, and .csv:
|
|
96
|
+
* MASSA will look for a column with smiles in the name and use it as the source of input molecules.
|
|
97
|
+
* MASSA will look for a column with one of the following names in the priority order: Molecule name, Name, Molecule ChEMBL ID, or ID. If none of these columns are found, it will use the molecule index.
|
|
98
|
+
* **Output file**: ```-o``` or ```--output```.
|
|
99
|
+
* Enter the output file name or file path. Image files will be saved to a folder within the same directory as the output file.
|
|
100
|
+
* It is highly recommended to use an .sdf file to avoid errors.
|
|
101
|
+
|
|
102
|
+
Optional arguments include:
|
|
103
|
+
* **Splitting strategy**: ```-y``` or ```--splitting_strategy```.
|
|
104
|
+
* Defines the splitting strategy, either into training and test sets or into training, test, and validation sets.
|
|
105
|
+
* Options = 'tt', 'tt-val'.
|
|
106
|
+
* 'tt', means splitting into training and test sets. 'tt-val', means splitting into training, test, and validation sets.
|
|
107
|
+
* Default = 'tt'.
|
|
108
|
+
* **Percentage of molecules in training set**: ```-p``` or ```--percentage_of_training```.
|
|
109
|
+
* Percentage of molecules in training set. Must be a number from 0 to 1.
|
|
110
|
+
* Default = 0.8.
|
|
111
|
+
* **Number of biological activities for separation**: ```-b``` or ```--number_of_biological```.
|
|
112
|
+
* Number of biological activities that will be used to separate the set into training and test.
|
|
113
|
+
* Default = 1.
|
|
114
|
+
* **Name of biological activities for separation**: ```-s``` or ```--the_biological_activities```.
|
|
115
|
+
* The biological activity(ies) or other y-property(ies) used for QSAR or machine learning modeling. The algorithm can handle one or more properties. Enter a list with the names of biological activities separated by commas and no spaces. These properties must be represented as either integers or floating-point numbers. If your dataset is represented in classes (e.g., active or inactive; soluble, partially soluble, or insoluble), you should represent them as integers (e.g., 0 or 1; 1, 2, or 3).
|
|
116
|
+
* Example: ```MASSA_Algorithm -i <input_file>.sdf -o <output_file>.sdf -s pIC50,pMIC```.
|
|
117
|
+
* Default = If not entered directly on the command line, it will be requested during algorithm execution.
|
|
118
|
+
* **Number of principal components in PCA**: ```-n``` or ```--number_of_PCs```.
|
|
119
|
+
* Defines the number of principal components to reduce the dimensionality of variables related to biological, physicochemical and structural domains. If the value is a decimal between 0 and 1, the number of principal components is what explains for (```<input number>```* 100)% of the variance. If the value is greater than 1, the number of PCs will be exactly the input integer, but PAY ATTENTION:
|
|
120
|
+
|
|
121
|
+
1) If the number of PCs is an integer and equal to or greater than the number of physicochemical properties (7), the PCA step will be bypassed for this domain.
|
|
122
|
+
2) The same for the biological domain.
|
|
123
|
+
3) If the number of biological activities is less than 3, the PCA step will be bypassed for this domain.
|
|
124
|
+
* Default = 0.85.
|
|
125
|
+
* **SVD solver parameter for PCA**: ```-v``` or ```--svd_solver_for_PCA```.
|
|
126
|
+
* See the sklearn.decomposition.PCA topic on https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html for more info.
|
|
127
|
+
* Default = full.
|
|
128
|
+
* **HCA linkage method**: ```-l``` or ```--linkage_method```.
|
|
129
|
+
* The linkage criterion to use. The algorithm will merge the pairs of cluster that minimize this criterion.
|
|
130
|
+
* Options = complete, single, ward, average, weighted, centroid, median. For more info, see the scipy.cluster.hierarchy.linkage topic on https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html?highlight=linkage#scipy.cluster.hierarchy.linkage.
|
|
131
|
+
* Default = complete.
|
|
132
|
+
* **Extension of image files**: ```-t``` or ```--image_type```.
|
|
133
|
+
* Extension of the image files that will be generated. Suggested = png or svg.
|
|
134
|
+
* Default = png.
|
|
135
|
+
* **Font size for X-axis of dendrograms**: ```-d``` or ```--dendrogram_Xfont_size```.
|
|
136
|
+
* Sets the font size on the x-axis of the dendrogram (molecule labels).
|
|
137
|
+
* Default = 5.
|
|
138
|
+
* **Font size for X-axis of bar plots**: ```-x``` or ```--barplot_Xfont_size```.
|
|
139
|
+
* Sets the font size on the x-axis of the bar plot (cluster labels).
|
|
140
|
+
* Default = 12.
|
|
141
|
+
* **Enable Dendrogram plot**: ```-f``` or ```--dendrogram_plot```.
|
|
142
|
+
* Defines whether or not dendrogram images will be generated.
|
|
143
|
+
* Options = true (dendrogram will be generated), false (dendrogram will not be generated).
|
|
144
|
+
* Default = true.
|
|
145
|
+
* **Ignore Errors**: ```-e``` or ```--drop_errors```.
|
|
146
|
+
* Ignore chemistry errors, saving only molecules without any errors.
|
|
147
|
+
* Options = true (ignore molecule errors and log them in the log file), false (treat molecule errors as fatal and fail the execution).
|
|
148
|
+
* Default = true.
|
|
149
|
+
* **Large Dataset**: ```-a``` or ```--large_dataset```.
|
|
150
|
+
* Switch the MASSA algorithm from HCA to MiniBatch-KMeans to handle large datasets.
|
|
151
|
+
* Options = auto (switches to KMeans if ≥ 10,000 molecules), false = use HCA (for smaller datasets), true = use KMeans (for large datasets).
|
|
152
|
+
* Default = auto.
|
|
153
|
+
|
|
154
|
+
#### Command line help
|
|
155
|
+
A full description of the arguments can also be viewed directly from the command line using the command:
|
|
156
|
+
```
|
|
157
|
+
MASSA_Algorithm -h
|
|
158
|
+
```
|
|
159
|
+
or
|
|
160
|
+
```
|
|
161
|
+
MASSA_Algorithm --help
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Cite
|
|
165
|
+
1. To ensure accurate citation, kindly include a reference to the MASSA article, accessible via the DOI:
|
|
166
|
+
Veríssimo, G. C.; Panteleão, S. Q.; Fernandes, P. O.; Gertrudes, J. C.; Kronenberger, T.; Honorio, K. M.; Maltarollo; V. G. MASSA Algorithm: an automated rational sampling of training and test subsets for QSAR modeling. J. Comput. Aided Mol. Des. 2023, 37, 735–754. https://doi.org/10.1007/s10822-023-00536-y.
|
|
167
|
+
|
|
168
|
+
2. Furthermore, please incorporate the program citation following the provided template:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
@Misc{veríssimo2021,
|
|
172
|
+
author = {Gabriel Corrêa Veríssimo},
|
|
173
|
+
title = {MASSA Algorithm: Molecular data set sampling for training-test separation},
|
|
174
|
+
howpublished = {\url{https://github.com/gcverissimo/MASSA_Algorithm}},
|
|
175
|
+
year = {2021}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## References
|
|
180
|
+
[1]: DE VOS, N. J. kmodes categorical clustering library. https://github.com/nicodv/kmodes. 2015-2021.
|
|
181
|
+
|
|
@@ -1,167 +1,181 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name: MASSA_Algorithm
|
|
3
|
-
Version: 2.0.
|
|
4
|
-
Summary: MASSA Algorithm is a Python package to separate data sets of molecules into training and test sets, considering the diversity of structural, physicochemical and biological characteristics of these molecules.
|
|
5
|
-
Home-page: https://github.com/gcverissimo/MASSA_Algorithm
|
|
6
|
-
Author: Gabriel Corrêa Veríssimo
|
|
7
|
-
Author-email: gcverissimo@outlook.com
|
|
8
|
-
License: AGPLv3
|
|
9
|
-
Keywords: chemoinformatics,training,test,training-test,dataset preparation,data set preparation,rdkit
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
16
|
-
Classifier: Operating System :: OS Independent
|
|
17
|
-
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
18
|
-
Requires-Python: >=3.8
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: numpy<2.0
|
|
22
|
-
Requires-Dist: rdkit
|
|
23
|
-
Requires-Dist: pandas
|
|
24
|
-
Requires-Dist: matplotlib>=3.2
|
|
25
|
-
Requires-Dist: scipy>=1.6
|
|
26
|
-
Requires-Dist: scikit-learn>0.24
|
|
27
|
-
Requires-Dist: kmodes>=0.10
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
* **
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
*
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* Default =
|
|
125
|
-
* **
|
|
126
|
-
*
|
|
127
|
-
* Default =
|
|
128
|
-
* **
|
|
129
|
-
*
|
|
130
|
-
|
|
131
|
-
* Default =
|
|
132
|
-
* **
|
|
133
|
-
*
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: MASSA_Algorithm
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: MASSA Algorithm is a Python package to separate data sets of molecules into training and test sets, considering the diversity of structural, physicochemical and biological characteristics of these molecules.
|
|
5
|
+
Home-page: https://github.com/gcverissimo/MASSA_Algorithm
|
|
6
|
+
Author: Gabriel Corrêa Veríssimo
|
|
7
|
+
Author-email: gcverissimo@outlook.com
|
|
8
|
+
License: AGPLv3
|
|
9
|
+
Keywords: chemoinformatics,training,test,training-test,dataset preparation,data set preparation,rdkit
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: numpy<2.0
|
|
22
|
+
Requires-Dist: rdkit
|
|
23
|
+
Requires-Dist: pandas
|
|
24
|
+
Requires-Dist: matplotlib>=3.2
|
|
25
|
+
Requires-Dist: scipy>=1.6
|
|
26
|
+
Requires-Dist: scikit-learn>0.24
|
|
27
|
+
Requires-Dist: kmodes>=0.10
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+
# MASSA Algorithm
|
|
42
|
+
MASSA Algorithm: A tool for separating data sets of molecules into training and test sets. Developed with the objective of preparing data sets for the generation of prediction models in cheminformatics.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## Version 1.0.0
|
|
46
|
+
- Version 1.0.0 includes a code refactoring and adds the ability to split data into training, test, and validation subsets.
|
|
47
|
+
|
|
48
|
+
## Version 2.0.0
|
|
49
|
+
- Version 2.0.0 introduces algorithm changes to better handle large datasets. Specifically, for datasets with 10,000 molecules or more, Hierarchical Clustering Analysis (HCA) is automatically replaced by MiniBatch K-Means. This is the new default behavior, but it can be controlled using the flag -a / --large-datasets. Since dendrograms are generated from HCA, dendrogram plotting is disabled for large datasets. In such cases, the flag -f / --dendrogram-plot is automatically disabled, regardless of user input.
|
|
50
|
+
|
|
51
|
+
- This version introduces the ability to call the MASSA Algorithm from any Python script using MASSA_Algorithm.pyMASSA.py_massa(). However, instructions and documentation for doing so will be provided in future updates.
|
|
52
|
+
|
|
53
|
+
- Version 2.0.0 also addresses the "NaN/None values in y" error, which was caused by duplicate molecule names. In this version, molecules with identical names are detected and renamed by appending their original index as a suffix to ensure uniqueness.
|
|
54
|
+
|
|
55
|
+
- MASSA now preserves the input order of molecules in its output. However, molecules with chemical errors are skipped and excluded from the process.
|
|
56
|
+
|
|
57
|
+
## Instalation
|
|
58
|
+
MASSA Algorithm can be installed using pip:
|
|
59
|
+
```
|
|
60
|
+
pip install MASSA_Algorithm
|
|
61
|
+
```
|
|
62
|
+
To upgrade to the latest version (recommended), also use pip:
|
|
63
|
+
```
|
|
64
|
+
pip install --upgrade MASSA_Algorithm
|
|
65
|
+
```
|
|
66
|
+
Alternatively, you can build the latest development version from source:
|
|
67
|
+
```
|
|
68
|
+
git clone https://github.com/gcverissimo/MASSA_Algorithm.git
|
|
69
|
+
cd MASSA_Algorithm
|
|
70
|
+
python setup.py install
|
|
71
|
+
```
|
|
72
|
+
### Requirements
|
|
73
|
+
* python: >= 3.8;
|
|
74
|
+
* rdkit;
|
|
75
|
+
* numpy: < 2.0;
|
|
76
|
+
* pandas;
|
|
77
|
+
* matplotlib: >= 3.2;
|
|
78
|
+
* scipy: >= 1.6;
|
|
79
|
+
* scikit-learn: > 0.24;
|
|
80
|
+
* kmodes:¹ >= 0.10.
|
|
81
|
+
|
|
82
|
+
Newer versions of the packages may also work, but they need to be tested.
|
|
83
|
+
NOTE: Also tested on: scikit-learn: 1.7.0, scipy: 1.16.1, numpy: 2.0.2, rdkit: 2025.03.5.
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
Once installed, the program can be run directly from the command line:
|
|
87
|
+
```
|
|
88
|
+
MASSA_Algorithm -i <input_file>.sdf -o <output_file>.sdf
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Required arguments:
|
|
92
|
+
* **Input file**: ```-i``` or ```--input```.
|
|
93
|
+
* MASSA Algorithm accepts input files in the formats: .sdf, .mol, .mol2, .xlsx, .xls, and .csv. However, the .sdf format is preferred. Notes:
|
|
94
|
+
* .mol2 files have limitations in storing molecular properties and follow different saving patterns. Due to this, we only support .mol2 files that are generated by Discovery Studio Visualizer.
|
|
95
|
+
* For .xlsx, .xls, and .csv:
|
|
96
|
+
* MASSA will look for a column with smiles in the name and use it as the source of input molecules.
|
|
97
|
+
* MASSA will look for a column with one of the following names in the priority order: Molecule name, Name, Molecule ChEMBL ID, or ID. If none of these columns are found, it will use the molecule index.
|
|
98
|
+
* **Output file**: ```-o``` or ```--output```.
|
|
99
|
+
* Enter the output file name or file path. Image files will be saved to a folder within the same directory as the output file.
|
|
100
|
+
* It is highly recommended to use an .sdf file to avoid errors.
|
|
101
|
+
|
|
102
|
+
Optional arguments include:
|
|
103
|
+
* **Splitting strategy**: ```-y``` or ```--splitting_strategy```.
|
|
104
|
+
* Defines the splitting strategy, either into training and test sets or into training, test, and validation sets.
|
|
105
|
+
* Options = 'tt', 'tt-val'.
|
|
106
|
+
* 'tt', means splitting into training and test sets. 'tt-val', means splitting into training, test, and validation sets.
|
|
107
|
+
* Default = 'tt'.
|
|
108
|
+
* **Percentage of molecules in training set**: ```-p``` or ```--percentage_of_training```.
|
|
109
|
+
* Percentage of molecules in training set. Must be a number from 0 to 1.
|
|
110
|
+
* Default = 0.8.
|
|
111
|
+
* **Number of biological activities for separation**: ```-b``` or ```--number_of_biological```.
|
|
112
|
+
* Number of biological activities that will be used to separate the set into training and test.
|
|
113
|
+
* Default = 1.
|
|
114
|
+
* **Name of biological activities for separation**: ```-s``` or ```--the_biological_activities```.
|
|
115
|
+
* The biological activity(ies) or other y-property(ies) used for QSAR or machine learning modeling. The algorithm can handle one or more properties. Enter a list with the names of biological activities separated by commas and no spaces. These properties must be represented as either integers or floating-point numbers. If your dataset is represented in classes (e.g., active or inactive; soluble, partially soluble, or insoluble), you should represent them as integers (e.g., 0 or 1; 1, 2, or 3).
|
|
116
|
+
* Example: ```MASSA_Algorithm -i <input_file>.sdf -o <output_file>.sdf -s pIC50,pMIC```.
|
|
117
|
+
* Default = If not entered directly on the command line, it will be requested during algorithm execution.
|
|
118
|
+
* **Number of principal components in PCA**: ```-n``` or ```--number_of_PCs```.
|
|
119
|
+
* Defines the number of principal components to reduce the dimensionality of variables related to biological, physicochemical and structural domains. If the value is a decimal between 0 and 1, the number of principal components is what explains for (```<input number>```* 100)% of the variance. If the value is greater than 1, the number of PCs will be exactly the input integer, but PAY ATTENTION:
|
|
120
|
+
|
|
121
|
+
1) If the number of PCs is an integer and equal to or greater than the number of physicochemical properties (7), the PCA step will be bypassed for this domain.
|
|
122
|
+
2) The same for the biological domain.
|
|
123
|
+
3) If the number of biological activities is less than 3, the PCA step will be bypassed for this domain.
|
|
124
|
+
* Default = 0.85.
|
|
125
|
+
* **SVD solver parameter for PCA**: ```-v``` or ```--svd_solver_for_PCA```.
|
|
126
|
+
* See the sklearn.decomposition.PCA topic on https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html for more info.
|
|
127
|
+
* Default = full.
|
|
128
|
+
* **HCA linkage method**: ```-l``` or ```--linkage_method```.
|
|
129
|
+
* The linkage criterion to use. The algorithm will merge the pairs of cluster that minimize this criterion.
|
|
130
|
+
* Options = complete, single, ward, average, weighted, centroid, median. For more info, see the scipy.cluster.hierarchy.linkage topic on https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html?highlight=linkage#scipy.cluster.hierarchy.linkage.
|
|
131
|
+
* Default = complete.
|
|
132
|
+
* **Extension of image files**: ```-t``` or ```--image_type```.
|
|
133
|
+
* Extension of the image files that will be generated. Suggested = png or svg.
|
|
134
|
+
* Default = png.
|
|
135
|
+
* **Font size for X-axis of dendrograms**: ```-d``` or ```--dendrogram_Xfont_size```.
|
|
136
|
+
* Sets the font size on the x-axis of the dendrogram (molecule labels).
|
|
137
|
+
* Default = 5.
|
|
138
|
+
* **Font size for X-axis of bar plots**: ```-x``` or ```--barplot_Xfont_size```.
|
|
139
|
+
* Sets the font size on the x-axis of the bar plot (cluster labels).
|
|
140
|
+
* Default = 12.
|
|
141
|
+
* **Enable Dendrogram plot**: ```-f``` or ```--dendrogram_plot```.
|
|
142
|
+
* Defines whether or not dendrogram images will be generated.
|
|
143
|
+
* Options = true (dendrogram will be generated), false (dendrogram will not be generated).
|
|
144
|
+
* Default = true.
|
|
145
|
+
* **Ignore Errors**: ```-e``` or ```--drop_errors```.
|
|
146
|
+
* Ignore chemistry errors, saving only molecules without any errors.
|
|
147
|
+
* Options = true (ignore molecule errors and log them in the log file), false (treat molecule errors as fatal and fail the execution).
|
|
148
|
+
* Default = true.
|
|
149
|
+
* **Large Dataset**: ```-a``` or ```--large_dataset```.
|
|
150
|
+
* Switch the MASSA algorithm from HCA to MiniBatch-KMeans to handle large datasets.
|
|
151
|
+
* Options = auto (switches to KMeans if ≥ 10,000 molecules), false = use HCA (for smaller datasets), true = use KMeans (for large datasets).
|
|
152
|
+
* Default = auto.
|
|
153
|
+
|
|
154
|
+
#### Command line help
|
|
155
|
+
A full description of the arguments can also be viewed directly from the command line using the command:
|
|
156
|
+
```
|
|
157
|
+
MASSA_Algorithm -h
|
|
158
|
+
```
|
|
159
|
+
or
|
|
160
|
+
```
|
|
161
|
+
MASSA_Algorithm --help
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Cite
|
|
165
|
+
1. To ensure accurate citation, kindly include a reference to the MASSA article, accessible via the DOI:
|
|
166
|
+
Veríssimo, G. C.; Panteleão, S. Q.; Fernandes, P. O.; Gertrudes, J. C.; Kronenberger, T.; Honorio, K. M.; Maltarollo; V. G. MASSA Algorithm: an automated rational sampling of training and test subsets for QSAR modeling. J. Comput. Aided Mol. Des. 2023, 37, 735–754. https://doi.org/10.1007/s10822-023-00536-y.
|
|
167
|
+
|
|
168
|
+
2. Furthermore, please incorporate the program citation following the provided template:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
@Misc{veríssimo2021,
|
|
172
|
+
author = {Gabriel Corrêa Veríssimo},
|
|
173
|
+
title = {MASSA Algorithm: Molecular data set sampling for training-test separation},
|
|
174
|
+
howpublished = {\url{https://github.com/gcverissimo/MASSA_Algorithm}},
|
|
175
|
+
year = {2021}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## References
|
|
180
|
+
[1]: DE VOS, N. J. kmodes categorical clustering library. https://github.com/nicodv/kmodes. 2015-2021.
|
|
181
|
+
|
|
@@ -38,6 +38,7 @@ python setup.py install
|
|
|
38
38
|
* scipy: >= 1.6;
|
|
39
39
|
* scikit-learn: > 0.24;
|
|
40
40
|
* kmodes:¹ >= 0.10.
|
|
41
|
+
|
|
41
42
|
Newer versions of the packages may also work, but they need to be tested.
|
|
42
43
|
NOTE: Also tested on: scikit-learn: 1.7.0, scipy: 1.16.1, numpy: 2.0.2, rdkit: 2025.03.5.
|
|
43
44
|
|
|
@@ -104,7 +105,7 @@ Optional arguments include:
|
|
|
104
105
|
* **Ignore Errors**: ```-e``` or ```--drop_errors```.
|
|
105
106
|
* Ignore chemistry errors, saving only molecules without any errors.
|
|
106
107
|
* Options = true (ignore molecule errors and log them in the log file), false (treat molecule errors as fatal and fail the execution).
|
|
107
|
-
* Default =
|
|
108
|
+
* Default = true.
|
|
108
109
|
* **Large Dataset**: ```-a``` or ```--large_dataset```.
|
|
109
110
|
* Switch the MASSA algorithm from HCA to MiniBatch-KMeans to handle large datasets.
|
|
110
111
|
* Options = auto (switches to KMeans if ≥ 10,000 molecules), false = use HCA (for smaller datasets), true = use KMeans (for large datasets).
|
|
@@ -137,3 +138,4 @@ Veríssimo, G. C.; Panteleão, S. Q.; Fernandes, P. O.; Gertrudes, J. C.; Kronen
|
|
|
137
138
|
|
|
138
139
|
## References
|
|
139
140
|
[1]: DE VOS, N. J. kmodes categorical clustering library. https://github.com/nicodv/kmodes. 2015-2021.
|
|
141
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
@@ -5,7 +5,7 @@ with open('README.md', 'r') as readme:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name='MASSA_Algorithm',
|
|
8
|
-
version='2.0.
|
|
8
|
+
version='2.0.1',
|
|
9
9
|
description='MASSA Algorithm is a Python package to separate data sets of molecules into training and test sets, considering the diversity of structural, physicochemical and biological characteristics of these molecules.',
|
|
10
10
|
long_description=long_description,
|
|
11
11
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{massa_algorithm-2.0.0 → massa_algorithm-2.0.1}/MASSA_Algorithm.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|