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
57 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 | |
__init__ #
Initialize class.
Source code in navis/nbl/nblast_funcs.py
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 | |
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
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
calc_self_hit #
Non-normalized value for self hit.
Source code in navis/nbl/nblast_funcs.py
167 168 169 170 171 172 173 174 175 | |
single_query_target #
Query single target against single target.
Source code in navis/nbl/nblast_funcs.py
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 | |
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
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 | |
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
833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 | |
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
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | |
navis.nbl.nblast_funcs.demote_types #
Determine the lower of two dtypes.
Source code in navis/nbl/nblast_funcs.py
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | |
navis.nbl.nblast_funcs.eval_limit_dist #
Evaluate limit_dist parameter.
Source code in navis/nbl/nblast_funcs.py
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | |
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
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | |
navis.nbl.nblast_funcs.force_dotprops #
Force data into Dotprops.
Source code in navis/nbl/nblast_funcs.py
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | |
navis.nbl.nblast_funcs.get_dtypes #
Collect data types of dotprops points.
Source code in navis/nbl/nblast_funcs.py
921 922 923 924 925 926 927 928 929 930 931 | |
navis.nbl.nblast_funcs.lowest_type #
Find the lowest data type.
Source code in navis/nbl/nblast_funcs.py
934 935 936 937 938 939 940 941 942 943 944 945 | |
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
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | |
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
725 726 727 728 729 730 731 732 733 734 735 736 737 | |