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

106

Version

5.3.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Aviezer Lifshitz

Last Published

December 14th, 2025

Functions in misha (5.3.2)

gdb.info

Get Database Information
gintervals.2d

Creates a set of 2D intervals
gintervals.annotate

Annotates 1D intervals using nearest neighbors
gintervals.as_chain

Transforms existing intervals to a chain format
gintervals

Creates a set of 1D intervals
gintervals.all

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

Convert 1D interval set to indexed format
gintervals.coverage_fraction

Calculate fraction of genomic space covered by intervals
gintervals.2d.convert_to_indexed

Convert 2D interval set to indexed format
gintervals.chrom_sizes

Returns number of intervals per chromosome
gintervals.2d.band_intersect

Intersects two-dimensional intervals with a band
gintervals.canonic

Converts intervals to canonic form
gextract

Returns evaluated track expression
gdist

Calculates distribution of track expressions
gintervals.diff

Calculates difference of two intervals sets
gintervals.exists

Tests for a named intervals set existence
gintervals.force_range

Limits intervals to chromosomal range
gintervals.mark_overlaps

Mark overlapping intervals with a group ID
gintervals.covered_bp

Calculate total base pairs covered by intervals
gintervals.load

Loads a named intervals set
gintervals.neighbors

Finds neighbors between two sets of intervals
gintervals.load_chain

Loads assembly conversion table from a chain file
gintervals.is.bigset

Tests for big intervals set
gintervals.rm

Deletes a named intervals set
gintervals.mapply

Applies a function to values of track expressions
gintervals.rbind

Combines several sets of intervals
gintervals.union

Calculates a union of two sets of intervals
gintervals.ls

Returns a list of named intervals sets
gintervals.normalize

Normalize intervals to a fixed size
gintervals.liftover

Converts intervals from another assembly
grevcomp

Get reverse complement of DNA sequence
gintervals.update

Updates a named intervals set
giterator.intervals

Returns iterator intervals
gintervals.save

Creates a named intervals set
gintervals.quantiles

Calculates quantiles of a track expression for intervals
giterator.cartesian_grid

Creates a cartesian-grid iterator
gquantiles

Calculates quantiles of a track expression
gintervals.path

Returns the path on disk of an interval set
gpartition

Partitions the values of track expression
gintervals.summary

Calculates summary statistics of track expression for intervals
glookup

Returns values from a lookup table based on track expression
gintervals.intersect

Calculates an intersection of two sets of intervals
gintervals.2d.all

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

Imports genes and annotations from files
gseq.kmer

Score DNA sequences with a k-mer over a region of interest
gsample

Returns samples from the values of track expression
gseq.comp

Complement DNA sequence
gtrack.array.import

Creates an array track from array tracks or files
gscreen

Finds intervals that match track expression
gtrack.2d.import

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

Create directories needed for track creation
gtrack.array.get_colnames

Returns column names of array track
gseq.extract

Returns DNA sequences
gtrack.convert

Converts a track to the most current format
gtrack.attr.set

Assigns value to a track attribute
gsegment

Divides track expression into segments
gtrack.2d.create

Creates a 'Rectangles' track from intervals and values
gintervals.random

Generate random genome intervals
gseq.pwm

Score DNA sequences with a PWM over a region of interest
gseq.revcomp

Get reverse complement of DNA sequence
gtrack.create_dense

Creates a 'Dense' track from intervals and values
gtrack.2d.import_contacts

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

Returns values from 'Array' track
gtrack.import_set

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

Reverse DNA sequence
gtrack.import_mappedseq

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

Convert a track to indexed format
gtrack.info

Returns information about a track
gsummary

Calculates summary statistics of track expression
gtrack.liftover

Imports a track from another assembly
gtrack.create

Creates a track from a track expression
gtrack.attr.export

Returns track attributes values
gtrack.array.set_colnames

Sets column names of array track
gtrack.ls

Returns a list of track names
gtrack.var.get

Returns value of a track variable
gtrack.lookup

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

Creates a 'Sparse' track from intervals and values
gtrack.attr.import

Imports track attributes values
gtrack.modify

Modifies track contents
gtrack.attr.get

Returns value of a track attribute
gtrack.import

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

Returns a list of track variables for a track
gtrack.var.set

Assigns value to a track variable
gtrack.exists

Tests for a track existence
gvtrack.create

Creates a new virtual track
gtrack.var.rm

Deletes a track variable
gvtrack.array.slice

Defines rules for a single value calculation of a virtual '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
gvtrack.filter

Attach or clear a genomic mask filter on a virtual track
gtrack.path

Returns the path on disk of a track
misha-package

Toolkit for analysis of genomic data
gtrack.rm

Deletes a track
gvtrack.ls

Returns a list of virtual track names
gwget

Downloads files from FTP server
gvtrack.iterator

Defines modification rules for a one-dimensional iterator in a virtual track
gvtrack.rm

Deletes a virtual track
gvtrack.info

Returns the definition of a virtual track
gvtrack.iterator.2d

Defines modification rules for a two-dimensional iterator in a virtual track
gwilcox

Calculates Wilcoxon test on sliding windows over track expression
%>%

Pipe operator
gdb.create_genome

Create and Load a Genome Database
gdb.create

Creates a new Genomic Database
gintervals.neighbors.upstream

Directional neighbor finding functions
.misha

An environment for storing the package global variables
gbins.summary

Calculates summary statistics of a track expression for bins
gdir.cd

Changes current working directory in Genomic Database
gdb.convert_to_indexed

Change Database to Indexed Genome Format
gdir.rm

Deletes a directory from Genomic Database
gbins.quantiles

Calculates quantiles of a track expression for bins
gcompute_strands_autocorr

Computes auto-correlation between the strands for a file of mapped sequences
gdir.create

Creates a new directory in Genomic Database
gcis_decay

Calculates distribution of contact distances
gcluster.run

Runs R commands on a cluster
gdb.reload

Reloads database from the disk
gdb.init

Initializes connection with Genomic Database
gdb.get_readonly_attrs

Returns a list of read-only track attributes
gdb.set_readonly_attrs

Sets read-only track attributes
gdir.cwd

Returns the current working directory in Genomic Database
gdb.mark_cache_dirty

Mark cached track list as dirty