Skip to main content

General Toolkit for OncoPlot written in Python

Project description

OncoPlot Extractor

Build status PyPI version

About

OncoPlot Extractor provides python3.x library to read standard oncoplots also known as mutation matrix. This library allows you to export the data extracted as pandas.DataFrame so the data can be forth modified with toolkit offered by pandas. Two main modules that this package contains are OncoPlotExtractor and OncoPlotCreator.

Installation

Please install this library with python pip as

$ pip3 -U install oncoplot-extractor

Documentation

You can find extensive documentation here

Usage

OncoPlot Extractor

from oncoplot_extractor import OncoPlotExtractor

oce = OncoplotExtractor(
    path="path/to/oncoplot.png", # path to oncoplot image
    corners=(0,0,100,100), # corners are optional
    background_color=["#ffffff"] # you can also use oce.get_background_from_pixel()
    )
oce.extract()
oce.export_to_excel("path/to/oncoplot.xlsx")

OncoPlot Creator

import pandas as pd
from oncoplot_extractor import OncoPlotCreator

df = pd.DataFrame(my_data)
opc = OncoPlotCreator(df=my_df, cell_size=60, workbook=wb, offset=10)
opc.gen_base_oncoplot()
opc.save(filename="my_oncoplot.xlsx")

Contribution

This project is very amateur and I hope to help someone who might have ran into problem of getting one image or pdf as oncoplot and needing the actual data. If it helped you or have suggestions, please let me know.

I would really appreciate your contributions and I will get to the PRs as soon as possible.

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

oncoplot_extractor-1.0.5.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

oncoplot_extractor-1.0.5-py3-none-any.whl (6.3 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