kitikiplot 0.2.1__tar.gz → 0.2.3__tar.gz
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.
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/PKG-INFO +3 -2
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/README.md +1 -1
- kitikiplot-0.2.3/kitikiplot/genomics/__init__.py +0 -0
- kitikiplot-0.2.3/kitikiplot/genomics/grid.py +54 -0
- kitikiplot-0.2.3/kitikiplot/genomics/linear.py +39 -0
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/pyproject.toml +2 -1
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/LICENSE +0 -0
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/kitikiplot/core/__init__.py +0 -0
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/kitikiplot/core/kitiki_cell.py +0 -0
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/kitikiplot/core/kitiki_color_config.py +0 -0
- {kitikiplot-0.2.1 → kitikiplot-0.2.3}/kitikiplot/core/kitikiplot.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: kitikiplot
|
3
|
-
Version: 0.2.
|
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
|
|
@@ -57,11 +57,11 @@ ktk.plot( display_legend= True ) # Display the legend
|
|
57
57
|
Check out the complete <b>guide of customization</b> [here](https://github.com/BodduSriPavan-111/kitikiplot/blob/main/examples/Usage_Guide.ipynb).
|
58
58
|
|
59
59
|
## To-do
|
60
|
+
🟢 Domain-specific modules (In Progress) </br>
|
60
61
|
🟢 Streamlit Demo Interface (In Progress) </br>
|
61
62
|
🟢 Website for documentation (In Progress)
|
62
63
|
- [ ] Tooltip
|
63
64
|
- [ ] Interactive Plot
|
64
|
-
- [ ] Domain-specific modules
|
65
65
|
|
66
66
|
Please refer <a href="https://github.com/BodduSriPavan-111/kitikiplot/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a> for <b>contributions</b> to kitikiplot.
|
67
67
|
|
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
|
[tool.poetry]
|
2
2
|
name = "kitikiplot"
|
3
|
-
version = "0.2.
|
3
|
+
version = "0.2.3"
|
4
4
|
description = "A Python library to visualize categorical sliding window data."
|
5
5
|
authors = ["Boddu Sri Pavan <boddusripavan111@gmail.com>"]
|
6
6
|
readme = "README.md"
|
@@ -28,3 +28,4 @@ python = ">=3.11" # You may want to adjust this minimum version requirement
|
|
28
28
|
numpy = ">=2.2.5"
|
29
29
|
pandas = ">=2.2.3"
|
30
30
|
matplotlib = ">=3.10.1"
|
31
|
+
biopython = ">=1.85"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|