使用bcftools query -l test.vcf > 453.list 将vcf文件中的样品名提取出来
不使用软件:
head -100 all.vcf |grep “#C” |cut -f10-|xargs -n 1 > wild.txt
使用sh脚本
# 将453份数据写入变量$sample
for sample in $(cat 453.list);
#创建每个样本的list文件
do touch list/$sample.list;
#将样本写入每个文件
#echo $sample >> list/$sample.list;
#使用bcftools提取
do bcftools view -S list/$sample.list /public/home/lianglunping/work/SV/453.vcf>/public/home/lianglunping/work/SV/453/$sample.vcf;
done
for sample in $(cat t1);
do
echo $sample >> list/$sample
bcftools view -S list/$sample 3k.vcf >test/$sample.vcf
done
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END
- 最新
- 最热
只看作者