ProximileAdmin commited on
Commit
801e309
·
verified ·
1 Parent(s): 5ce3f7b

Update create_diffusion_dataset.py

Browse files
Files changed (1) hide show
  1. create_diffusion_dataset.py +3 -1
create_diffusion_dataset.py CHANGED
@@ -6,6 +6,8 @@ import json
6
  import random
7
  from collections import defaultdict, Counter
8
 
 
 
9
  class ProteinNetworkConversationDataset:
10
  def __init__(self, filename: str):
11
  """
@@ -101,7 +103,7 @@ class ProteinNetworkConversationDataset:
101
  print(f"Found {len(candidate_proteins)} proteins with degree {min_connections}-{max_connections}")
102
 
103
  neighborhoods = []
104
- for protein in candidate_proteins[:500]: # Limit for processing
105
  neighborhood = self.extract_neighborhood(protein, interactions, max_size=10)
106
  if len(neighborhood['proteins']) >= 3: # Minimum viable network
107
  neighborhoods.append(neighborhood)
 
6
  import random
7
  from collections import defaultdict, Counter
8
 
9
+ LIMIT_CANDIDATE_PROTEINS = 5000
10
+
11
  class ProteinNetworkConversationDataset:
12
  def __init__(self, filename: str):
13
  """
 
103
  print(f"Found {len(candidate_proteins)} proteins with degree {min_connections}-{max_connections}")
104
 
105
  neighborhoods = []
106
+ for protein in candidate_proteins[:LIMIT_CANDIDATE_PROTEINS]: # Limit for processing
107
  neighborhood = self.extract_neighborhood(protein, interactions, max_size=10)
108
  if len(neighborhood['proteins']) >= 3: # Minimum viable network
109
  neighborhoods.append(neighborhood)