How do I get the 3bp sequence on either side of a co-ordinate
1
0
Entering edit mode
18 days ago
nrav58 • 0

Hi all,

After I generate BAM or SAM files from my data, and have the coordinates of the 5' end of each read, how can I get the 3bp sequence on either side of this co-ordinate (total 6bp sequence) from the reference genome?

SAM genomics sequencing • 265 views
ADD COMMENT
1
Entering edit mode
18 days ago
Adam ▴ 30

I recommend bedtools. Start by expanding your 5' coordinates by the 3bp.

bedtools slop -b 3 -i five_prime.bed -g my_genome.fa.fai > five_prime_window.bed

Then, get those sequences from your genome.

bedtools getfasta -fi my_genome.fa -bed five_prime_window.bed
ADD COMMENT

Login before adding your answer.

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