---恢复内容开始---

我们经常说幻想着使用已有数据发表高分文章,的确,这样的童话故事每天都在发生,但如何走出第一步我们很多小伙伴不清楚,那么我们就从水稻SNP数据库的使用来讲起。

http://snp-seek.irri.org/

这是3k的水稻变异库,上面保存着现成的SNP,由于数据过大,网站的维护方使用了Plink的格式来给我们在线储存SNP的信息,可以理解毕竟3025个水稻的全基因组SNP,怎么算都不是个小数。

Plink格式是如下三个文件:

base_filtered_v0.7.bed.gz
base_filtered_v0.7.bim.gz
base_filtered_v0.7.fam.gz

用Plink软件的“--recode”就可以把这三个软件转化为Vcf格式:

--recode [output format] < | > <tab | tabx | spacex | bgz | gen-gz>
<include-alt> <omit-nonmale-y>
Create a new text fileset with all filters applied. The following output
formats are supported:
* '': 23andMe -column format. This can only be used on a single
sample's data (--keep may be handy), and does not support multicharacter
allele codes.
* 'A': Sample-major additive (//) coding, suitable for loading from R.
If you need uncounted alleles to be named in the header line, add the
'include-alt' modifier.
* 'AD': Sample-major additive (//) + dominant (het=/hom=) coding.
Also supports 'include-alt'.
* 'A-transpose': Variant-major //.
* 'beagle': Unphased per-autosome .dat and .map files, readable by early
BEAGLE versions.
* 'beagle-nomap': Single .beagle.dat file.
* 'bimbam': Regular BIMBAM format.
* 'bimbam-1chr': BIMBAM format, with a two-column .pos.txt file. Does not
support multiple chromosomes.
* 'fastphase': Per-chromosome fastPHASE files, with
.chr-[chr #].recode.phase.inp filename extensions.
* 'fastphase-1chr': Single .recode.phase.inp file. Does not support
multiple chromosomes.
* 'HV': Per-chromosome Haploview files, with .chr-[chr #][.ped + .info]
filename extensions.
* 'HV-1chr': Single Haploview .ped + .info file pair. Does not support
multiple chromosomes.
* 'lgen': PLINK long-format (.lgen + .fam + .map), loadable with --lfile.
* 'lgen-ref': .lgen + .fam + .map + .ref, loadable with --lfile +
--reference.
* 'list': Single genotype-based list, up to lines per variant. To omit
nonmale genotypes on the Y chromosome, add the 'omit-nonmale-y' modifier.
* 'rlist': .rlist + .fam + .map fileset, where the .rlist file is a
genotype-based list which omits the most common genotype for each
variant. Also supports 'omit-nonmale-y'.
* 'oxford': Oxford-format .gen + .sample. With the 'gen-gz' modifier, the
.gen file is gzipped.
* 'ped': PLINK sample-major (.ped + .map), loadable with --file.
* 'compound-genotypes': Same as 'ped', except that the space between each
pair of same-variant allele codes is removed.
* 'structure': Structure-format.
* 'transpose': PLINK variant-major (.tped + .tfam), loadable with
--tfile.
* 'vcf', 'vcf-fid', 'vcf-iid': VCFv4.. 'vcf-fid' and 'vcf-iid' cause
family IDs or within-family IDs respectively

to be used for the sample
IDs in the last header row, while 'vcf' merges both IDs and puts an
underscore between them. If the 'bgz' modifier is added, the VCF file is
block-gzipped.
The A2 allele is saved as the reference and normally flagged as not based
on a real reference genome (INFO:PR). When it is important for reference
alleles to be correct, you'll also want to include --a2-allele and
--real-ref-alleles in your command.
In addition,
* The '' modifier causes A1 (usually minor) alleles to be coded as ''
and A2 alleles to be coded as '', while '' maps A1 -> and A2 -> .
* The 'tab' modifier makes the output mostly tab-delimited instead of
mostly space-delimited. 'tabx' and 'spacex' force all tabs and all
spaces, respectively.
plink --bfile <prefix> --recode vcf-iid --out ./<out-prefix>

通过这种方式就可以把bed的信息转化为可用的vcf。

【数据使用】3k水稻数据库现成SNP的使用的更多相关文章

  1. 如何将MongoDB数据库的数据迁移到MySQL数据库中

    FAQ v2.0终于上线了,断断续续忙了有2个多月.这个项目是我实践的第一个全栈的项目,从需求(后期有产品经理介入)到架构,再到设计(有征询设计师的意见).构建(前端.后台.数据库.服务器部署),也是 ...

  2. 数据导入导出Oracle数据库

    临近春节,接到了一个导入数据的任务,在Linux客户端中的数据有50G,大约3亿3千万行: 刚开始很天真,把原始的txt/csv文件用sh脚本转化成了oralce 的insert into 语句,然后 ...

  3. 测试Oracle 11gr2 RAC 非归档模式下,offline drop数据文件后的数据库的停止与启动测试全过程

    测试Oracle 11gr2 RAC 非归档模式下,offline drop数据文件后的数据库的停止与启动测试全过程 最近系统出现问题,由于数据库产生的日志量太大无法开启归档模式,导致offline的 ...

  4. 怎样把excel的数据导入到sqlserver2000数据库中

    在做程序的时候有时需要把excel数据导入到sqlserver2000中,以前没从外部导入过数据,今天刚做了一下导入数据,感觉还是蛮简单的,没做过之前还想着多么的复杂呢,下面就来分享一下我是如何把ex ...

  5. 学习springMVC框架配置遇到的问题-数据写入不进数据库时的处理办法

    配置完了,运行,数据写入不到数据库中,就应该想UserAction 中的handleRequest()方法有没有进去,然后就设置断点.如果发现程序没有进去,就再想办法进去.

  6. paip.导入数据英文音标到数据库mysql为空的问题之道解决原理

    paip.导入数据英文音标到数据库mysql为空的问题之道解决原理 #---原因:mysql 导入工具的bug #---解决:使用双引号不个音标括起来. 作者 老哇的爪子 Attilax 艾龙,  E ...

  7. python 读取SQLServer数据插入到MongoDB数据库中

    # -*- coding: utf-8 -*-import pyodbcimport osimport csvimport pymongofrom pymongo import ASCENDING, ...

  8. 极限挑战—C#100万条数据导入SQL SERVER数据库仅用4秒 (附源码)

    原文:极限挑战-C#100万条数据导入SQL SERVER数据库仅用4秒 (附源码) 实际工作中有时候需要把大量数据导入数据库,然后用于各种程序计算,本实验将使用5中方法完成这个过程,并详细记录各种方 ...

  9. 将DataTable 数据插入 SQL SERVER 数据库

    原文:将DataTable 数据插入 SQL SERVER 数据库 以下提供3中方式将DataTable中的数据插入到SQL SERVER 数据库: 一:使用sqlcommand.executenon ...

随机推荐

  1. javascript:没有定义的变量和没有定义的属性

    1. 没有定义的变量 window.onload = function() { alert(a); // 报错: Uncaught ReferenceError: a is not defined / ...

  2. numpy学习之创建数组

    1.使用array函数创建数组 import numpy as np ndarray1 = np.array([1, 2, 3]) array([1, 2, 3]) ndarray2 = np.arr ...

  3. 11.9luffycity(4)

    2018-11-9 17:57:09 明天开始自己独立写luffy部分表的接口, 越努力,越幸运!永远不要高估自己! 明天后天先不想下看视频,把接口做完,然后整理一下笔记,温故而习之,可以为师啊! 知 ...

  4. 振兴中华(dfs or dp )

    小明参加了学校的趣味运动会,其中的一个项目是:跳格子. 地上画着一些格子,每个格子里写一个字,如下所示:(也可参见p1.jpg) 从我做起振 我做起振兴 做起振兴中 起振兴中华 比赛时,先站在左上角的 ...

  5. ArcGIS AddIn 图斑比例分割工具,调用捕捉功能

    最近做一个图斑按比例分割的工具,需要绘制一条用以切割的方向线,通过Tool的方式实现 绘制时希望能够使用捕捉功能,查阅相关资料如下: 使用该文章,第Implementing snapping in a ...

  6. ie9 remove出错 jquery SCRIPT5007: 缺少对象

    针对IE11 remove不起作用的问题. 其中IE11.0.37也不支持 IE11.0.42支持可能是由于客户机器设置了兼容模式的原因. 因为里面包含了object元素,移除数据的时候发生的bug. ...

  7. CodeForces 733B Parade

    B. Parade time limit per test1 second memory limit per test256 megabytes inputstandard input outputs ...

  8. CH 2401 - 送礼 - [折半DFS+二分]

    题目链接:传送门 描述 作为惩罚,GY被遣送去帮助某神牛给女生送礼物(GY:貌似是个好差事)但是在GY看到礼物之后,他就不这么认为了.某神牛有N个礼物,且异常沉重,但是GY的力气也异常的大(-_-b) ...

  9. day15,内置函数一

    1,复习,如何从生成器里面取值,next(每次取一个值),send(不可以用在第一个,取下一个的时候,给上一个地方传一个值),for(没有break会一直取,直到取完),强制转换(会一次性把数据加载到 ...

  10. 表驱动方法(Table-Driven Methods)

    表驱动方法(Table-Driven Methods) - winner_0715 - 博客园 https://www.cnblogs.com/winner-0715/p/9382048.html W ...