2012年12月7日星期五

Extract private SNPs from multi-sample VCF file

http://www.biostars.org/p/58687/



I would use awk to find one sample having a genotype!="0/0"
 gunzip -c my.vcf.gz |
awk -F ' ' '/^#/{print; next;} {n=0; for(i=10;i<=NF;++i) { if($i!="." &&  index($i,"0/0")==0) n++;} if(n==1) print; } '
change the test according to your needs.

没有评论:

发表评论