react-msaview
v11.0.0
Published
Readme
react-msaview
A React component for viewing multiple sequence alignments: a phylogenetic tree rendered alongside a protein or DNA alignment, with protein domain annotations, many color schemes, and SVG export.
Install
npm install react-msaview @jbrowse/core@next mobx@7 mobx-react@10 \
@jbrowse/mobx-state-tree@6 @mui/material@9 @mui/icons-material@9 \
@emotion/react @emotion/styled react react-domThe line pins the mobx, mobx-state-tree and MUI majors the viewer shares with
@jbrowse/core, so the app gets one copy of each. The
usage guide
lists the errors a second copy throws.
Quick start
import { MSAViewer } from 'react-msaview'
export default function App() {
// backticks (template literal) so the \n become real newlines
return (
<MSAViewer
msa={`>human\nMKAANSE\n>mouse\nMKA-NSE`}
tree="(human:0.1,mouse:0.2);"
residueColor={{ scale: { scheme: 'clustal' } }}
/>
)
}MSAViewer creates the model, measures width, and applies the theme for you.
For full control, use the MSAModelF / MSAView model-based API described in
the
usage & embedding guide.
Docs & links
- Usage & embedding guide: props, model API, UMD bundle, R
- Live examples: runnable snippets
- Model API reference
- Main repository
- CLI: domain and exon GFFs, plus headless SVG export
- msa-parsers: standalone parsing library
- msa-coordinates: conversions between alignment columns and each row's residues
- ProteinBrowser: protein analysis suite built on this viewer
