nonzeroexit commited on
Commit
9eb7a80
·
verified ·
1 Parent(s): f3b700a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -49,9 +49,14 @@ def extract_features(sequence):
49
 
50
  all_features_dict = {}
51
 
52
- # Calculate all features
53
  dipeptide_features = AAComposition.CalculateAADipeptideComposition(sequence)
54
- all_features_dict.update(dipeptide_features)
 
 
 
 
 
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)