Hello I have a txt file that consists from CHROM,ID,POS, REF and ALT ( 48 variants ) I want to subset this txt with original VCF to make a new VCF I try to use bcftools using this query
bcftools view -T variants.txt mydata.vcf > variant1.vcf
but the problem , I have 4 variants in txt that don't have ID ( The ID of them = . ) and bcftools delete this 4 variants ( So my new VCF = 44 variants )
how can I save this 4 variants and don't delete them , So, my new VCF must be 48?
Refresh : I try to make my txt file consists from CHROM and POS only and try this code :
bcftools view -R variants.txt mydata.vcf.gz > variant1.vcf
but the results : I get 60 variants (+12 variants) I guess ( but I'm not sure ) it add also any variants between 2 number that I really want. for example : ch3 have 2 locations :14933179 and 195781647 but when I do bcftools view -R , it have 8 locations: 14933179, 195781570, 195781607, 195781618 , 195781619 , 195781628 ,195781635 and 195781647
So , how can I print just my 48 variants without adding or losing :) ?