Entering edit mode
Voke AO
▴
760
@voke-ao-4830
Last seen 10.3 years ago
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.
> 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