Specify hg19 in using biomaRt getBM function
1
0
Entering edit mode
lei.shang • 0
@60d92976
Last seen 3.1 years ago
Puerto Rico

Hi there, I was trying to use getBM to convert rsID to chromosome coordinate. My code is as below, but it give me h38 coordinates. Is there anyway to specify the genome build to get hg19 chromosome position?


snp_ids=scan(infile, character(), quote="")
snp_mart = useMart("ENSEMBL_MART_SNP", dataset="hsapiens_snp")
snp_attributes = c("refsnp_id", "chr_name", "chrom_start")

snp_locations = getBM(attributes=snp_attributes,
                      filters="snp_filter", 
                      values=snp_ids,
                      mart=snp_mart,
                      useCache=FALSE)
biomaRt biom • 3.1k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 24 minutes ago
United States

You can use the archive.

> mart <- useEnsembl("ENSEMBL_MART_SNP","hsapiens_snp", "https://feb2014.archive.ensembl.org")
> getBM(c("refsnp_id","chr_name","chrom_start"), "snp_filter", "rs232423", mart)
  refsnp_id chr_name chrom_start
1  rs232423       21    22755223
> newmart <- useEnsembl("ENSEMBL_MART_SNP","hsapiens_snp")
> getBM(c("refsnp_id","chr_name","chrom_start"), "snp_filter", "rs232423", newmart)
  refsnp_id chr_name chrom_start
1  rs232423       21    21382903
ADD COMMENT

Login before adding your answer.

Traffic: 846 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6