On Sat, Nov 3, 2012 at 6:15 AM, Ovokeraye Achinike-Oduaran <
ovokeraye@gmail.com> wrote:

> Hi all,
>
> I've been trying to retrieve SNP rsids using biomaRt for a number of
> SNPs where I have their positions. My input file looks like this:
>
> 1 888899000 888899000
>
> where,
> 1 = chromosome number and the second and third numbers are the
> position of the SNP.
>
> My code looks like this:
>
> library(biomaRt)
> mart2 = useMart(biomart="snp", dataset="hsapiens_snp")
> AFRASN=read.delim("AFR_ASN_neg8P_no_rsids.txt", header = TRUE)
> results = getBM(attributes = c("refsnp_id", "allele","chr_name",
>         "chrom_strand","consequence_type_tv"),
>         filters = "chromosomal_region", values = AFRASN$CHR, mart = mart2)
>
> I must be doing something wrong because it's not working for me. Any
> suggestions will be greatly appreciated.
>
>
your filter/value spec does not seem valid.  i do not know how to determine
validity.  but
the following yields 23 records

results = getBM(attributes = c("refsnp_id", "allele","chr_name",
        "chrom_strand","consequence_type_tv"),
        filters = c("chr_name", "chrom_start", "chrom_end"),
values=list("20",
     100000, 101000), mart=mart2)



> > sessionInfo()
> R version 2.15.0 (2012-03-30)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=English_.1252  LC_CTYPE=English_.1252
> [3] LC_MONETARY=English_.1252 LC_NUMERIC=C
> [5] LC_TIME=English_.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] biomaRt_2.12.0
>
> loaded via a namespace (and not attached):
> [1] RCurl_1.91-1.1 XML_3.9-4.1
> >
>
> Regards,
>
> Avoks
>
> _______________________________________________
> 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]]

