PCircos
python plotly Circos
Install / Use
/learn @CJinny/PCircosREADME
PCircos
PCircos is a python package based on plotly which helps generating Circos plot.

Click here for a tutorial on google colab
Click here for a live web app on heroku
Dependencies
The following are needed for PCircos to work:
To install dependencies
$ pip install plotly
$ pip install colorlover
$ pip install dash==0.39.0
$ pip install dash-daq==0.1.0
$ pip install dash_colorscales
$ pip install -i https://test.pypi.org/simple/ colorpicker-box
or if you don't have root privilege
$ sudo pip install plotly
$ sudo pip install colorlover
Installation
git clone https://github.com/CJinnny/PCircos.git
Usage
This package allows you to generate Circos plot in html format with customizable hover text. All you need to do is to write your custom json configuration file. To run an example, try:
python PCircos.py demo_data/demo_params.json
How to write your own json configuration file
-
General
informtion about figure width, height, title etc. You dont' have to include them in your json file and default information will be filled.
-
Category
information about ideogram (chromosome list and size) and cytoband (karyotype), ideogram annotation, ticks.
-
ideogram
contains information about chromosome size, majortick, minortick, ticklabel. The only information you need to write is the file dictionary of chromosome size data. If you use a txt file, you should do
"sep": "\t", if you use csv file, you should do"sep": ",", it is advised that you keep the first row as header. If you want to customize chromosome labels, do"customlabel": "True"and be sure to include custom labels are in the 3rd column in your chromosome size file. If you want to customize chromosome colors, do"customcolor": "True"and be sure to include custom color are in the 4th column in your chromosome size file. If you want to make ideogram patches thinner or thicker, change the radius parameters. If you want to make ideogram patches more transparent or opaque, change the opacity parameters in layout. -
cytoband
contains information about karyotype, please be sure to turn off ideogram fillcolor by doing
"showfillcolor": "False"if you want to show the karyotype color instead
-
-
histogram
contains information about histogram, you can plot one, or multiple histogram (use square bracket). If you want histogram colors to follow that of the ideogram, do "colorcolumn": "ideogram", or if you want single color , do "colorcolumn": "None" and specify the fillcolor in layout, or if you want custom color, do "colorcolumn": 5 or whichever colum contains your custom color information. If you want to make your histogram pointing outward, make sure to set "R0" < "R1" and vice versa.
After creating your config.json file, type the following in the command line
python PCircos.py /path_to_your_config.json/config.json
Note that path_to_your_custom.json should be changed to where your config.json file is. An html page would pop up on your browser
How to run the dash app:
python dashapp.py=> open a browser and paste http://localhost:8080- Use docker (suppose you wanna use PORT=8000) => http://localhost:8000:
docker pull jinny92/dashcircos-docker:1.0 docker run -it --rm -p 8000:8050 jinny92/dashcircos-docker:1.0
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
