Entering edit mode
8.4 years ago
Having the OrthoFinder output file, I want to delete all of the orthologous groups except those who share the protein code 0014| or 0023|. A sample of the output file is next shown:
OG0003945: 0007|194963.15.peg.4284 0014|379.23.peg.4854 0014|379.23.peg.295
OG0003946: 0023|379.49.peg.6173 0014|379.23.peg.2147 0014|379.23.peg.4156
OG0003947: 0014|379.23.peg.3574 0014|379.23.peg.3573 0023|379.49.peg.3001
OG0003948: 0014|379.23.peg.113 0023|379.49.peg.338 0014|379.23.peg.3632
OG0003949: 0014|379.23.peg.3636 0014|379.23.peg.215 0023|379.49.peg.5154
I want to keep the OG's having 0014| AND 0023|, even if repeated or despite the order they have in the line (every OG is a line); and delete everything else not fitting this requirements (e.g.: 0014| + 0023| + 0007|).
Any guidance will be pleasantly received. Thank you, guys.