extract entire header from BED file to FASTA
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.
• 1,079 views
•
link
1 answer
Try:
bedtools getfasta -fi hg19.fa -bed file.bed -fo test.fasta -name
• 0 views
•
link
Log in to answer this question.