Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Andrew Stirn
commited on
Commit
·
73c24bb
1
Parent(s):
d41b7db
rounding error
Browse files
tiger.py
CHANGED
|
@@ -102,7 +102,7 @@ def find_off_targets(guides, batch_size=1000):
|
|
| 102 |
# find and log off-targets
|
| 103 |
transcripts = one_hot_encode_sequence(df_batch['seq'].values.tolist(), add_context_padding=False)
|
| 104 |
num_mismatches = GUIDE_LEN - tf.nn.conv1d(transcripts, guide_filter, stride=1, padding='SAME')
|
| 105 |
-
loc_off_targets = tf.where(num_mismatches <= NUM_MISMATCHES).numpy()
|
| 106 |
df_off_targets = pd.concat([df_off_targets, pd.DataFrame({
|
| 107 |
'Guide': np.array(guides)[loc_off_targets[:, 2]],
|
| 108 |
'Isoform': df_batch.index.values[loc_off_targets[:, 0]],
|
|
|
|
| 102 |
# find and log off-targets
|
| 103 |
transcripts = one_hot_encode_sequence(df_batch['seq'].values.tolist(), add_context_padding=False)
|
| 104 |
num_mismatches = GUIDE_LEN - tf.nn.conv1d(transcripts, guide_filter, stride=1, padding='SAME')
|
| 105 |
+
loc_off_targets = tf.where(tf.round(num_mismatches) <= NUM_MISMATCHES).numpy()
|
| 106 |
df_off_targets = pd.concat([df_off_targets, pd.DataFrame({
|
| 107 |
'Guide': np.array(guides)[loc_off_targets[:, 2]],
|
| 108 |
'Isoform': df_batch.index.values[loc_off_targets[:, 0]],
|