bmtool 0.5.3__py3-none-any.whl → 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bmtool/util/util.py CHANGED
@@ -611,7 +611,11 @@ def connection_totals(config=None,nodes=None,edges=None,sources=[],targets=[],si
611
611
 
612
612
  total = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
613
613
  if include_gap == False:
614
- total = total[total['is_gap_junction'] != True]
614
+ try:
615
+ cons = cons[cons['is_gap_junction'] != True]
616
+ except:
617
+ raise Exception("no gap junctions found to drop from connections")
618
+
615
619
  total = total.count()
616
620
  total = total.source_node_id # may not be the best way to pick
617
621
  return total
@@ -632,7 +636,11 @@ def percent_connections(config=None,nodes=None,edges=None,sources=[],targets=[],
632
636
 
633
637
  cons = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
634
638
  if include_gap == False:
635
- cons = cons[cons['is_gap_junction'] != True]
639
+ try:
640
+ cons = cons[cons['is_gap_junction'] != True]
641
+ except:
642
+ raise Exception("no gap junctions found to drop from connections")
643
+
636
644
  total_cons = cons.count().source_node_id
637
645
  # to determine reciprocal connectivity
638
646
  # create a copy and flip source/dest
@@ -685,7 +693,10 @@ def connection_divergence(config=None,nodes=None,edges=None,sources=[],targets=[
685
693
 
686
694
  cons = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
687
695
  if include_gap == False:
688
- cons = cons[cons['is_gap_junction'] != True]
696
+ try:
697
+ cons = cons[cons['is_gap_junction'] != True]
698
+ except:
699
+ raise Exception("no gap junctions found to drop from connections")
689
700
 
690
701
  if convergence:
691
702
  if method == 'min':
@@ -739,7 +750,10 @@ def gap_junction_connections(config=None,nodes=None,edges=None,sources=[],target
739
750
  cons = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
740
751
  #print(cons)
741
752
 
742
- cons = cons[cons['is_gap_junction'] == True] #only gap_junctions
753
+ try:
754
+ cons = cons[cons['is_gap_junction'] != True]
755
+ except:
756
+ raise Exception("no gap junctions found to drop from connections")
743
757
  mean = cons['target_node_id'].value_counts().mean()
744
758
  std = cons['target_node_id'].value_counts().std()
745
759
  return (round(mean,2)), (round(std,2))
@@ -755,7 +769,11 @@ def gap_junction_connections(config=None,nodes=None,edges=None,sources=[],target
755
769
 
756
770
  cons = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
757
771
  #add functionality that shows only the one's with gap_junctions
758
- cons = cons[cons['is_gap_junction'] == True]
772
+ try:
773
+ cons = cons[cons['is_gap_junction'] != True]
774
+ except:
775
+ raise Exception("no gap junctions found to drop from connections")
776
+
759
777
  total_cons = cons.count().source_node_id
760
778
 
761
779
  num_sources = s_list[source_id_type].value_counts().sort_index().loc[source_id]
@@ -775,10 +793,6 @@ def gap_junction_percent_connections(config=None,nodes=None,edges=None,sources=[
775
793
  import pandas as pd
776
794
 
777
795
 
778
-
779
-
780
-
781
-
782
796
 
783
797
  def connection_probabilities(config=None,nodes=None,edges=None,sources=[],
784
798
  targets=[],sids=[],tids=[],prepend_pop=True,dist_X=True,dist_Y=True,dist_Z=True,num_bins=10,include_gap=True):
@@ -857,7 +871,10 @@ def connection_probabilities(config=None,nodes=None,edges=None,sources=[],
857
871
 
858
872
  relevant_edges = edges[(edges[source_id_type] == source_id) & (edges[target_id_type]==target_id)]
859
873
  if include_gap == False:
860
- relevant_edges = relevant_edges[relevant_edges['is_gap_junction'] != True]
874
+ try:
875
+ relevant_edges = relevant_edges[relevant_edges['is_gap_junction'] != True]
876
+ except:
877
+ raise Exception("no gap junctions found to drop from connections")
861
878
  connected_distances = eudist(relevant_edges,dist_X,dist_Y,dist_Z).values.tolist()
862
879
  if len(connected_distances)>0:
863
880
  if connected_distances[0]==0:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bmtool
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: BMTool
5
5
  Home-page: https://github.com/cyneuro/bmtool
6
6
  Download-URL:
@@ -28,7 +28,8 @@ Requires-Dist: numpy
28
28
  Requires-Dist: pandas
29
29
  Requires-Dist: questionary
30
30
  Requires-Dist: pynmodlt
31
- Requires-Dist: plotly
31
+ Requires-Dist: xarray
32
+ Requires-Dist: fooof
32
33
 
33
34
  # bmtool
34
35
  A collection of modules to make developing [Neuron](https://www.neuron.yale.edu/neuron/) and [BMTK](https://alleninstitute.github.io/bmtk/) models easier.
@@ -1,22 +1,24 @@
1
+ bmtool/SLURM.py,sha256=8XbzNLIQfE_lNRd_Z8ya2PEDT4TqhVnDZkil-ckLUCU,11508
1
2
  bmtool/__init__.py,sha256=ZStTNkAJHJxG7Pwiy5UgCzC4KlhMS5pUNPtUJZVwL_Y,136
2
3
  bmtool/__main__.py,sha256=TmFkmDxjZ6250nYD4cgGhn-tbJeEm0u-EMz2ajAN9vE,650
3
- bmtool/bmplot.py,sha256=MiUJ4KoN2v285en0aBdrTqrWIaZJEnb2DPzS3kYaCdM,39680
4
- bmtool/connectors.py,sha256=t8L25eb19vZgCduWW8fJFSrEyUQ4_zGNaENMomw0d0Q,66376
5
- bmtool/graphs.py,sha256=j6xEXSFCoeh3mdoyXAKEjWRk8oFbNAesAbddmzAMIs0,5752
4
+ bmtool/bmplot.py,sha256=p39s3SwXvG1D7ujYwY5zCmeUql2epnzLKqXZMBn_vjo,43511
5
+ bmtool/connectors.py,sha256=RPQGFfefKxJxu5sM6uge-RKHvLAE96EVFh8xXj8HR0A,71560
6
+ bmtool/graphs.py,sha256=K8BiughRUeXFVvAgo8UzrwpSClIVg7UfmIcvtEsEsk0,6020
6
7
  bmtool/manage.py,sha256=_lCU0qBQZ4jSxjzAJUd09JEetb--cud7KZgxQFbLGSY,657
7
8
  bmtool/plot_commands.py,sha256=Tqujyf0c0u8olhiHOMwgUSJXIIE1hgjv6otb25G9cA0,12298
8
- bmtool/singlecell.py,sha256=2kepmupsUs_QVPHmH9GURvmUyYCNBSvF1G1_6lFjDyM,24965
9
+ bmtool/singlecell.py,sha256=Q4poQvG9fw0jlyMmHFzbRPrpcEkPz5MKS8Guuo73Bzs,26849
10
+ bmtool/synapses.py,sha256=FD_WKXd6rXEZGVbcaU6k4h9ufrjt742V6sWOK5Io32Q,26782
9
11
  bmtool/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
12
  bmtool/debug/commands.py,sha256=AwtcR7BUUheM0NxvU1Nu234zCdpobhJv5noX8x5K2vY,583
11
13
  bmtool/debug/debug.py,sha256=xqnkzLiH3s-tS26Y5lZZL62qR2evJdi46Gud-HzxEN4,207
12
14
  bmtool/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
15
  bmtool/util/commands.py,sha256=zJF-fiLk0b8LyzHDfvewUyS7iumOxVnj33IkJDzux4M,64396
14
- bmtool/util/util.py,sha256=J9fA73DnPF8Kp8CWONDFCuNza9e_3PNTd0jXuVb5iFs,56060
16
+ bmtool/util/util.py,sha256=24E5rUoDU86nqypDF4uZJkuJKO1BrwrQE8lZzAxu1kw,56770
15
17
  bmtool/util/neuron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
18
  bmtool/util/neuron/celltuner.py,sha256=xSRpRN6DhPFz4q5buq_W8UmsD7BbUrkzYBEbKVloYss,87194
17
- bmtool-0.5.3.dist-info/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
18
- bmtool-0.5.3.dist-info/METADATA,sha256=zEDBcXW6HyIngsb6RXAg17wHiDJ1-tM4PlJk7M21H74,24084
19
- bmtool-0.5.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
20
- bmtool-0.5.3.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
21
- bmtool-0.5.3.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
22
- bmtool-0.5.3.dist-info/RECORD,,
19
+ bmtool-0.5.5.dist-info/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
20
+ bmtool-0.5.5.dist-info/METADATA,sha256=aRwr0X8bt33WJDcPh6Js-YULLKSfTlD_nPsMn1bSZTs,24105
21
+ bmtool-0.5.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
22
+ bmtool-0.5.5.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
23
+ bmtool-0.5.5.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
24
+ bmtool-0.5.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5