Issues with identifying chromosomes for a list of SNPs
1
1
Entering edit mode
3.5 years ago
ks.sholohova ▴ 30

Hello everyone!

Today I was trying to check whether all SNPs in my list (thousands of SNPs, GRCh37) belong to the particular chromosome (let's say chr 19) but I had some issues with it. I am doing everything on R and my strategy was this:

  1. To prepare list of SNP as a file (all starts with rs...)
  2. To download the human chromosome 19 from dbSNP
  3. To search my list as a pattern within downloaded chromosome

However, downloading process of chr 19 is going on for many hours already... And the fastest download option doesn't give the proper information for analysis.

I would love to know whether there is another way to check the list of SNPs for belonging to the particular chromosome in R?

Thanks in advance!

SNP R genome • 754 views
ADD COMMENT
0
Entering edit mode

Can you provide the code you are using for this and some example data?

ADD REPLY
0
Entering edit mode

I'm sorry that I did not reply to you! I am a bit new to bioinformatics and could not find a proper example data. However, @zx8754 helped me to resolve this question. May you have a nice day!

ADD REPLY
2
Entering edit mode
3.5 years ago
zx8754 11k

Usign biomaRt:

#set up
library(biomaRt)
snpmart = useEnsembl(biomart = "snp", dataset="hsapiens_snp")
#Other useful functions
# listAttributes(snpmart)
# listFilters(snpmart)

Get SNPs that match with our list of IDs, here we have 2 SNP from chr1 and 1 SNPs from chr2:

getBM(attributes = c("refsnp_id", "chr_name", "chrom_start", "chrom_end"), 
      filters = c("snp_filter"), 
      values = list(c("rs17599629", "rs1218582", "rs11902236")),
      mart = snpmart)

#    refsnp_id chr_name chrom_start chrom_end
# 1 rs11902236        2     9977740   9977740
# 2  rs1218582        1   154861707 154861707
# 3 rs17599629        1   150685811 150685811

Now, to return only the ones which are on chr2, we can add "chr_name" filter:

getBM(attributes = c("refsnp_id", "chr_name", "chrom_start", "chrom_end"), 
      filters = c("chr_name", "snp_filter"), 
      values = list(c(2),
                    c("rs17599629", "rs1218582", "rs11902236")), 
      mart = snpmart)

#   refsnp_id chr_name chrom_start chrom_end
# 1 rs11902236        2     9977740   9977740
ADD COMMENT
0
Entering edit mode

Thank you very much for such a nice explanation! May you have a nice day!

ADD REPLY

Login before adding your answer.

Traffic: 2781 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