level-dna

1.0.0 • Public • Published

level-dna

NPM

Import genome data (json format) into LevelDB.

Example

Example of importing the dna of contra into level.

var fs = require('request')
var JSONStream = require('JSONStream')
var levelup = require('levelup')
var tolevel = require('level-dna')
 
var db = levelup('./contra')
 
request('https://github.com/contra/dna/blob/master/dna.json?raw=true')
  .pipe(JSONStream.parse('*'))
  .pipe(tolevel(db))

The format will turn

{"id":"rs4477212","c":1,"pos":82154,"g":"AA"}

into

{"key":"rs4477212","value": "AA"}

So it will only save the genotype and the RSID. If you think you also need the other information, feel free to create an issue/pull request.

Readme

Keywords

Package Sidebar

Install

npm i level-dna

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • finnpauls