Coder Social home page Coder Social logo

seqvarnomjs's Introduction

CircleCI

SEQVARNOMJS

Javascript parser for Sequence Variant Nomenclature.

Quick Start

Note: this is a private repo hosted on Github, so you need to:

yarn install [email protected]/precisely/seqvarnomjs

Example

var svn = require('seqvarnomjs');

var pattern = svn.parse('NC0001_1.11:g.111T>G');
var genotype = svn.parse('NC0001_1.11:g.[111T>G];[111=]');

svn.match(pattern, genotype); // => true

Details

This library interprets SVN strings such as:

  • simple variants NC00001_1.11:g.111T>G
  • wild type NC00001_1.11:g.111=
  • compound cis variants NC0001_1.11:g.[111T>G;222A>G]
    • 111T>G and 222A>G are on the same chromosome copy
  • trans variants NC0001_1.11:g.[111T>G];[222A>G]
    • 111T>G and 222A>G are on different chromosome copies
  • variants with uncertain phasing NC0001_1.11:g.[111T>G](;)[222A>G]
    • 111T>G and 222A>G may be on same chromosome copy or different ones
  • complex variants NC0001_1.11:g.[111T>G;222A>G];[333=](;)[444T>A];[555G>A]

E.g.,

  • match a variant:
    const genotype = parse('NC0001_1.11:g.[111T>G]');
    const pattern = parse('NC0001_1.11:g.[111T>G]');
    genotype.matches(pattern); // => true
  • match a part of a variant:
    const genotype = parse('NC0001_1.11:g.[111T>G;222=](;)[333G>C;111=]');
    const pattern = parse('NC0001_1.11:g.[111T>G]');
    genotype.matches(pattern); // => true

seqvarnomjs's People

Contributors

aneilbaboo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.