dna2json

Formats your genome file as JSON

  • 所有者: genomejs/dna2json
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

NPM version

Information

Terminology

SNP

A SNP (Single-Nucleotide Polymorphism - pronounced snip) is a variation of a single nucleotide (A, G, C or T) at some location in your genome. The presense of particular variants, or groups thereof, can tell you a lot about yourself (hair color, height, muscle type, allergies, response to disease, response to pharmaceuticals, heritage, etc.).

Personal genome vendors will typically produce an analysis that covers some of these attributes - but will also provide you with 'raw' data, should you wish to investigate further.Your 'raw' data from any vendor will be a list of several hundred thousand SNPs, located across the autosomes (chromosomes 1-22), the sex chromosomes (X and Y), and possibly the mitochondrial chromosome. Given that your genome contains two copies of each autosome, and either XX (female) or XY (male), the data contains a 'genotype' composed of the two variants at each location.

autosome

Vendors, Name, Supported, Price, Sample, Autosomal SNPs, Y SNPs, X SNPs, MT SNPs, Raw Data, ------, -----------, -------, --------, ----------------, --------, --------, ---------, ----------, 23andMe, Yes, 199/99 USD, Saliva, 967,000, 3,089, 26,087, 2,737, Yes, ancestryDNA, Yes, 99 USD, Saliva, 682,549, 885, 17,604, Yes, FamilyTree, Yes, 99 USD, Cheek Swab, 708,092, 18,091, Yes, 23andMe picing is 199 USD domestically and 99 USD abroad.

CLI Usage

Use this if you just want to convert your data to the correct format so you can start querying your genome.

$ npm install dna2json -g
$ dna2json
Usage: dna2json <input file> <output file>
$ dna2json dna.txt dna.json
This will take a while...

Module Usage

var dna = require('dna2json');
var fs = require('fs');

var txt = fs.readFileSync('dna.txt');
dna.parse(txt, function(err, snps){
  // snps = the object with your mutations
});

SNP-JSON

Every vendor has their own format for your DNA. I decided to make a standard format called SNP-JSON. This library will convert custom formats to this standard.

SNP-JSON looks like this

{
  "rs4477212": {
    "chromosome": 1,
    "genotype": "AA"
  },
  "rs3094315": {
    "chromosome": 1,
    "genotype": "AA"
  },
  "rs3131972": {
    "chromosome": 1,
    "genotype": "GG"
  },
  "rs12124819": {
    "chromosome": 1,
    "genotype": "AA"
  },
  "rs11240777": {
    "chromosome": 1,
    "genotype": "GG"
  },
  "rs6681049": {
    "chromosome": 1,
    "genotype": "CC"
  },
  ...
}

Explanation:

  • The key is the RSID or vendor ID.
  • Chromosome is which chromosome the data came from (1-22, X, Y, or MT).
  • Genotype is the value for the RSID.

Differences between formats

SNP-JSON, SNPedia and vendor formats use different notations to indicate indels and no-calls., Format, Insertion, Deletion, No Call, Reference, ---------------, ----------------------, ----------, ---------, -------------, 23AndMe, I, D, -, https://customercare.23andme.com/hc/en-us/articles/212196888-What-does-not-determined-or-not-genotyped-mean-, AncestryDNA, I, D, 0, https://www.ancestry.com/dna/en/legal/us/faq#raw-6, FamilyTreeDNA, I, D, -, https://www.familytreedna.com/learn/autosomal-ancestry/universal-dna-matching/read-family-finder-raw-data-file/, SNP-JSON, I, -, ?, SNPedia, (the actual letters), -, N/A, https://www.snpedia.com/index.php/Talk:Rs5030655, ## Using your SNP-JSON

Just Write Code™

In this example we will determine if you are immune to norovirus:

var dna = require('./dna.json');

if (dna.rs601338.genotype == 'AA') {
  // congrats you are immune!
}

Genosets

Once you have your data in the right format you can use the library of genosets by genomejs.

You can view a list of these by searching npm for genoset

You can also publish your own tools that analyze your DNA! Here is a tool that we recommend to get you started GQL

LICENSE

(MIT License)

Copyright (c) 2013-2016 Fractal contact@wearefractal.com

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

主要指标

概览
名称与所有者genomejs/dna2json
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2013-11-11 07:03:11
推送于2017-07-13 23:24:33
最后一次提交2017-07-13 19:24:23
发布数9
最新版本名称v1.0.7 (发布于 2017-07-13 19:24:23)
第一版名称v0.3.3 (发布于 2014-10-02 13:30:34)
用户参与
星数372
关注者数30
派生数31
提交数75
已启用问题?
问题数13
打开的问题数3
拉请求数14
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?