https://github.com/tanaylab/misha
Genomic data analysis suite
https://github.com/tanaylab/misha
genomic-data-analysis
Last synced: 2 months ago
JSON representation
Genomic data analysis suite
- Host: GitHub
- URL: https://github.com/tanaylab/misha
- Owner: tanaylab
- License: other
- Created: 2019-08-25T09:20:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2026-04-21T10:13:34.000Z (3 months ago)
- Last Synced: 2026-04-21T10:22:33.691Z (3 months ago)
- Topics: genomic-data-analysis
- Language: R
- Homepage: https://tanaylab.github.io/misha/
- Size: 33.6 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# misha
[](https://CRAN.R-project.org/package=misha)
[](https://github.com/tanaylab/misha/actions/workflows/R-CMD-check.yaml)
The `misha` package is a toolkit for analysis of genomic data. it implements an efficient data structure for storing genomic data, and provides a set of functions for data extraction, manipulation and analysis.
## Installation
You can install the released version of misha from [CRAN](https://CRAN.R-project.org) with:
```{r, eval=FALSE}
install.packages("misha")
```
Or from conda:
```bash
conda install -c aviezerl r-misha
```
And the development version from GitHub with:
```{r, eval=FALSE}
remotes::install_github("tanaylab/misha")
```
## Usage
See the [Genomes](https://tanaylab.github.io/misha/articles/Genomes.html) vignette for instructions on how to create a misha database for common genomes.
See the [user manual](https://tanaylab.github.io/misha/articles/Manual.html) for more usage details.
### Using misha with an LLM agent
For agents (Claude Code, Copilot, Cursor, etc.) writing misha analysis code in a downstream project, point them at the maintained agent guides in this repo:
- [`agent-guides/misha-core.md`](https://github.com/tanaylab/misha/blob/master/agent-guides/misha-core.md) - concepts, bootstrap, and the everyday recipes (intervals, annotation, distance, extract, vtracks, gscreen, gdist, gtrack.create). Start here.
- [`agent-guides/misha-advanced.md`](https://github.com/tanaylab/misha/blob/master/agent-guides/misha-advanced.md) - 2D / Hi-C pile-ups, insulation, sequence and PWM tracks, bulk import/export, new genomes and cross-species.
- [`agent-guides/misha-anti-patterns.md`](https://github.com/tanaylab/misha/blob/master/agent-guides/misha-anti-patterns.md) - silent footguns referenced inline from the above.
The core guide is ~4k words and targets a system-prompt-sized context. For Claude Code-style setups, dropping `misha-core.md` (or all three) into the project's `CLAUDE.md` / `AGENTS.md` is the intended use.
**Drop-in prompt (no clone needed).** Paste the block below into your agent at the start of a misha task. It points the agent at the raw files on GitHub, so it works without a local checkout:
````
Before writing any misha code, fetch and read:
- https://raw.githubusercontent.com/tanaylab/misha/master/agent-guides/misha-core.md (mandatory: concepts + everyday recipes)
- https://raw.githubusercontent.com/tanaylab/misha/master/agent-guides/misha-anti-patterns.md (silent footguns; cross-referenced from core)
- https://raw.githubusercontent.com/tanaylab/misha/master/agent-guides/misha-advanced.md (consult on demand: 2D / Hi-C, PWM, import/export, new genomes)
Follow the conventions in those files. When you hit a recipe with an "Avoid:" block, treat it as a hard rule.
````
Pin to a release tag for stability by replacing `master` with any tag that contains `agent-guides/` (the directory landed in `v5.7.0`, so `v5.7.0` or later).
#### Running scripts from old versions of misha (< 4.2.0)
Starting in `misha` 4.2.0, the package no longer stores global variables such as `ALLGENOME` or `GROOT`. Instead, these variables are stored in a special environment called `.misha`. This means that scripts written for older versions of `misha` will no longer work. To run such scripts, either add a prefix of `.misha$` to all those variables (`.misha$ALLGENOME` instead of `ALLGENOME`), or run the following command before running the script:
```{r, eval=FALSE}
ALLGENOME <<- .misha$ALLGENOME
GROOT <<- .misha$GROOT
ALLGENOME <<- .misha$ALLGENOME
GINTERVID <<- .misha$GINTERVID
GITERATOR.INTERVALS <<- .misha$GITERATOR.INTERVALS
GROOT <<- .misha$GROOT
GWD <<- .misha$GWD
GTRACKS <<- .misha$GTRACKS
```