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.5.tar.gz
(484.2 kB
view hashes)
Built Distribution
pyryotype-0.0.5-py3-none-any.whl
(30.6 kB
view hashes)
Close
Hashes for pyryotype-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 697573c5394b6323255f42dd45473c9009237adc6eee11f75d21bbdc9b39c7e9 |
|
MD5 | e1a2895de20f37d5c4b0c316d9b4954f |
|
BLAKE2b-256 | 1b5cef0b83f2f4038b43e3f649f224e886ee893802da53918e98d66a90a838ca |