This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract specific variants from vcf to annotate

Hi

I have a txt file that contains some variants with specific columns

Example from my txt file

chr5    140673  rs12516245  A   G

I want to extract variants that in txt from a large VCF file to a new VCF file. So a new VCF file just contain this variants with the header to annotate a new VCF file in the final step. How can I do this please?

I'm new in bioinformatics, please help me

vcf

Did you Google "extract from VCF" or "subset from VCF"? You may be new to bioinformatics but you must have tried something before posting here.

yes, I try to google it but I didn't find the answer ( I found how to subset samples or region for example ) but I didn't found how to subset like what I really need!

I found how to subset samples or region for example

You have then found the solution - your text file has the region information and you can use what you found to extract records overlapping those regions.

0 answers

No answers yet.

Log in to answer this question.