目录

问题

一直以来用Eigensoft的smartpca来做群体遗传的PCA分析很顺畅,结果也比较靠谱。

但今天报错如下:

$ ~/miniconda3/bin/smartpca -p smartpca.par
parameter file: smartpca.par
### THE INPUT PARAMETERS
##PARAMETER NAME: VALUE
genotypename: plink.ped
snpname: plink.pedsnp
indivname: plink.pedind
evecoutname: pca.vec
evaloutname: pca.val
numoutlieriter: 0
numchrom: 1000000
## smartpca version: 16000
norm used warning (mapfile): bad chrom: 100 100:1816 0 1816
warning (mapfile): bad chrom: 101 101:1388 0 1388
warning (mapfile): bad chrom: 101 101:1922 0 1922
warning (mapfile): bad chrom: 102 102:1286 0 1286
warning (mapfile): bad chrom: 103 103:867 0 867
warning (mapfile): bad chrom: 104 104:149 0 149
warning (mapfile): bad chrom: 105 105:1532 0 1532
warning (mapfile): bad chrom: 106 106:1201 0 1201
warning (mapfile): bad chrom: 107 107:1113 0 1113
warning (mapfile): bad chrom: 108 108:255 0 255
Segmentation fault

这个原因有可能是染色体号为0导致。smartpca中 ,0意味着染色体编号信息缺失。

检查我的map文件中第一列(染色体号),从1开始,并没有为0。以前用带chr或scaffold开头的染色体数据做过,也没有报错。

解决

在Google group上找到了原因。

I have got Smartpca within EIGENSOFT (6.0.1) to work without converting with convertf - it will take map/ped directly.  I have madified the output map/ped that stacks outputs.

EIGENSOFT and PLINK don't with thousands of chromosomes/contigs well - so I would suggest removing that info from the map file - replace the first column with all '1' for example.  I do have some chromosome info so I have chromosomes 1-37 for assigned loci and I used for '40' for unassigned loci.  I dont think smartpca likes a zero in the frist column of the map file.

example map file: 

[https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.map](https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.map)

ped file - I have the phenotype (col 6) set to missing (-9) and smartpca complains about it - but it works.  

example ped file:

[https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.ped](https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.ped)

example parfile:

[https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.parfile](https://github.com/rwaples/chum_populations/blob/master/results/batch_4/EIGENSOFT/complete.codom.subsample.parfile) 

-Ryan

https://groups.google.com/g/stacks-users/c/rkN9Q5G6hXg

可以看到smartpca并不支持上千条的scaffold/contig(查看了下我的数据,有3000多contigs),而在做PCA分析时,染色体号并不影响最终结果。因此可将很碎的contig统一一个染色体号。

sed 's/contig[0-9]*/20/g' map.vcf

最终得到所有材料PCA结果。

https://www.jianshu.com/p/bdf1bc116127

Eigensoft-smartpca分析PCA报错:warning (mapfile): bad chrom: Segmentation fault的更多相关文章

  1. (TODO:)下载图片,报错:warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.

    想使用NSInvocationOperation下载图片,然而并没有下载下来, NSData为nil, 还有报错:(打断点就报错) warning: could not load any Object ...

  2. ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE

    ecstore在MySQL5.7下维护报错WARNING:512 @ ALTER IGNORE TABLE 打开 /app/base/lib/application/dbtable.php , 替换A ...

  3. Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.

    问题:创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 3000 ...

  4. 【mysql报错】MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”

    MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”在命令行使用密码不安全警 ...

  5. scp执行报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

    linux环境执行scp时会遇到报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!,如下 [root@subsname home]# scp AAA. ...

  6. 关于报错:Warning: Cannot modify header information - headers already sent by (output started at

    8月5日,第一个项目即将完成,测试时,发现登录功能会出现小问题:记住密码的时候会报错 Warning: Cannot modify header information - headers alrea ...

  7. VS C++项目报错warning C4199: ……use /Zc:twoPhase-

    具体的报错如下: c1xx : warning C4199: two-phase name lookup is not supported for C++/CLI, C++/CX, or OpenMP ...

  8. 支付宝支付php的demo或sdk报错 Warning: openssl_sign() [function.openssl-sign]: Unknown signature algorithm. in

    最近在做支付宝支付,在本地测试一切正常,上传到服务器就遇到报错: Warning: openssl_sign() [function.openssl-sign]: Unknown signature ...

  9. php项目报错 Warning: session_start(): open(D:/software/wamp/wamp/tmp\sess_msrjot7f32ciqb1p2hr4ahejg4, O_RDWR) f

    今天一个php项目报错: Warning: session_start(): open(D:/software/wamp/wamp/tmp\sess_msrjot7f32ciqb1p2hr4ahejg ...

随机推荐

  1. 240.搜索二维矩阵II

    从左下角位置开始搜索 时间复杂度:O(行数+列数). 想法有点像二分法,大了往一个方向找,小了往另一个方向找.由于矩阵横向和纵向都是递增,如果从(0,0)位置开始找,往右和往下都是增大,因此不知道实际 ...

  2. 分布式表示(Distributed Representation)

    NLP模型笔记 - 分布式表示 ziuno 2020-03-08 19:52:50 410 收藏 2 分类专栏: NLP 模型 笔记 文章标签: nlp 最后发布:2020-03-08 19:52:5 ...

  3. 【Python从入门到精通】(二)怎么运行Python呢?有哪些好的开发工具(PyCharm)

    您好,我是码农飞哥,感谢您阅读本文,欢迎一键三连哦. 这是Pyhon系列文章的第二篇,本文主要介绍如何运行Python程序以及安装PyCharm开发工具. 干货满满,建议收藏,需要用到时常看看. 小伙 ...

  4. HttpClient使用GET方式通过代理服务器读取页面的例子

    import java.io.BufferedReader;import java.io.InputStreamReader;import org.apache.http.HttpEntity;imp ...

  5. AIApe问答机器人Scrum Meeting 5.1

    Scrum Meeting 5 日期:2021年5月1日 会议主要内容概述:汇报两日工作. 一.进度情况 组员 负责 两日内已完成的工作 后两日计划完成的工作 工作中遇到的困难 李明昕 后端 Task ...

  6. 关于string转换为wstring问题

    方法一:需要调用windows的api函数进行转换,在vs2017上试验转换成功 #ifdef _MSC_VER #include <Windows.h> #endif // _MSC_V ...

  7. 攻防世界 杂项 10.2017_Dating_in_Singapore

    题目描述: 01081522291516170310172431-050607132027262728-0102030209162330-02091623020310090910172423-0201 ...

  8. 算法:N-gram语法

    一.N-gram介绍 n元语法(英语:N-gram)指文本中连续出现的n个语词.n元语法模型是基于(n - 1)阶马尔可夫链的一种概率语言模型,通过n个语词出现的概率来推断语句的结构.这一模型被广泛应 ...

  9. Python matplotlib pylab 画张图

    from pylab import * w1 = 1 w2 = 25 fs = 18 y = np.arange(-2,2,0.001) x = w1*y*log(y)-1.0/w2*exp(-(w2 ...

  10. 最短路计数(SPFA× Dijkstra√)

    题目描述 给出一个n个顶点m条边的无向无权图,顶点编号为1−n.问从顶点1开始,到其他每个点的最短路有几条. 输入格式 第一行包含2个正整数n,m,为图的顶点数与边数. 接下来M行,每行2个正整数x, ...