Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,9 +49,14 @@ def extract_features(sequence):
|
|
| 49 |
|
| 50 |
all_features_dict = {}
|
| 51 |
|
| 52 |
-
|
| 53 |
dipeptide_features = AAComposition.CalculateAADipeptideComposition(sequence)
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
auto_features = Autocorrelation.CalculateAutoTotal(sequence)
|
| 57 |
all_features_dict.update(auto_features)
|
|
|
|
| 49 |
|
| 50 |
all_features_dict = {}
|
| 51 |
|
| 52 |
+
# Calculate all dipeptide features
|
| 53 |
dipeptide_features = AAComposition.CalculateAADipeptideComposition(sequence)
|
| 54 |
+
|
| 55 |
+
# Add only the first 420 features to the dictionary
|
| 56 |
+
first_420_keys = list(dipeptide_features.keys())[:420] # Get the first 420 keys
|
| 57 |
+
filtered_dipeptide_features = {key: dipeptide_features[key] for key in first_420_keys}
|
| 58 |
+
|
| 59 |
+
all_features_dict.update(filtered_dipeptide_features)
|
| 60 |
|
| 61 |
auto_features = Autocorrelation.CalculateAutoTotal(sequence)
|
| 62 |
all_features_dict.update(auto_features)
|