Hello everybody, I am not and expert with sed and I am sure that someone will do this work faster and better than me.
I would like to edit multiple fasta header from this format.
>M01380:50:000000000-AV1DH:1:1101:16094:3001 1:N:0:M636:16S_V1V3 TTCTGCCT|0|TAGACCTA|0 CS1_534R_YM3_for|3|27|
to this one:
>M636
As you can see "M636" is embedded in the mayor header.
Thank you for always helping everybody!
D.
Sure. But did you try anything?
Just a comment:
There will always be people ahead of us. But this shouldn't hinder our learning :)
Hello @venu
Sure, I am trying with sed (since awk seems to be more complicated). This post from @noirot.celine gave me some ideas of what to do ( A: Renaming Entries In A Fasta File ). But I am having a hard time figuring out the regular expressions.
I understand your concern. I will keep trying... :)
Please use
ADD COMMENT
orADD REPLY
to answer to previous reactions, as such this thread remains logically structured and easy to follow. I have now moved your post but as you can see it's not optimal. Adding an answer should only be used for providing a solution to the question asked.Thank you all for your solutions,
Seidel's proposal worked beautifully!
Thanks also @novice, however maybe I did not explain well myself but the "M" may change to other letter or not be present.
Please use
ADD COMMENT
orADD REPLY
to answer to previous reactions, as such this thread remains logically structured and easy to follow. I have now moved your post but as you can see it's not optimal. Adding an answer should only be used for providing a solution to the question asked.If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.