A Python package for visualizing large, high-dimensional data sets.
Project description
tmap (Python 3.9+ & Apple Silicon Compatible)
This is a fork of tmap that is compatible with Python 3.9-3.12 and Apple Silicon (arm64).
tmap is a very fast visualization library for large, high-dimensional data sets. The graph layouts are based on the OGDF library.
Installation
Option 1: Install from GitHub (Recommended)
pip install git+https://github.com/afloresep/silicon-tmap-compatible.git
Option 2: Install from pre-built wheels
Check the Releases page for pre-built wheels for your platform.
Option 3: Build from source
For Apple Silicon Macs or if you need to build from source:
# Clone the repository
git clone https://github.com/afloresep/silicon-tmap-compatible.git
cd silicon-tmap-compatible
# Create conda environment with build dependencies
conda create -n tmap python=3.12 -y
conda activate tmap
conda install -c conda-forge cmake ninja llvm-openmp numpy scipy matplotlib annoy pybind11 -y
# Build OGDF
cd ogdf-conda/src
mkdir -p build installed
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX="$PWD/../installed" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_ARCHITECTURES=arm64 # Only for Apple Silicon
cmake --build . --parallel
cmake --install .
cd ../../..
# Install tmap
export LIBOGDF_INSTALL_PATH="$PWD/ogdf-conda/src/installed"
pip install . --no-build-isolation
Visualization
We recommend using faerun to plot the data laid out by tmap:
pip install faerun
Quick Example
import tmap as tm
import numpy as np
# Generate random data
data = np.random.rand(1000, 100)
# Create MinHash fingerprints
mh = tm.Minhash(128)
fps = [tm.VectorFloat(row) for row in data]
lf = tm.LSHForest(128)
lf.batch_add(mh.batch_from_weight_array(fps))
lf.index()
# Layout
cfg = tm.LayoutConfiguration()
cfg.k = 20
x, y, s, t, _ = tm.layout_from_lsh_forest(lf, cfg)
# Plot with faerun or matplotlib
import matplotlib.pyplot as plt
plt.scatter(x, y, s=1)
plt.show()
Tutorial and Documentation
See the original documentation at http://tmap.gdb.tools
Examples
| Name | Description |
|---|---|
| MNIST | Visualization of the MNIST data set |
| Drugbank | All drugs registered in Drugbank |
| Project Gutenberg | Linguistic relationships between books |
Compatibility
| Python | Linux | macOS Intel | macOS Apple Silicon | Windows |
|---|---|---|---|---|
| 3.9 | ✅ | ✅ | ✅ | ✅ |
| 3.10 | ✅ | ✅ | ✅ | ✅ |
| 3.11 | ✅ | ✅ | ✅ | ✅ |
| 3.12 | ✅ | ✅ | ✅ | ✅ |
Changes from Original
- Fixed compatibility with Python 3.9-3.12
- Fixed Apple Silicon (arm64) builds
- Updated deprecated
distutilsimports - Added proper
pyproject.tomlbuild configuration
License
BSD 3-Clause License - see LICENSE.md
Credits
Original tmap by Daniel Probst and the Reymond Group.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tmap_silicon-1.0.19.tar.gz.
File metadata
- Download URL: tmap_silicon-1.0.19.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4bbd9ec65136d90d6f598745dd0a1093f2d3c8fe3fa30499397d5b328d147f
|
|
| MD5 |
a508b17ca27db6c50a73c158829722e7
|
|
| BLAKE2b-256 |
365facce7287d244adca866dbdf2a40be3d10f10a480c7f756d38f5dfab49603
|
File details
Details for the file tmap_silicon-1.0.19-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 666.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4bf85ed2b03142b509965ad0ec403da79bb9d2005f48d76c8a8dd4dad94c3ef
|
|
| MD5 |
5e8ad5fe890fdd49805fd50748308b5e
|
|
| BLAKE2b-256 |
92a5ae3a0f3f5f171acd65f96352a2bebbb233599f9709e3404d11da7cfb7c45
|
File details
Details for the file tmap_silicon-1.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
497f5f8f6eade90fe2938005d2a2f70b845a9e28f668ec406282a8be6c60769b
|
|
| MD5 |
be0ebebc3f7b3151c4cc1a22a9f65c8f
|
|
| BLAKE2b-256 |
0be4741aef2fc3577851b5edb9926c33d5a5ede1fa3e41cb285db8d3cefbda88
|
File details
Details for the file tmap_silicon-1.0.19-cp313-cp313-macosx_14_0_arm64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp313-cp313-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.13, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6c27b7b577b396ee250eaffe6b1ad3cf26b41c090b7e7d4d1a39b7d4e5ab2b0
|
|
| MD5 |
a1f5a44c1ebba48b386f1e9ac09d65d4
|
|
| BLAKE2b-256 |
489d9abdabe4d18f90d2e1fa036b3f53a454cbf24f6001995efaa5e2fa5f8d69
|
File details
Details for the file tmap_silicon-1.0.19-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 666.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20328f9c6732ba7fc1976bea748cb3a046d071739e31cbbd932b868c2aef5a2c
|
|
| MD5 |
e2fa1bab36f7b0677d06d346bb672799
|
|
| BLAKE2b-256 |
a2eafa0f1851e0732e55b9d423e9175ae6784245cd6c3f744f7d8f03589a5241
|
File details
Details for the file tmap_silicon-1.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56434de65fa79751f7af3f53232c6bd1088518ce4a837387c32aa4545b5dcda1
|
|
| MD5 |
7a0c3aea1d5f27164fc5bc93f6843080
|
|
| BLAKE2b-256 |
98cd5f35b6abe216b8eb68e4d3152b74f98185b4fb7a94afb87c4aaa9c83ac49
|
File details
Details for the file tmap_silicon-1.0.19-cp312-cp312-macosx_14_0_arm64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58456ea5c8fb4070c74ad19392ee3d9a30e3bc29d367193396ff55b8408e1a6e
|
|
| MD5 |
44ffa294d590cf35e09d2c4e10d49c57
|
|
| BLAKE2b-256 |
7d58b22385569d457dce2846467017b5e6f4551e44a86983b0e1137ae13e9054
|
File details
Details for the file tmap_silicon-1.0.19-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 664.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0b90cd3ed2397aee4b9460bb5e4325021e87e1af5dac8ba7512ab3bcde116e
|
|
| MD5 |
4bae99bd342bd7e49aa045ab7e8c6991
|
|
| BLAKE2b-256 |
a11ec4c6f923856eba82ef0eaf486a2ac95113785e7b7b432b99ea4969655799
|
File details
Details for the file tmap_silicon-1.0.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
191b11e7634f1558884af711a71d429202c48a84a9e5adf64c143396bbeadb22
|
|
| MD5 |
d74b819033a7cd78ced97944f18b0437
|
|
| BLAKE2b-256 |
c0ddc422121a97d14ac6903e58f511096efccf0285c395d40e31058b4cfe4dbd
|
File details
Details for the file tmap_silicon-1.0.19-cp311-cp311-macosx_14_0_arm64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7f5cfa760904a9aa060719a3118f9c9e1a9cf94313ec7c1e07ac024c7753b8e
|
|
| MD5 |
b27513b5a4234bb42d7eddb6205e566f
|
|
| BLAKE2b-256 |
de0c3eee3cd6d84cf51b78f4dfbf161a7847f93fc0ec0b6386a8d877baa7ef46
|
File details
Details for the file tmap_silicon-1.0.19-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 664.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee885661fca4d3cc91261efdfa0a6491a08f5f85a793891ac5a1037a876a989a
|
|
| MD5 |
a1c86f129ad96bfde807d52b4e869ddc
|
|
| BLAKE2b-256 |
48a865b89d2da9041acfcfa995a399ef1f841e0d3027ccf44defe1a6bfeb2e40
|
File details
Details for the file tmap_silicon-1.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a8268261c98f9b9e456ac07a894edc77d42d7f1b059222f53a12de74bd05c82
|
|
| MD5 |
bebf30994031f1efc2dbedda461edca0
|
|
| BLAKE2b-256 |
ea8d62944ac9cbbfb9cfe132873fbf997318208da024d38f96be92e459483f4a
|
File details
Details for the file tmap_silicon-1.0.19-cp310-cp310-macosx_14_0_arm64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12037999223bd4126809fe0e812f3acbbb35806c13d56b35f965349986f9ce2
|
|
| MD5 |
b99d092c53ed40c4543b1d74aca31d90
|
|
| BLAKE2b-256 |
2b6f95d91e7be02569f34ee8cfe8493d35a1ad5bf96dab387593bd5001d7e899
|
File details
Details for the file tmap_silicon-1.0.19-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 664.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd67109a8340dadc0666776c2925919b63c29c8df4cd0a2f908121e0865802fc
|
|
| MD5 |
775f0ee52e5c8f9d2281ae05f62da0d3
|
|
| BLAKE2b-256 |
802a8d8756087b18f00be6353e414ed8d9d6b9092ed9c503f51b5358d69c98ae
|
File details
Details for the file tmap_silicon-1.0.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89519488817c731a4a49a6aa85bf6a18132d1a3bcf0999ac966daabd8af8733e
|
|
| MD5 |
ad82fdcd58c9a40fe9d072b0a027721e
|
|
| BLAKE2b-256 |
b02f60ab62585bc8131478a8bbe6158131730b781be8afb662431d5fcb6c16c5
|
File details
Details for the file tmap_silicon-1.0.19-cp39-cp39-macosx_14_0_arm64.whl.
File metadata
- Download URL: tmap_silicon-1.0.19-cp39-cp39-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e71e2e024f54ed235e05d1d229fdc5f49ba628fbdf4fe05d313e1cff0901951
|
|
| MD5 |
2e68005516a338ecf5d318f55e083d55
|
|
| BLAKE2b-256 |
6769b6df74e74ea58ba7d9c1ed828a61ff829b39361f6f97b62e5d0acd1f9b44
|