Draw an ideogram of either HG38 or CHM13 contigs in a matplotlib axes object.
Project description
pyryotype
Table of Contents
Installation
pip install ideogram
Example usage
from pyryotype import GENOME, plot_ideogram
from matplotlib import pyplot as plt
fig, axes = plt.subplots(
ncols=1,
nrows=22,
figsize=(11, 11),
facecolor="white",
)
genome = GENOME.CHM13
for ax, contig_name in zip(axes, range(1, 23)):
chromosome = f"chr{contig_name}"
plot_ideogram(ax, target=chromosome, genome=genome)
fig.savefig("ideogram.png", dpi=300)
Will output:
Coverage plotting is designed to be used with the output of Mosdepth. The following example uses the output of mosdepth
to plot the coverage of the first 10Mb of chromosome 1 of the CHM13 genome.
from pyryotype import GENOME, plot_coverage
from matplotlib import pyplot as plt
fig, ax = plt.subplots(
figsize=(11, 2),
facecolor="white",
)
plot_coverage(
ax,
"HG01280.regions.bed.gz",
target="chr1",
start=0,
end=10000000,
)
fig.savefig("coverage.png", dpi=300)
License
pyryotype
is distributed under the terms of the MIT license.
Cytoband data
- HG38 - Nushell, will have to be adapted for bash
curl -L "https://hgdownload.cse.ucsc.edu/goldenpath/hg38/database/cytoBand.txt.gz" | gzip -d - | rg -Ne "^chr\\d+\t" | save cytoBand_HG38.tsv
- CHM13 - bash yay
curl -L http://t2t.gi.ucsc.edu/chm13/hub/t2t-chm13-v2.0/download/chm13v2.0_cytobands_allchrs.bed.gz | gzip -d - > cytobands_chm13.bed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyryotype-0.0.3.tar.gz
(479.6 kB
view hashes)
Built Distribution
pyryotype-0.0.3-py3-none-any.whl
(25.8 kB
view hashes)
Close
Hashes for pyryotype-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73346a4aa596ba428c1f16d741589caf9879031ee71d50e044cc00bdf99e6630 |
|
MD5 | a508f23a096aab50a95beac7e637d4e5 |
|
BLAKE2b-256 | 483bd0da3bdd2ca6c4343db21d927ddc79a92949e4ab5d5cc5478e5d13bc0967 |