Learn R Programming

misha

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 with:

install.packages("misha")

And the development version from GitHub with:

remotes::install_github("tanaylab/misha")

Usage

See the Genomes vignette for instructions on how to create a misha database for common genomes.

See the user manual for more usage details.

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:

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

Copy Link

Version

Install

install.packages('misha')

Monthly Downloads

252

Version

5.4.5

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Aviezer Lifshitz

Last Published

February 20th, 2026

Functions in misha (5.4.5)

gdb.reload

Reloads database from the disk
gdb.mark_cache_dirty

Mark cached track list as dirty
gdb.set_readonly_attrs

Sets read-only track attributes
gdir.cd

Changes current working directory in Genomic Database
gdb.convert_to_indexed

Change Database to Indexed Genome Format
gdist

Calculates distribution of track expressions
gdir.rm

Deletes a directory from Genomic Database
gdb.create

Creates a new Genomic Database
gintervals.2d.convert_to_indexed

Convert 2D interval set to indexed format
gintervals

Creates a set of 1D intervals
gdir.create

Creates a new directory in Genomic Database
gdir.cwd

Returns the current working directory in Genomic Database
gintervals.2d.band_intersect

Intersects two-dimensional intervals with a band
gintervals.2d.all

Returns 2D intervals that cover the whole genome
gintervals.as_chain

Transforms existing intervals to a chain format
gintervals.canonic

Converts intervals to canonic form
gextract

Returns evaluated track expression
gintervals.2d

Creates a set of 2D intervals
gdb.info

Get Database Information
gintervals.annotate

Annotates 1D intervals using nearest neighbors
gintervals.dbs

Returns all database paths containing an interval set
gintervals.dataset

Returns the database/dataset path for interval sets
gintervals.force_range

Limits intervals to chromosomal range
gintervals.chrom_sizes

Returns number of intervals per chromosome
gintervals.convert_to_indexed

Convert 1D interval set to indexed format
gintervals.mark_overlaps

Mark overlapping intervals with a group ID
gintervals.import_genes

Imports genes and annotations from files
gintervals.normalize

Normalize intervals to fixed or variable sizes
gintervals.covered_bp

Calculate total base pairs covered by intervals
gdb.init

Initializes connection with Genomic Database
gintervals.all

Returns 1D intervals that cover the whole genome
gintervals.coverage_fraction

Calculate fraction of genomic space covered by intervals
gintervals.random

Generate random genome intervals
gintervals.is.bigset

Tests for big intervals set
gintervals.mapply

Applies a function to values of track expressions
gintervals.exists

Tests for a named intervals set existence
gintervals.diff

Calculates difference of two intervals sets
gintervals.intersect

Calculates an intersection of two sets of intervals
gintervals.load_chain

Loads assembly conversion table from a chain file
gintervals.liftover

Converts intervals from another assembly
gintervals.neighbors

Finds neighbors between two sets of intervals
gintervals.ls

Returns a list of named intervals sets
gintervals.update

Updates a named intervals set
gintervals.rbind

Combines several sets of intervals
gintervals.union

Calculates a union of two sets of intervals
grevcomp

Get reverse complement of DNA sequence
giterator.cartesian_grid

Creates a cartesian-grid iterator
gintervals.summary

Calculates summary statistics of track expression for intervals
gintervals.path

Returns the path on disk of an interval set
gintervals.quantiles

Calculates quantiles of a track expression for intervals
gpartition

Partitions the values of track expression
gintervals.load

Loads a named intervals set
gintervals.save

Creates a named intervals set
gintervals.rm

Deletes a named intervals set
gseq.comp

Complement DNA sequence
giterator.intervals

Returns iterator intervals
gquantiles

Calculates quantiles of a track expression
glookup

Returns values from a lookup table based on track expression
gsynth.load

Load a gsynth.model from disk
gsynth.bin_map

Create a bin mapping from value-based merge specifications
gsample

Returns samples from the values of track expression
gscreen

Finds intervals that match track expression
gseq.extract

Returns DNA sequences
gsynth.replace_kmer

Iteratively replace a k-mer in the genome
gsegment

Divides track expression into segments
gsynth.random

Generate random genome sequences
gseq.rev

Reverse DNA sequence
gseq.revcomp

Get reverse complement of DNA sequence
gseq.pwm

Score DNA sequences with a PWM over a region of interest
gsummary

