extract entire header from BED file to FASTA

extract entire header from BED file to FASTA

1

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

• 23 views

Read more here: Source link