How extract specific SNP position from the bed file-Bedtools
1
0
Entering edit mode
8 days ago
LionisOne • 0

I have one bed file with start and end coordinate (range in bed format). I need to extract a specific position from this range bed (for example I need to extract "chr12 25392999" position from the below bed file). How can I do that? could you anyone please help? Appreciate your help! Thanks in advance!

my example bed file looks like this ------>

chr12   25392977    25393116    KRAS_Intron2_Amp7
bedtools for Help • 264 views
ADD COMMENT
0
Entering edit mode
8 days ago
awk -F '\t' '($1=="chr12" && int($2)<= 25392999 && 25392999 <= int($3))'

adjust < , and <= according to : Cheat Sheet For One-Based Vs Zero-Based Coordinate Systems

or

index your bed with tabix and

tabix your.bed.gz "chr12:25392999-25392999"

or

convert your query to bed and

bedtools intersect -wa -u -a database.bed -b query.bed
ADD COMMENT
0
Entering edit mode

@Pierre Lindenbaum Thanks a lot! Its a great help! I will check and let you know.

ADD REPLY

Login before adding your answer.

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