nonzeroexit commited on
Commit
6f19eaa
·
verified ·
1 Parent(s): 4d0770a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -52,8 +52,14 @@ def extract_features(sequence):
52
 
53
  all_features_dict = {}
54
 
 
55
  dipeptide_features = AAComposition.CalculateAADipeptideComposition(sequence)
56
- all_features_dict.update(dipeptide_features)
 
 
 
 
 
57
 
58
  auto_features = Autocorrelation.CalculateAutoTotal(sequence)
59
  all_features_dict.update(auto_features)
 
52
 
53
  all_features_dict = {}
54
 
55
+ # Calculate all dipeptide features
56
  dipeptide_features = AAComposition.CalculateAADipeptideComposition(sequence)
57
+
58
+ # Add only the first 420 features to the dictionary
59
+ first_420_keys = list(dipeptide_features.keys())[:420] # Get the first 420 keys
60
+ filtered_dipeptide_features = {key: dipeptide_features[key] for key in first_420_keys}
61
+
62
+ all_features_dict.update(filtered_dipeptide_features)
63
 
64
  auto_features = Autocorrelation.CalculateAutoTotal(sequence)
65
  all_features_dict.update(auto_features)