Skip to main content

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.

Release files for oncoplot-extractor 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oncoplot-extractor 1.0.5
File Size Uploaded
oncoplot_extractor-1.0.5.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oncoplot-extractor 1.0.5
File Interpreter ABI Platform
oncoplot_extractor-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / oncoplot_extractor-1.0.5.tar.gz

Download URL oncoplot_extractor-1.0.5.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
958ee9a3a587ffd5f02402acafad12779020e32c90b19f6dffef2823afad794d
BLAKE2b-256 checksum
How to use checksums
98739518218f5d6e3b411e55eaf983e8f42d78c702ff8b9934132257dd76b881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / oncoplot_extractor-1.0.5-py3-none-any.whl

Download URL oncoplot_extractor-1.0.5-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df8c75c3577dd97ae64274ae56b61870f67f657c7cca64e9eca1a4a6cbe7e944
BLAKE2b-256 checksum
How to use checksums
89832374c17cb41f460d8251f057b33a3cce9d150c9d352c4bf0d23fc8d2af1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page