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=(10, 12))
gs = gridspec.GridSpec(nrows=10, ncols=1)
axes1 = fig.add_subplot(gs[:8, :])
axes2 = fig.add_subplot(gs[8:, :]) # 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 (it is not recommended to make any changes)
space=4
)
ci1.draw_chromh(axes=axes1, centromere_angle=60, facecolor='lightgrey', edgecolor=None, linewidth=0)
ci1.annotations(axes=axes1, annotations='example/satellite_DNA.bed')
# 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')
ci2.draw_synteny(axes=axes2, synteny_file='example/Chr14_SV.bed') # show synteny
axes1.legend(loc=(0.85, 0.85)) # Set axes1 legend, 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.4
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.4.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chromosome_ideogram-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / chromosome_ideogram-0.0.4.tar.gz
| Download URL | chromosome_ideogram-0.0.4.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4544ddc2f4816714b417e8750dd8ce4618ff01e804d407d66387bb10a4b085d9
|
|
BLAKE2b-256 checksum How to use checksums |
6c4eacf6e453f303efe0cba21c799334d32530a1e993e23a008039292473955a
|
| 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.4-py3-none-any.whl
| Download URL | chromosome_ideogram-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10a98c159eb0174f4ec4b37c0c62c042eb3d9c6a0e75705f1ce81e0e9e393836
|
|
BLAKE2b-256 checksum How to use checksums |
fc132e7c9a2cfe37b878798f779361a11cbb07cb52241802488ea2c3753df87c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|