there are various approaches

if you have

ALL.chr17.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.gz

in current folder, the following code shows one way

snpsInGene = function(gr, vcf, genotag="hg19", ...) {
 p = ScanVcfParam(which=gr, ,...)
 geno(readVcf(vcf, genome=genotag, param=p))$GT
}

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb = TxDb.Hsapiens.UCSC.hg19.knownGene
txg = transcriptsBy(txdb, by="gene")
#
# prepare for entrez gene 47 (ACLY)
#
acly.gr = reduce(txg$"47")
seqlevels(acly.gr) = gsub("chr", "", seqlevels(acly.gr))
fn = "ALL.chr17.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.gz"
inacly = snpsInGene( acly.gr, fn, geno="GT", info=NA)

> dim(inacly)
[1]  545 1092
> inacly[1:5,1:5]
            HG00096 HG00097 HG00099 HG00100 HG00101
rs184327140 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs146150856 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs7713      "0|0"   "1|0"   "0|0"   "0|0"   "0|0"
rs140162090 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"
rs189951396 "0|0"   "0|0"   "0|0"   "0|0"   "0|0"

how to map from sample IDs to populations is another matter.  this is a good
use case so more infrastructure should probably be ready to hand.

On Sat, Jul 20, 2013 at 8:21 AM, Prashantha Hebbar <
prashantha.hebbar@yahoo.com> wrote:

> Hello friends,
>
> I have list of 120 genes and
> associated SNPs information of a cancer and want to find selection
> pressure in specific population using SNP information from 1000 genome.
> To do that I need genotype information for SNPs present in those genes
> from 1000 genome. Hence, any sort of suggestion to retrieve such
> information in automated way from 1000 genome would be helpful.
>
> Regards,
> prashantha
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

