Entering edit mode
2.4 years ago
genomes_and_MGEs
▴
10
Hi everyone,
I have a multi-fasta file name multi.fasta with the following structure:
>A 124 B
ATCGTA...
>C 567 D
GTCAG...
My goal is to create a new file, with the new fasta-headers containing only the first and last column. If I use
awk -F" " '/>/ {print $1,$(NF)}' multi-fasta > modified_multi-fasta
This will print the fasta headers with the first and last columns, but won't print the nucleotide sequences. Can you guys please help me out?