Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nanopore/crf-beam

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanopore/crf-beam

Beam search for Bonito CRF models.

  • 0.1.7-4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
7
Weekly downloads
 
Created
Source

crf-beam

Beam search for Bonito CRF models.

Usage

>>> import torch
>>> from crf_beam import beam_search
>>>
>>> T, C, S = 1000, 320, 64
>>> scores = torch.rand(T, C)
>>> back_guides = torch.rand(T + 1, S)
>>> post = torch.rand(T, S)
>>>
>>> sequence, qstring, moves = beam_search(scores, back_guides, post)
>>> sequence
'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT...'
>>> qstring
'(&''(****95444"@732"55",--/5555"5"@@E"E4""","-#**...'

Developer Quickstart

Python

$ python3 -m venv venv3
$ source venv3/bin/activate
(venv3) $ pip install -r requirements.txt
(venv3) $ make build
(venv3) $ make test

WASM

$ make wasm
$ node tests/test.js
import { crf_beam_decoder, initModule } from '@nanopore/crf-beam'

let Module = await initModule();

const decodedData = await crf_beam_decoder(Module, {
    scores: new Float32Array(arrayBuffer),
    numberSamplesInRead,
    modelStride,
    features,
});

FAQs

Package last updated on 02 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc