extract entire header from BED file to FASTA
1
0
Entering edit mode
2.8 years ago
amitpande74 ▴ 20

Hi,

Is there any way one can extract the entire header from a BED file while using bedtools getfasta command and write it in the FASTA output ?

Have tried using bedtools getfasta -fi hg19.fa -bed file.bed -fo test.fasta -fullHeader but it doesnt work somehow.

if this is the BED region:

chr1    152811364   152811709   annotation

the output

>chr1:152811364-152811709
ttatttatttatttatttatttatttttttattatactttaagttttagggtacatgtgcacattgtgc

should be

>chr1:152811364-152811709 | annotation
ttatttatttatttatttatttatttttttattatactttaagttttagggtacatgtgcacattgtgc

any ideas. Thanks.

bedtools getfasta • 639 views
ADD COMMENT
1
Entering edit mode
2.8 years ago
liorglic ★ 1.4k

Try:

bedtools getfasta -fi hg19.fa -bed file.bed -fo test.fasta -name
ADD COMMENT

Login before adding your answer.

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