Calculates summary statistics of track expression
gseq.kmer

Score DNA sequences with a k-mer over a region of interest
gseq.kmer.dist

Compute k-mer distribution in genomic intervals
gsynth.sample

Sample a synthetic genome from a trained Markov model
gsynth.train

Train a stratified Markov-5 model from genome sequences
gsynth.save

Save a gsynth.model to disk
gtrack.create_dirs

Create directories needed for track creation
gtrack.convert_to_indexed

Convert a track to indexed format
gtrack.2d.import

Creates a 2D track from tab-delimited file
gtrack.2d.create

Creates a 'Rectangles' track from intervals and values
gtrack.array.get_colnames

Returns column names of array track
gtrack.attr.get

Returns value of a track attribute
gtrack.copy

Copies a track
gtrack.attr.import

Imports track attributes values
gtrack.2d.import_contacts

Creates a track from a file of inter-genomic contacts
gtrack.convert

Converts a track to the most current format
gtrack.array.extract

Returns values from 'Array' track
gtrack.array.import

Creates an array track from array tracks or files
gtrack.attr.export

Returns track attributes values
gtrack.attr.set

Assigns value to a track attribute
gtrack.create_dense

Creates a 'Dense' track from intervals and values
gtrack.exists

Tests for a track existence
gtrack.info

Returns information about a track
gtrack.import

Creates a track from WIG / BigWig / BedGraph / BED / tab-delimited file
gtrack.create

Creates a track from a track expression
gtrack.array.set_colnames

Sets column names of array track
gtrack.smooth

Creates a new track from smoothed values of track expression
gtrack.create_pwm_energy

Creates a new track from PSSM energy function
gtrack.import_mappedseq

Creates a track from a file of mapped sequences
gtrack.dataset

Returns the database/dataset path for a track
gtrack.dbs

Returns the database paths that contain track(s)
gtrack.rm

Deletes a track
gtrack.path

Returns the path on disk of a track
gtrack.create_sparse

Creates a 'Sparse' track from intervals and values
gtrack.mv

Renames or moves a track
gtrack.var.rm

Deletes a track variable
gtrack.modify

Modifies track contents
gtrack.liftover

Imports a track from another assembly
gtrack.var.ls

Returns a list of track variables for a track
gtrack.lookup

Creates a new track from a lookup table based on track expression
gtrack.import_set

Creates one or more tracks from multiple WIG / BigWig / BedGraph / tab-delimited files on disk or FTP
gtrack.ls

Returns a list of track names
gtrack.var.set

Assigns value to a track variable
gvtrack.filter

Attach or clear a genomic mask filter on a virtual track
gwget

Downloads files from FTP server
gvtrack.rm

Deletes a virtual track
gtrack.var.get

Returns value of a track variable
gvtrack.array.slice

Defines rules for a single value calculation of a virtual 'Array' track
gvtrack.create

Creates a new virtual track
print.gsynth.model

Print summary of a gsynth.model
gvtrack.iterator.2d

Defines modification rules for a two-dimensional iterator in a virtual track
gvtrack.info

Returns the definition of a virtual track
%>%

Pipe operator
misha-package

Toolkit for analysis of genomic data
gvtrack.ls

Returns a list of virtual track names
gwilcox

Calculates Wilcoxon test on sliding windows over track expression
gvtrack.iterator

Defines modification rules for a one-dimensional iterator in a virtual track
gcor

Calculates correlation between track expressions
gdataset.example_path

Create an example dataset on the fly
gintervals.neighbors.upstream

Directional neighbor finding functions
gdataset.info

Get dataset information
gcompute_strands_autocorr

Computes auto-correlation between the strands for a file of mapped sequences
gdb.create_genome

Create and Load a Genome Database
gdataset.unload

Unload a dataset from the namespace
gdataset.save

Save a dataset
gcluster.run

Runs R commands on a cluster
gbins.summary

Calculates summary statistics of a track expression for bins
.misha

An environment for storing the package global variables
gcis_decay

Calculates distribution of contact distances
gdataset.load

Load a dataset into the namespace
gdb.create_linked

Create a linked database with symlinks to a parent database
gbins.quantiles

Calculates quantiles of a track expression for bins
gdb.export_fasta

Export a database genome as FASTA
gdb.get_readonly_attrs

Returns a list of read-only track attributes
gdataset.ls

List working database and loaded datasets