解决invalid record found in VCF4 file (at least 8 tab-delimited fields expected)问题

Posted 橙子牛奶糖

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决invalid record found in VCF4 file (at least 8 tab-delimited fields expected)问题相关的知识,希望对你有一定的参考价值。

出现这种问题说明一般存在两个问题:

第一,vcf文件不足8个分割制表符,比如像如下文件:

为了解决这个问题,说明在做snp filter时候,需要提取至少8个制表符的字符串,比如,像如下文件所示:

第二个问题:字符串之间是非制表符分隔的,比如下图:

显然,上图字符串之间的间隔只有一个空格,因此需要将空格改为制表符格式,可以用以下脚本修改:

perl -alne \'{print "$F[0]\\t$F[1]\\t$F[2]\\t$F[3]\\t$F[4]\\t$F[5]\\t$F[6]\\t$F[7]\\t$F[8]\\t$F[9]"}\' inputfile >outputfile

  对于多个文件,可用以下循环命令:

for i in *.inputfile
do
echo $i
perl -alne \'{print "$F[0]\\t$F[1]\\t$F[2]\\t$F[3]\\t$F[4]\\t$F[5]\\t$F[6]\\t$F[7]\\t$F[8]\\t$F[9]"}\' $i >${i%%.*}.outputfile
done

  最后,转化的效果如下:

从上图可以 看出,字符串之间的间隔拉大了,即已经变为制表格格式。

以上是关于解决invalid record found in VCF4 file (at least 8 tab-delimited fields expected)问题的主要内容,如果未能解决你的问题,请参考以下文章

Invalid character found in method name. HTTP method names must be tokens 解决办法

解决:Invalid character found in method name. HTTP method names must be tokens

解决 Invalid character found in method name. HTTP method names must be tokens 异常信息

解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF

解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF

解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF