1
$\begingroup$

Where can I find a list of SNP rs IDs that belong to the X chromosome?

I'm trying to exclude the SNPs on X-chromosome in a data set, but I don't know where these SNPs come from.

I tried to use dbSNP to search, it returns 26933249 SNPs, but the webpage seems to refuse me to download the information.

$\endgroup$
2
  • $\begingroup$ Have you tried the send to option in the top right corner, just below the search bar? $\endgroup$
    – arup
    Jan 12 '18 at 5:49
  • 3
    $\begingroup$ In what species? Your search didn't specify a species, are you really interested in rsIDs from any species? $\endgroup$
    – terdon
    Jan 12 '18 at 9:16
6
$\begingroup$

You just searched for X[Chromosome], you didn't specify a species. Presumably, your dataset comes from a specific species, so you should limit your search to that species. For instance, for human, you can search dbSNP for X[Chromosome] human[organism]. Then, click on the send to link at the top left and download the data:

dbSNP screenshot

This is veeeeeery slow, however. I suggest that you instead download the data for chrX from dbSNP's FTP site (this assumes your species of interest is human): ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/chr_rpts/chr_X.txt.gz

Once you have this file, you can use it to filter your dataset:

  1. Collect all rsIDs from the file:

    zcat chr_X.txt.gz | awk '/^[0-9]/{print "rs"$1}' > chrX.rsIDs
    
  2. Filter your dataset.

    You haven't shown the format of your dataset, so if it is just a list of rsIDs like this:

    $ cat dataset
    rs77669712
    rs199706910
    rs2799940 
    rs12205639
    rs10958205
    rs200778574
    

    You can remove any that are on chrX with:

    $ grep -vxFf chrX.rsIDs dataset 
    rs77669712
    rs199706910
    rs12205639
    rs10958205
    rs200778574
    

    That will print all rsIDs from the text file dataset that are not also in the text file chrX.rsIDs. Note the -x option for grep which tells it to only consider matches that cover the entire line. This ensures that rs1234 is not removed when you're looking for rs123.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.