nblast_funcs
navis.nbl.nblast_funcs.NBlaster
#
Implements version 2 of the NBLAST algorithm.
Please note that some properties are computed on initialization and changing parameters (e.g. use_alpha
) at a later stage will mess things up!
PARAMETER | DESCRIPTION |
---|---|
use_alpha |
TYPE: |
normalized |
TYPE: |
smat |
TYPE: |
smat_kwargs |
DEFAULT: |
limit_dist |
TYPE: |
progress |
TYPE: |
Source code in navis/nbl/nblast_funcs.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
__init__
#
Initialize class.
Source code in navis/nbl/nblast_funcs.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
append
#
Append dotprops.
Returns the numerical index appended dotprops. If dotprops is a (possibly nested) sequence of dotprops, return a (possibly nested) list of indices.
Note that self_hit
is ignored (and hence calculated from scratch) when dotprops
is a nested list of dotprops.
Source code in navis/nbl/nblast_funcs.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
calc_self_hit
#
Non-normalized value for self hit.
Source code in navis/nbl/nblast_funcs.py
168 169 170 171 172 173 174 175 176 |
|
single_query_target
#
Query single target against single target.
Source code in navis/nbl/nblast_funcs.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
navis.nbl.nblast_funcs.align_dtypes
#
Align data types of dotprops.
PARAMETER | DESCRIPTION |
---|---|
*x | TYPE: |
downcast |
TYPE: |
inplace |
TYPE: |
RETURNS | DESCRIPTION |
---|---|
*x | Input data with aligned dtypes. |
Source code in navis/nbl/nblast_funcs.py
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 |
|
navis.nbl.nblast_funcs.check_microns
#
Check if neuron data is in microns.
Returns either [True, None (=unclear), False]
Source code in navis/nbl/nblast_funcs.py
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 |
|
navis.nbl.nblast_funcs.check_pykdtree_flag
#
Check if pykdtree is used and if the OMP_NUM_THREADS flag is set.
The issue is that on Linux pykdtree uses threads by default which causes issues when we're also using multiple cores (= multiple layers of concurrency).
Source code in navis/nbl/nblast_funcs.py
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 |
|
navis.nbl.nblast_funcs.demote_types
#
Determine the lower of two dtypes.
Source code in navis/nbl/nblast_funcs.py
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 |
|
navis.nbl.nblast_funcs.eval_limit_dist
#
Evaluate limit_dist
parameter.
Source code in navis/nbl/nblast_funcs.py
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 |
|
navis.nbl.nblast_funcs.find_batch_partition
#
Find partitions such that each batch takes about T
seconds.
PARAMETER | DESCRIPTION |
---|---|
q |
|
T |
TYPE: |
n_cores |
TYPE: |
RETURNS | DESCRIPTION |
---|---|
(n_rows, n_cols) | |
Source code in navis/nbl/nblast_funcs.py
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
|
navis.nbl.nblast_funcs.force_dotprops
#
Force data into Dotprops.
Source code in navis/nbl/nblast_funcs.py
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 |
|
navis.nbl.nblast_funcs.get_dtypes
#
Collect data types of dotprops points.
Source code in navis/nbl/nblast_funcs.py
1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 |
|
navis.nbl.nblast_funcs.lowest_type
#
Find the lowest data type.
Source code in navis/nbl/nblast_funcs.py
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 |
|
navis.nbl.nblast_funcs.sim_to_dist
#
Convert similarity scores to distances.
PARAMETER | DESCRIPTION |
---|---|
x |
TYPE: |
RETURNS | DESCRIPTION |
---|---|
distances | |
Source code in navis/nbl/nblast_funcs.py
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 |
|
navis.nbl.nblast_funcs.smat_fcwb
#
Source code in navis/nbl/smat.py
1050 1051 1052 |
|
navis.nbl.nblast_funcs.test_single_query_time
#
Test average time of a single NBLAST query.
Source code in navis/nbl/nblast_funcs.py
1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
|