ChromosomeIdeogram
A python package for drawing genome-wide data on ideograms.
Install
pip install chromosome-ideogram --upgrade
Usage example
import matplotlib.pyplot as plt
from matplotlib import gridspec
from chromosome_ideogram import ChromosomeIdeogram
plt.rcParams['font.size'] = 12
plt.rcParams['pdf.fonttype'] = 42
fig = plt.figure(figsize=(18, 15))
gs = gridspec.GridSpec(nrows=10, ncols=4)
axes1 = fig.add_subplot(gs[:8, :])
axes2 = fig.add_subplot(gs[8:, :3]) # Used to display the detailed karyotype of a certain chromosome (such as chromosome 14)
ci1 = ChromosomeIdeogram(
karyotype='example/karyotype.xls',
radius=0.4, # Radius of chromosome
space=4 # Chromosome center coordinate interval (radius x space)
)
ci1.draw_chromh(axes=axes1, centromere_angle=60, facecolor='lightgrey', edgecolor=None, linewidth=0)
ci1.annotations(axes=axes1, annotations='example/satellite_DNA.bed', height=None)
# Create a second karyotype diagram object (containing only chromosome 14)
ci2 = ChromosomeIdeogram(
karyotype='example/Chr14_karyotype.xls',
radius=0.4,
space=4
)
ci2.draw_chromh(axes=axes2, centromere_angle=60, facecolor='white', edgecolor='#4d4d4d', linewidth=1)
ci2.annotations(axes=axes2, annotations='example/Chr14_satellite_DNA.bed', height=None)
ci2.draw_synteny(axes=axes2, synteny_file='example/Chr14_SV.bed') # show synteny
axes1.legend(handles=ci1.handles, loc=(0.85, 0.85)) # Set axes1 legend
axes2.legend(handles=ci2.handles, loc=(1.05, 0.3), ncol=2) # You can also set axes2 legend
plt.subplots_adjust(hspace=6) # Adjust the vertical distance between the two subgraphs
plt.savefig('example/satellite_DNA.pdf', bbox_inches='tight')
plt.savefig('example/satellite_DNA.png', bbox_inches='tight')
Metadata
Release files for chromosome-ideogram 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chromosome_ideogram-0.0.5.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chromosome_ideogram-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / chromosome_ideogram-0.0.5.tar.gz
| Download URL | chromosome_ideogram-0.0.5.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48deef6dd599f9eed19386607a054b89e89fd7826c3bf526d758377338ff7d1d
|
|
BLAKE2b-256 checksum How to use checksums |
dae4d36ae2421b7d21007a233bd0ba5c1e9e5f4a4e301290500ea31a6d9140ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|
Release files / chromosome_ideogram-0.0.5-py3-none-any.whl
| Download URL | chromosome_ideogram-0.0.5-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a501515ace18729e23dc1249479b61e3627a064ebd5726bd8c2b9b373655a3a3
|
|
BLAKE2b-256 checksum How to use checksums |
ba0587f70ee5e266d3885da0ac9b226d4f07562595d4ec4cb87f55c918354bca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|