Update create_diffusion_dataset.py
Browse files
create_diffusion_dataset.py
CHANGED
|
@@ -19,8 +19,8 @@ import tempfile
|
|
| 19 |
import shutil
|
| 20 |
|
| 21 |
# Global configuration
|
| 22 |
-
MAX_PROTEINS_TO_PROCESS =
|
| 23 |
-
TRUNCATE_MIDDLE_ABOVE_THIS =
|
| 24 |
|
| 25 |
class ProteinDataEnricher:
|
| 26 |
"""
|
|
@@ -798,7 +798,7 @@ class ProteinNetworkConversationDataset:
|
|
| 798 |
# Show first 50 and last 20 amino acids
|
| 799 |
seq = enriched_data['sequence']
|
| 800 |
if len(seq) > TRUNCATE_MIDDLE_ABOVE_THIS:
|
| 801 |
-
seq_preview = f"{seq[:
|
| 802 |
else:
|
| 803 |
seq_preview = seq
|
| 804 |
context_parts.append(f" Sequence: {seq_preview}")
|
|
|
|
| 19 |
import shutil
|
| 20 |
|
| 21 |
# Global configuration
|
| 22 |
+
MAX_PROTEINS_TO_PROCESS = 1000
|
| 23 |
+
TRUNCATE_MIDDLE_ABOVE_THIS = 120
|
| 24 |
|
| 25 |
class ProteinDataEnricher:
|
| 26 |
"""
|
|
|
|
| 798 |
# Show first 50 and last 20 amino acids
|
| 799 |
seq = enriched_data['sequence']
|
| 800 |
if len(seq) > TRUNCATE_MIDDLE_ABOVE_THIS:
|
| 801 |
+
seq_preview = f"{seq[:int(TRUNCATE_MIDDLE_ABOVE_THIS*0.5)]}...{seq[-int(TRUNCATE_MIDDLE_ABOVE_THIS*0.2):]}"
|
| 802 |
else:
|
| 803 |
seq_preview = seq
|
| 804 |
context_parts.append(f" Sequence: {seq_preview}")
|