Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,10 @@ scaler = MinMaxScaler()
|
|
| 11 |
def extract_features(sequence):
|
| 12 |
"""Calculate AAC, Dipeptide Composition, and normalize features."""
|
| 13 |
# Calculate Amino Acid Composition (AAC) and convert to array
|
| 14 |
-
aac = np.array(list(
|
| 15 |
|
| 16 |
# Calculate Dipeptide Composition and convert to array
|
| 17 |
-
dipeptide_comp = np.array(list(
|
| 18 |
|
| 19 |
# Combine both features (AAC and Dipeptide Composition)
|
| 20 |
features = np.concatenate((aac, dipeptide_comp))
|
|
|
|
| 11 |
def extract_features(sequence):
|
| 12 |
"""Calculate AAC, Dipeptide Composition, and normalize features."""
|
| 13 |
# Calculate Amino Acid Composition (AAC) and convert to array
|
| 14 |
+
aac = np.array(list(AAComposition.CalculateAAC(sequence).values()))
|
| 15 |
|
| 16 |
# Calculate Dipeptide Composition and convert to array
|
| 17 |
+
dipeptide_comp = np.array(list(AAComposition.CalculateAADipeptideComposition(sequence).values()))
|
| 18 |
|
| 19 |
# Combine both features (AAC and Dipeptide Composition)
|
| 20 |
features = np.concatenate((aac, dipeptide_comp))
|