Send mutation signature data to ExploSig
Project description
ExploSig Connect
Helpers for sending data from a Python environment to ExploSig (via ExploSig Server) for web-based interactive visualization.
Installation
pip install explosig-connect
Example Usage - Connecting to an existing session
>>> from explosig_connect import connect
>>> # Connect using a session ID supplied by ExploSig.
>>> session_id = 'af6242f3'
>>> conn = connect(session_id)
>>> # Obtain the SBS mutation counts matrix associated with the session.
>>> sbs_counts_df = conn.get_counts_by_category('SBS')
>>> # You run some custom code to derive better signature exposures.
>>> exposures_df = my_exposures_computation_method(sbs_counts_df)
>>> # Send the new exposures back to ExploSig for visualization.
>>> conn.send_exposures('SBS', exposures_df)
Example Usage - Starting a new session
>>> from explosig_connect import connect
>>> # Start a new 'empty' session with no samples, signatures, etc. selected.
>>> # This will attempt to open ExploSig in a new browser tab that starts the session.
>>> conn = connect()
>>> # Send an SBS mutation counts matrix to visualize.
>>> conn.send_counts('SBS', my_sbs_counts_df)
>>> # Send an exposures matrix to visualize.
>>> conn.send_exposures('SBS', my_sbs_exposures_df)
>>> # Send a signatures matrix to visualize.
>>> conn.send_signatures('SBS', my_sbs_signatures_df)
Development
Build and install from the current directory.
python setup.py sdist bdist_wheel
pip install .
Use the hostname
parameter to specify a custom ExploSig instance.
There is also a password
parameter to enable usage with protected instances.
>>> conn = connect(session_id, hostname='http://localhost:8100')
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
explosig-connect-0.0.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for explosig_connect-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8af9ae070354d0cec046ecb96b242b25bdcb0ee1c08d2f833c49b0821c2108de |
|
MD5 | c0b3a591b913d7e19df1221e036cbbf2 |
|
BLAKE2b-256 | 86f8542aac39c73a5eeb62387faaf5b4b5b397c86b1aab51c782588dea900149 |