import pandas as pd from matplotlib.collections import BrokenBarHCollection from coolbox.utilities import ( get_logger, GenomeRange, file_to_intervaltree, hex2rgb, to_gr, ) from .base import Track log = get_logger(__name__) class Ideogram(Track): """ The chromosome ideograme track. Parameters ---------- file_ : str Path to chromosome ideogram txt file, ideogram file is download from the UCSC Table Browser CytoBandIdeo table (in "all table" group). see: http://genome.ucsc.edu/cgi-bin/hgTables?hgta_group=allTables&hgta_table=cytoBandIdeo color_scheme : dict, optional Color scheme of ideogram, default: Ideogram.DEFAULT_COLOR_SCHEME show_name : bool, optional Show band name or not. default True.
import os import os.path as osp import subprocess as subp from typing import Tuple import runpy import fire import nbformat as nbf import coolbox from coolbox.utilities import get_logger from coolbox.utilities.genome import GenomeRange from coolbox.api import * log = get_logger("CoolBox CLI") def get_element_type_by_str(elem_str): import coolbox.api try: elem_tp = eval("coolbox.api." + elem_str) except NameError: log.error( f"No element type name as {elem_tp}, all elements type see: " + "https://gangcaolab.github.io/CoolBox/api.html") return elem_tp def get_compose_code(elem_str, args, kwargs): compose_code = elem_str + "(" compose_code += ", ".join([repr(arg) for arg in args] +