This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Ucsc Dbsnp131 Table Format

Hi, I want to create a bed file that contains leftflank-rightflank positions of a subset of dbsnp131 table I downloaded from UCSC. The problem is when I look at the data there are two fileds chromStart and ChromEnd but in most cases that I saw these were sequencial numbers like Chr1 134567 134568 .So what do those chrStart and chromEnd positions exactly mean and how can I get a leftflank-right flank position data for the snps that I am interested in? Thanks

mysql> select * from snp131 limit 10;

bin | chrom | chromStart | chromEnd | name| score | strand | refNCBI | refUCSC | observed | molType

| 585 | chr1 | 10433 | 10433 | rs56289060 | 0 | + | - | - | -/C | genomic | insertion | unknown | 0 | 0 | near-gene-5 | between | 1 |

| 585 | chr1 | 10491 | 10492 | rs55998931 | 0 | + | C | C | C/T | genomic | single | unknown | 0 | 0 | near-gene-5 | exact | 1 |

| 585 | chr1 | 10518 | 10519 | rs62636508 | 0 | + | G | G | C/G | genomic | single | unknown | 0 | 0 | near-gene-5 | exact | 1 |

dbsnp bed ucsc

2 answers

It is an half-open interval.

chromStart: is the starting position ( 0-based) of the SNP on the chromosome

chromEnd: is the position where there is NO MORE snp.

so chromEnd-chromStart = length of the variation. e.g. if length=0, the SNP is a deletion

SO for a Single nucleotide variation chromstart is actually where the variation occures and the leftflank would be chromstart-1 while the rightflank would be chromEnd, right?

and

BedTools has commands to retreive (boundary) sequences from the fasta ref genome and a BED file

the current SNP track first need be processed to add few bases each side using yet another bed tool. Then you get the fasta sequences with fastaFromBed

have a look to the version v2.9.0 manual about the command details slopBed (get bordering bases) fastaFromBed (extract resulting sequences)

I love BedTools !

Cheers, Stephane, BITS-VIB

Log in to answer this question.