Entering edit mode
5.7 years ago
erickfqqa
▴
20
Hello, I'm trying to trim the next fasta headers
>ID:CHARACTERS | [Genus specie] | strain | gene_name | length | NCBI_ID | other | other | other|
>ID:CHARACTERS | [Genus specie | strain | gene_name | length | NCBI_ID | other | other | other|
And I 'd like to trim them like the following example
>ID:CHARACTERS | [Genus specie] | strain | gene_name |
the ID:CHARATERS, [Genus specie], strain and gene_name are variables accross the headers, but always are separated by "space|space"
Your fasta headers are identical, this will create problems for most downstream tools. You can do what you want with sed:
And can you elaborate on what you tried and how that didn't deliver the result you had in mind?