Biostar Beta. Not for public use.
Identify the nearest common SNP to a given rare variant
0
Entering edit mode
2.2 years ago
bisansamara • 10

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!

ADD COMMENTlink
0
Entering edit mode
15 months ago
France/Nantes/Institut du Thorax - INSE…

assuming the file is sorted

grep -A 1 -B 1 -F 'chr7:127991052' input.txt
ADD COMMENTlink
0
Entering edit mode
16 months ago
Seattle, WA USA

Via BEDOPS:

$ vcf2bed < list.vcf > list.bed
$ vcf2bed < snps.vcf > snps.bed
$ closest-features list.bed snps.bed > answer.bed
ADD COMMENTlink
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 REPLYlink
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 REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3