Quickstart¶
Initialize DB¶
Extract values¶
intervals = pm.gintervals_from_strings(["chr1:0-1000", "chr1:2000-2600"])
out = pm.gextract("track1", intervals, iterator=100)
Screen and summarize¶
Thread safety¶
PyMisha is not thread-safe. All state (active database, virtual tracks, config) is process-global, so you should not call PyMisha from multiple threads or open more than one database per process. See the README for full details.
Example DB¶
pm.gdb_init_examples()
print(pm.gtrack_ls())
print(pm.gextract("dense_track", pm.gintervals("chr1", 0, 1000)))
Seeing what PyMisha recovered from¶
PyMisha falls back rather than failing in a number of places - an optional
dependency that is missing, a probe that decides a track is not of some type, a
best-effort cleanup. Each fallback reports what it caught on the pymisha
logger, which is silent until you configure logging:
Every module logs to its own child (pymisha.tracks, pymisha.intervals, ...),
so a single one can be turned up on its own. Failures that R misha itself warns
about are raised as pymisha.PymishaWarning instead, so they are visible with
no configuration; silence them with
warnings.filterwarnings("ignore", category=pm.PymishaWarning).