This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VCF File: remove certain chromosomes

I have a few VCF files which contain chromosomes like GL000207.1 or NC_007605. I want to remove all GL* and NC* chromosomes from the VCF files.

Is VCF-tools capable of doing that or does a better approach exist?

Thanks!

sequencing

Hello fire_water!

See previous answers: How to extract specific chromosome from vcf file

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

1 answer

or just

grep -Ev '^(GL|NC)' input.vcf

Log in to answer this question.