Hello,
So, I have a bed file and a fasta reference file. I want to generate a fasta file corresponding to the bed file. I have success generating this but I just have a small problem. First, I use the command :
bedtools getfasta -fi ref.fa -bed in.bed -fo out.fa -name -s -fullHeader
And I get the result like this:
>GENENAME
CTGATGATAGATAG
Second, I use command:
bedtools getfasta -fi ref.fa -bed in.bed -fo out.fa -s -fullHeader
I get the result like this
>1:13343-22332(+)
CTGATGATAGATAG
What I want to get is the complete header like below
>GENENAME range=1:13343-22332 5'pad=0 3'pad=0 strand=+ repeatMasking=none
CTGATGATAGATAG
I know, I can write my own code to adjust the result like I want but probably someone here knows how to generate the result like I want. The bed ffile is a tab-separated file with header like below:
Chromosome Start End GeneName Length Strand
Thank you for any suggestion.