bedtools2
bedtools2 copied to clipboard
Feature request: getfasta extract name or ID from GFF3 attributes field
Hi,
thanks for a great package.
With the getfasta tool, the -name option appears to only refer to the name column from an input BED file. It would be great if the GFF3 attributes ID or Name could be used alternatively to get nicely named fasta headers. (ID="myId";Name="myName")
Usage: bedtools getfasta [OPTIONS] -fi
-name Use the name field for the FASTA header
Thanks a lot, Colin
:+1: Yes, please!
Agree this would be nice!
I'm not sure this is possible without breaking downstream tools, see https://github.com/arq5x/bedtools2/issues/406
Hmm. Well if anyone else encounters this was my simple workaround to get the name info into the right field:
cut -f 1,2 example.gff > in1.tmp
cut -f 4-9 example.gff > in2.tmp
cut -f 9 example.gff | cut -f 1 -d ";" | cut -f 2 -d "=" | paste in1.tmp - in2.tmp > fixed.gff