Hi,
You can get the gvcftools package here:
https://sites.google.com/site/gvcftools/home/download
This package contains the 'break_blocks' tool which will extract a set of sites overlapping with the regions in bed file -- this seems like it could cover your workflow.
As an example, if you format your chrom/position list into a bed file called 'my_regions.bed', then this command would uncompress and extract these regions:
gzip -dc sample.genome.vcf.gz | break_blocks --region-file my_regions.bed --ref hg19.fa --exclude-off-target > output.vcf
If you also wanted to ensure that any variants not overlapped by your bed file regions are included in the output, add the 'include-variants' argument:
gzip -dc sample.genome.vcf.gz | break_blocks --region-file my_regions.bed --ref hg19.fa --exclude-off-target --include-variants > output.vcf
The full break_blocks usage is:
break_blocks converts non-reference blocks to individual positions in specified regions
usage: break_blocks [options] < (g)VCF > unblocked_(g)VCF
options:
configuration:
--region-file arg A bed file specifying regions where call blocks should
be broken into individual positions (required)
--ref arg samtools reference sequence (required)
--exclude-off-target Don't output off-target vcf records. 'targeted' records
include all those intersecting the input region plus
any optionally included types specified below (default:
output all records)
--include-variants Add all variant calls to the targeted record set (only
applies when exclude-off-target is used)
help:
-h [ --help ] print this message