kitikiplot 0.2.7__py3-none-any.whl → 0.2.9__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.
@@ -150,6 +150,7 @@ class KitikiCell(ColorConfig):
150
150
 
151
151
  if focus == None:
152
152
  rect_dim= ( dim_x, dim_y )
153
+ print( x, y, dim_x, dim_y )
153
154
 
154
155
  else:
155
156
 
@@ -180,6 +181,18 @@ class KitikiCell(ColorConfig):
180
181
  dim_y= window_gap*(self.rows- x+1)+ cell_width*(self.rows- x+1)
181
182
 
182
183
  rect_dim= (dim_x, dim_y)
184
+
185
+ if focus != None:
186
+
187
+ align_factor= x*self.stride*cell_height
188
+
189
+ min_dim_x= cell_height + align_factor
190
+ max_dim_x= cell_height*(self.cols)+ align_factor
191
+
192
+ if (min_dim_x <= dim_x) and (dim_x <= max_dim_x):
193
+ kitiki_cell_kwargs["alpha"]= 1
194
+ else:
195
+ kitiki_cell_kwargs["alpha"]= focus_alpha
183
196
 
184
197
 
185
198
  # Clean up all local variables for efficient memory management
@@ -246,13 +246,18 @@ class KitikiPlot(KitikiCell):
246
246
  # This allows for plotting only a subset of the data based on the user-defined range
247
247
  window_range= range( window_range[0], window_range[1])
248
248
 
249
+ each_sample= np.concatenate( (data[0], data[1:data.shape[0], (-1)*self.stride:].flatten()) )
250
+
249
251
  if focus != None:
250
- col_range= self.rows + self.window_length - 1
251
- print( "COLUMN Range: ", col_range )
252
+ col_range= (self.rows * self.stride) + self.window_length - self.stride
252
253
  else:
253
254
  col_range= self.cols
254
255
 
255
- each_sample= np.concatenate( (data[0], data[1:data.shape[0], (-1)*self.stride:].flatten()) )
256
+
257
+ print("Total Data: ", each_sample)
258
+ print( "Window Range: ", window_range)
259
+ print( "COlumns Range: ", col_range)
260
+ print( "Each sample length: ", each_sample.shape[0] )
256
261
 
257
262
  # Generate cells for each sample in the specified window range and time frame columns
258
263
  for index in window_range:
@@ -261,8 +266,10 @@ class KitikiPlot(KitikiCell):
261
266
  each_sample= data[ index ]
262
267
 
263
268
  for time_frame in range( col_range ):
269
+
270
+ if type(focus) != bool:
264
271
 
265
- kitiki_cell_kwargs["alpha"]= focus_alpha if focus != None and ( time_frame< focus[0] or time_frame>= focus[1] ) else 1
272
+ kitiki_cell_kwargs["alpha"]= focus_alpha if focus != None and ( time_frame< focus[0] or time_frame>= focus[1] ) else 1
266
273
 
267
274
  # Create each cell using specified parameters and add it to patches list
268
275
  cell_gen= self.create( x= index,
@@ -294,7 +301,9 @@ class KitikiPlot(KitikiCell):
294
301
  # Calculate x and y positions for ticks when not transposed
295
302
  x_positions= [(i+1)*window_gap+(i+1)*cell_width+cell_width/2 for i in range(self.rows)]
296
303
 
297
- y_positions= [(self.rows+ self.cols- self.stride- i)*cell_height+cell_height/2 for i in range(self.stride*self.rows+self.cols)]
304
+ # y_positions= [(self.rows+ self.cols- self.stride- i)*cell_height+cell_height/2 for i in range(self.stride*self.rows+self.cols)]
305
+
306
+ y_positions= [cell_height*(self.cols-i-1)+ self.rows*self.stride*cell_height + cell_height/2 for i in range(col_range)]
298
307
 
299
308
  # Display xticks if 'display_xticks' is True
300
309
  if display_xticks:
@@ -332,9 +341,10 @@ class KitikiPlot(KitikiCell):
332
341
 
333
342
  # Configure default yticks
334
343
  else:
335
-
344
+
345
+ print(y_positions)
336
346
  # Set y-ticks with appropriate labels and rotation
337
- plt.yticks( y_positions, [ytick_prefix+"_"+str(i) for i in range(self.stride*self.rows+self.cols)], rotation= yticks_rotation)
347
+ plt.yticks( y_positions, [ytick_prefix+"_"+str(i) for i in range(col_range)], rotation= yticks_rotation)
338
348
 
339
349
  # Else turn off the yticks
340
350
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kitikiplot
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: A Python library to visualize categorical sliding window data.
5
5
  License: MIT
6
6
  Keywords: sliding window,sequential,time-series,genome,categorical data
@@ -1,12 +1,12 @@
1
1
  kitikiplot/core/__init__.py,sha256=7LpJy1V-PZ-JlfjsnRMjMXxTKaFt0JP0mj-A0SgS-sE,34
2
- kitikiplot/core/kitiki_cell.py,sha256=mzmjUMdLdCzNg-8NYZ9M8sDuITOMdwyZkT4xKD-pQlc,7925
2
+ kitikiplot/core/kitiki_cell.py,sha256=bSAXCHLEQ8-XCln_YIk2EyMwdFpl_N1wUlf1l3-t8Fs,8410
3
3
  kitikiplot/core/kitiki_color_config.py,sha256=yOWnJNoYo1BN7UMGTFgc8zpMljBbNpFDLLq7JZF3ATE,11857
4
- kitikiplot/core/kitikiplot.py,sha256=dkF49TeO9jCQnXEXpjL-la-AvnqvlChVsar3tkZ6yNQ,20822
4
+ kitikiplot/core/kitikiplot.py,sha256=z_ujN0pTurNwaixYBI9GK4z5p89yoF51SxK1ZD9fdYQ,21254
5
5
  kitikiplot/ecology/linear.py,sha256=l1YVn7vcsKU-1g3SZ9kpOhHQiCRqP8U3LrWecy7_KFo,985
6
6
  kitikiplot/genomics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  kitikiplot/genomics/grid.py,sha256=ohg5fBVezzxIOr2TlNPhND4PpBvzVG0eiSklTTbQp5s,1831
8
8
  kitikiplot/genomics/linear.py,sha256=BNO-9xPVq6dsP8KuXx1fJRG_mLUf2orCM3h7etYqhBw,1280
9
- kitikiplot-0.2.7.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
10
- kitikiplot-0.2.7.dist-info/METADATA,sha256=FuExeMvz44Olbk6Oe_-i1GRy3_L94qfNQ3EWGQ02MXs,5445
11
- kitikiplot-0.2.7.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
12
- kitikiplot-0.2.7.dist-info/RECORD,,
9
+ kitikiplot-0.2.9.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
10
+ kitikiplot-0.2.9.dist-info/METADATA,sha256=u2KynFUNCePOPrgzrEyxOosXFDzK316dg2lJrEjJJ94,5445
11
+ kitikiplot-0.2.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
12
+ kitikiplot-0.2.9.dist-info/RECORD,,