Mastodon project file reader for Python
Project description
Mastodon Reader for Python
Import the spots and links tables, features, tags and meta data from a Mastodon project file.
ported to Python from: Matlab importer
Example
Read the mastodon file:
from mastodon_reader import MastodonReader
mr = MastodonReader("demo/demo.mastodon")
# show meta data
meta_data = mr.read_metadata()
# read (networkX) graph representation, spot and link tables with features and tags columns
graph, spots, links, tag_definition = mr.read(tags=True, features=True)
or read information separately
# read only spot and link tables
spots, links = mr.read_tables()
# read tag_definition and add tags as new columns to the spot and link tables
tag_definition = mr.read_tags(spots, links)
# read features and add as new columns to the spot and link tables
mr.read_features(spots, links)
# create networkX DiGraph representation form spots and links
graph = mr.create_nx_graph(spots, links)
Installation
Current version
pip install git+git://github.com/sommerc/mastodon_reader.git
pip
pip install Mastodon-Reader
more information on PyPi
Dependencies
- numpy
- pandas
- networkx
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
Mastodon Reader-0.3.0.tar.gz
(378.2 kB
view details)
Built Distribution
File details
Details for the file Mastodon Reader-0.3.0.tar.gz
.
File metadata
- Download URL: Mastodon Reader-0.3.0.tar.gz
- Upload date:
- Size: 378.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.61.1 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 371992b379710eaab2e121545ee2d5d571c2fce494abd1839ce1aa721389aa81 |
|
MD5 | 67c53686f516b30158196af2aabe8fc2 |
|
BLAKE2b-256 | d5f434cb36110282378037b11dcbfbf614bdcb675d0a99f79040cb8c54cf0aa8 |
File details
Details for the file Mastodon_Reader-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: Mastodon_Reader-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.61.1 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a05c6a1dabbb0e102511a5b980c0ab41d132394798a10c6be94e3a5d289f536 |
|
MD5 | 94e33f98f4f3f504b856d2a0618e8e81 |
|
BLAKE2b-256 | db22f9c29b4f12ca3c41d5945860b44c011a5de3de4b238066901da9e19542a8 |