Identify the nearest common SNP to a given rare variant
2
0
Entering edit mode
6.1 years ago
bisansamara ▴ 20

I have a list of rare single nucleotide variations (SNVs), and I would like to identify the nearest common SNP to each from both ends.


The input information would be the coordinates of the SNVs (something like this: chr7:127991052, chr18:321720, chr5:76174154, etc.). The output I need is the nearest SNP to each SNV (both upstream and downstream).


What tools could perform this task? Your help is much appreciated!

variant-analysis SNV SNP • 1.2k views
ADD COMMENT
0
Entering edit mode
6.1 years ago

assuming the file is sorted

grep -A 1 -B 1 -F 'chr7:127991052' input.txt
ADD COMMENT
0
Entering edit mode
6.1 years ago

Via BEDOPS:

$ vcf2bed < list.vcf > list.bed
$ vcf2bed < snps.vcf > snps.bed
$ closest-features list.bed snps.bed > answer.bed
ADD COMMENT
0
Entering edit mode

This seems like a good tool. But it's taking forever to convert the dbSNP file (downloaded from NCBI) from csv to bed....any suggestions? Note that I'm using Cygwin on Windows to run the commands.

ADD REPLY
0
Entering edit mode

To get around limitations in /tmp you could specify an alternative temporary directory for sorting. Add --sort-tmpdir=<dir> and (for example) --max-mem=2g to do sorting in a non-temporary (non /tmp) directory and to sort with 2GB of system memory. See --help or the online documentation for more detail.

ADD REPLY

Login before adding your answer.

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