kitikiplot 0.2.1__py3-none-any.whl → 0.2.3__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.
File without changes
@@ -0,0 +1,54 @@
1
+ """
2
+ File Name: linear.py
3
+ Description: This file defines linear genomic plot
4
+ Author: Boddu Sri Pavan
5
+ Date Created: 21-05-2025
6
+ Last Modified: 24-05-2025
7
+ """
8
+
9
+ from kitikiplot.core import KitikiPlot
10
+
11
+ import pandas as pd
12
+
13
+ def plot( nucleotide_sequence: str, window_length= 30, cell_width= 2 ):
14
+ """
15
+ Generates linear genomic plot for short genome sequences.
16
+
17
+ Parameters
18
+ ----------
19
+ nucleotide_sequence : str
20
+ - Sequence of 'A', 'T', 'G', and 'C'.
21
+ """
22
+
23
+ # Preprocess input genomic sequence
24
+ nucleotide_sequence=nucleotide_sequence.upper()
25
+
26
+ residual= len(nucleotide_sequence)%window_length
27
+
28
+ l= []
29
+ for index in range( len(nucleotide_sequence)// window_length):
30
+
31
+ l.append( list(nucleotide_sequence[index*window_length: (index+1)*window_length]) )
32
+
33
+ if residual > 0:
34
+ l.append( list(nucleotide_sequence[(-1)*residual:]) + ["No_Data"]* (window_length- residual) )
35
+
36
+ grid_df= pd.DataFrame(l)
37
+
38
+ ktk= KitikiPlot( data= grid_df, stride= 0 )
39
+
40
+ ktk.plot(
41
+ figsize= (grid_df.shape[1]//3, grid_df.shape[0]//3),
42
+ cell_width= cell_width,
43
+ cmap= {'A': '#007FFF', 'T': "#fffc00", "G": "#00ff00", "C": "#960018"},
44
+ transpose= True,
45
+ window_gap= 0,
46
+ xlabel= "Nucleotides",
47
+ ylabel= "Nucleotide Chunk",
48
+ display_xticks= False,
49
+ display_yticks= False,
50
+ title= "Grid Plot: Nucleotide Sequence Visualization",
51
+ display_legend= True,
52
+ legend_kwargs= {"bbox_to_anchor": (1.01, 1), "loc":'upper left', "borderaxespad": 0.},
53
+ kitiki_cell_kwargs= {"linewidth": 0.5}
54
+ )
@@ -0,0 +1,39 @@
1
+ """
2
+ File Name: linear.py
3
+ Description: This file defines linear genomic plot
4
+ Author: Boddu Sri Pavan
5
+ Date Created: 21-05-2025
6
+ Last Modified: 24-05-2025
7
+ """
8
+
9
+ from kitikiplot.core import KitikiPlot
10
+
11
+ def plot( nucleotide_sequence: str )-> bool:
12
+ """
13
+ Generates linear genomic plot for short genome sequences.
14
+
15
+ Parameters
16
+ ----------
17
+ nucleotide_sequence : str
18
+ - Sequence of 'A', 'T', 'G', and 'C'.
19
+ """
20
+
21
+ # Preprocess input genomic sequence
22
+ nucleotide_sequence=nucleotide_sequence.upper()
23
+
24
+ ktk= KitikiPlot( data= nucleotide_sequence, stride= 1, window_length= len(nucleotide_sequence) )
25
+
26
+ ktk.plot(
27
+ figsize= (20, 1),
28
+ cell_width= 2,
29
+ cmap= {'A': '#007FFF', 'T': "#fffc00", "G": "#00ff00", "C": "#960018"},
30
+ transpose= True,
31
+ xlabel= "Nucleotides",
32
+ ylabel= "Window",
33
+ display_yticks= False,
34
+ xtick_prefix= "Nucleotide",
35
+ xticks_rotation= 90,
36
+ title= "Linear Plot: Nucleotide Sequence Visualization",
37
+ display_legend= True,
38
+ legend_kwargs= {"bbox_to_anchor": (1.01, 1), "loc":'upper left', "borderaxespad": 0.}
39
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kitikiplot
3
- Version: 0.2.1
3
+ Version: 0.2.3
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
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Topic :: Scientific/Engineering :: Visualization
17
+ Requires-Dist: biopython (>=1.85)
17
18
  Requires-Dist: matplotlib (>=3.10.1)
18
19
  Requires-Dist: numpy (>=2.2.5)
19
20
  Requires-Dist: pandas (>=2.2.3)
@@ -82,11 +83,11 @@ ktk.plot( display_legend= True ) # Display the legend
82
83
  Check out the complete <b>guide of customization</b> [here](https://github.com/BodduSriPavan-111/kitikiplot/blob/main/examples/Usage_Guide.ipynb).
83
84
 
84
85
  ## To-do
86
+ 🟢 Domain-specific modules (In Progress) </br>
85
87
  🟢 Streamlit Demo Interface (In Progress) </br>
86
88
  🟢 Website for documentation (In Progress)
87
89
  - [ ] Tooltip
88
90
  - [ ] Interactive Plot
89
- - [ ] Domain-specific modules
90
91
 
91
92
  Please refer <a href="https://github.com/BodduSriPavan-111/kitikiplot/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a> for <b>contributions</b> to kitikiplot.
92
93
 
@@ -0,0 +1,11 @@
1
+ kitikiplot/core/__init__.py,sha256=7LpJy1V-PZ-JlfjsnRMjMXxTKaFt0JP0mj-A0SgS-sE,34
2
+ kitikiplot/core/kitiki_cell.py,sha256=9kn33x8-4Zp_fVdmp5NK-V7fm3hDXZOxwCNO3uDZqIo,7016
3
+ kitikiplot/core/kitiki_color_config.py,sha256=34KEE1CQJeMnB6gA-FgTHiIEP7rF1_17xv2XOakh1ds,11969
4
+ kitikiplot/core/kitikiplot.py,sha256=uH5eQnWxswQsDC1b77cu5U_2m3ODfKRGqCxcredRagQ,19746
5
+ kitikiplot/genomics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ kitikiplot/genomics/grid.py,sha256=Dr9DyDG26WX-iAQVdWaxx7aUwXiXWchZ-48_xUuSnvA,1766
7
+ kitikiplot/genomics/linear.py,sha256=BNO-9xPVq6dsP8KuXx1fJRG_mLUf2orCM3h7etYqhBw,1280
8
+ kitikiplot-0.2.3.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
9
+ kitikiplot-0.2.3.dist-info/METADATA,sha256=oT1UWHHV3-T7OdsIMik4i9jt5qmMl1rLCC9CZm-YppQ,5322
10
+ kitikiplot-0.2.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
11
+ kitikiplot-0.2.3.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- kitikiplot/core/__init__.py,sha256=7LpJy1V-PZ-JlfjsnRMjMXxTKaFt0JP0mj-A0SgS-sE,34
2
- kitikiplot/core/kitiki_cell.py,sha256=9kn33x8-4Zp_fVdmp5NK-V7fm3hDXZOxwCNO3uDZqIo,7016
3
- kitikiplot/core/kitiki_color_config.py,sha256=34KEE1CQJeMnB6gA-FgTHiIEP7rF1_17xv2XOakh1ds,11969
4
- kitikiplot/core/kitikiplot.py,sha256=uH5eQnWxswQsDC1b77cu5U_2m3ODfKRGqCxcredRagQ,19746
5
- kitikiplot-0.2.1.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
6
- kitikiplot-0.2.1.dist-info/METADATA,sha256=D0lqV5bFRrXm_r7uXTHODR0thrXPKPMDCkWuwyMbof8,5269
7
- kitikiplot-0.2.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
8
- kitikiplot-0.2.1.dist-info/RECORD,,