Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to merge vcf files of different sample

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

I hope you can read it carefully and be able to achieve something!

Through the GATK calling out of the SNP if you use UnifiedGenotype to get the SNP file is sub-sample, but if you use vcftools or ANGSD then you need to Vcf file is multi-sample, here we need to merge different samples files, can be carried out through the vcftools perl module, but this way of perl requirements are higher, and the operation is more complex, here we choose to use Bcftools, easy to operate.

There are three steps:

The method of compressing and batch compressing vcf:

Bgzip-c-f-@ 10 merge.vcf > merge.vcf.gz-c,-- stdout write on standard output, keep original files unchanged-f,-- force overwrite files without asking-@,-- threads INT number of compression threads to use [1]

two。 Index the generated vcf.gz:

Bcftools index [options] |-t,-- tbi generate TBI-format index for VCF files

3. Merge operation:

Bcftools merge [options] [...]-m,-- merge allow multiallelic records for, see man page for details [both]-o,-- output write output to a file [standard output]-O,-- output-type 'b'compressed BCF; 'u'uncompressed BCF; 'z'compressed VCF 'v'uncompressed VCF [v]-l,-- file-list read file names from the file "how to merge vcf files from different sample" ends here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report