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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oncoplot_extractor-1.0.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file oncoplot_extractor-1.0.5.tar.gz.

File metadata

  • Download URL: oncoplot_extractor-1.0.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for oncoplot_extractor-1.0.5.tar.gz
Algorithm Hash digest
SHA256 958ee9a3a587ffd5f02402acafad12779020e32c90b19f6dffef2823afad794d
MD5 f10db797b1b810e101b4025c8f733fe4
BLAKE2b-256 98739518218f5d6e3b411e55eaf983e8f42d78c702ff8b9934132257dd76b881

See more details on using hashes here.

File details

Details for the file oncoplot_extractor-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for oncoplot_extractor-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 df8c75c3577dd97ae64274ae56b61870f67f657c7cca64e9eca1a4a6cbe7e944
MD5 b119539b4ddd07cd404cd1cfa2c5e4be
BLAKE2b-256 89832374c17cb41f460d8251f057b33a3cce9d150c9d352c4bf0d23fc8d2af1c

See more details on using hashes here.

Supported by

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