File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 44The augmented output will be in the same format.
55"""
66
7+ import warnings
78from typing import List , Optional , Tuple , Union
89
910import numpy as np
@@ -129,6 +130,13 @@ def __init__(
129130 self .shift_label = self .max_pair_shift > 0
130131 self .shift_seq = (self .max_seq_shift > 0 ) or (self .shift_label )
131132 self .mutate = (self .n_mutated_seqs > 0 ) and (self .n_mutated_bases > 0 )
133+ if self .mutate :
134+ warnings .warn (
135+ "Augmentation by introducing random mutations should be used with caution, "
136+ + "as it may result in models being insensitive to functional variation. This is an experimental "
137+ + "feature and the recommended usage is to perform a subsequent round of fine-tuning without "
138+ + "this augmentation (https://genomebiology.biomedcentral.com/articles/10.1186/s13059-023-02941-w)."
139+ )
132140
133141 # Create settings
134142 self .max_values = _get_multipliers (
@@ -152,7 +160,7 @@ def __len__(self) -> int:
152160 The total number of augmented sequences that can be produced from a single
153161 DNA sequence
154162 """
155- return 1 if self .mode == "random" else np .product (self .max_values )
163+ return 1 if self .mode == "random" else np .prod (self .max_values )
156164
157165 def _split (self , idx : int ) -> List [tuple ]:
158166 """
You can’t perform that action at this time.
0 commit comments