Skip to main content

A python package for circDraw visualization

Project description

circDraw

A python package for circDraw visualization

Usage

from circDraw import circDraw

 # initiate a circDraw instance
cd = circDraw()

# set color of circ_on_chr (optional)
cd.set_palette(["#5CA0F2", "#FF881D", '#e30067', '#924900','#ab9c00','#ccd0d2', '#075800', '#5e0094',])

# set color of modifications (optional)
mod_palette = {'m6a': '#E98B2A',
               'm5c': '#E16B8C',
               'm1a': '#64363C',
               'pu': '#ffa12c',
               '2ome': '#1a6f00',
               'mre': '#6D2E5B',
               'rbp': "#2B5F75",
               'orf': '#516E41'}
cd.set_mod_palette(mod_palette)

# draw backsplicing site on chromosome region
cd.circ_on_chr('Your file')

# draw modifications on circRNA
cd.mod_on_circ('Your file')

API

#####circ_on_chr

circDraw.circ_on_chr(file, title='circDraw', dpi=300, save='png', show=True, size=(10, 5))
  • File:

    • Only supported 'csv'

    • Start End Type Name Color (Optional)
    • Start < End

    • Type: circ, exon, intron, gene

    • Color: RGB, RGBA, hex, or supported color names.

  • Title: The title of the plot

  • Save: file format you wish to save as, PNG, PDF, JPEG, etc.

  • Show: Bool, wheather to show the plot after rendering.

  • Size: (Length, Width) the size of the plot.

#####mod_on_circ

circDraw.mod_on_circ(self, file, dpi=100, save='png', show=True, size=(7, 7), sep_mod=False)
  • File:

    • Only supported 'csv'

    • Start End Type Name Color (Optional)
    • Start < End

    • Type: circ, exon, intron, and modifications type

      • Modifications type: m6A, m1A, m5C, pU, 2OMe, MRE, RBP, ORF
    • Color: RGB, RGBA, hex, or supported color names.

  • Save: file format you wish to save as, PNG, PDF, JPEG, etc.

  • Show: Bool, wheather to show the plot after rendering.

  • Size: (Length, Width) the size of the plot.

  • sep_mod: Bool, prevent the modifications from overlapping if set True.

set_palette
circDraw.set_palette(palette)

A list of colors, the length of the list must bigger than 5.

set_mod_palette
circDraw.set_mod_palette(palette)

A dictionary of colors match with the modification. You can change any one of the modification colors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circDraw-0.0.1.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

circDraw-0.0.1-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page