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

我们经常说幻想着使用已有数据发表高分文章,的确,这样的童话故事每天都在发生,但如何走出第一步我们很多小伙伴不清楚,那么我们就从水稻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. [3]java1.8线程池—ThreadPoolExecutor

    Wiki 上是这样解释的:Thread Pool 作用:利用线程池可以大大减少在创建和销毁线程上所花的时间以及系统资源的开销! 下面主要讲下线程池中最重要的一个类 ThreadPoolExecutor ...

  2. JS设计模式——观察者模式(通俗易懂)

    Observer模式的概念 Observer模式是行为模式之一,它的作用是当一个对象的状态发生变化时,能够自动通知其他关联对象,自动刷新对象状态. Observer模式提供给关联对象一种同步通信的手段 ...

  3. MonoDevelop ctrl + ' 不能定位正确的unity文档

    Just Do This I had the same problem in MonoDevalop, but the url in it cannot be changed. So I tried ...

  4. 解决FAT32格式U盘安装win10时0x8007000D错误

    问题由来 我一直使用U盘,UltraISO软碟通和msdn原版镜像来装系统.最近在把Win10 1709升级为1803时遇到了问题.同样也是使用UltraISO刻录镜像到U盘的方法安装的,这次从U盘启 ...

  5. 读《javascript语法精粹》知识点总结

    昨天泡了大半天的读书馆,一口气看完了<javascript语法精粹>这本书,总体来说这本书还是写的不错,难怪那么多的推荐.<javascript语法精粹>主要是归纳与总结了ja ...

  6. 使用call、apply和bind解决js中烦人的this,事件绑定时的this和传参问题

    1.什么是this 在JavaScript中this可以是全局对象.当前对象或者任意对象,这完全取决于函数的调用方式,this 绑定的对象即函数执行的上下文环境(context). 为了帮助理解,让我 ...

  7. cloud_note项目

    导入mysql数据库: set names utf8; source cloud_note.sql 1.搭建springMvc+springIOc+Mybatis --引入jar包 ioc,aop,d ...

  8. linux_rename命令用法

    rename在man中的解释为: NAME rename - rename files SYNOPSIS rename [options] expression replacement file... ...

  9. 线程同步-使用ReaderWriterLockSlim类

    使用ReaderWriterLockSlim创建一个线程安全的机制,在多线程中对一个集合进行读写操作.ReaderWriterLockSlim代表了一个管理资源访问的锁,允许多个线程同时读取,以及独占 ...

  10. sql server创建windows账户

    --不要干坏事 sql server中使用xp_cmdshell --1.允许配置高级选项 GO RECONFIGURE GO --2.开启xp_cmdshell服务 RECONFIGURE GO - ...