Question: merge vcf file
0
gravatar for cristina_sabiers
3.5 years ago by
Spain
cristina_sabiers70 wrote:

well I read in one of the post I could do like this, merge both vcf files

cat 2.vcf 4.vcf > 24.vcf

but when I check at my 24.vcf file I miss some of the chr positions from 4.vcf...

so I asume this code is not valid for vcf files right?

Thanks

vcf • 2.1k views
ADD COMMENTlink written 3.5 years ago by cristina_sabiers70
1

Yes, you might try using vcftools merge https://vcftools.github.io/examples.html

ADD REPLYlink written 3.5 years ago by hns150

ok thanks..I was just wondering if was possible or not....

I try now merge with vcftools

What would be the opposite of merge?

I mean for example I want take out from 4.vcf all gens in comon with 2.vcf

Thanks!

ADD REPLYlink written 3.5 years ago by cristina_sabiers70
1

http://vcftools.sourceforge.net/perl_module.html#vcf-merge
https://samtools.github.io/bcftools/bcftools.html#merge

ADD REPLYlink written 3.5 years ago by genomax78k

thanks genomax!

What would be the opposite of merge?

I mean for example I want take out from 4.vcf all gens in comon with 2.vcf

ADD REPLYlink written 3.5 years ago by cristina_sabiers70
1

Google "vcf intersect". That is the operation you're looking for. bedtools should have it.

ADD REPLYlink written 3.5 years ago by RamRS25k

ok! thanks a lot ram!

ADD REPLYlink written 3.5 years ago by cristina_sabiers70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 961 users visited in the last hour