I have a series of strings in a file of the format:
>HEADER_Text1
Information here, yada yada yada
Some more information here, yada yada yada
Even some more i
You really don't want a regex. And for this job, python and biopython are superfluous. If that's actually FASTQ format, just use sed
:
sed '/^>/ { N; N; N; s/\n/ /2g }' file
Results:
>HEADER_Text1
Information here, yada yada yada Some more information here, yada yada yada Even some more information here, yada yada yada
>HEADER_Text2
Information here, yada yada yada Some more information here, yada yada yada Even some more information here, yada yada yada
>HEADER_Text3
Information here, yada yada yada Some more information here, yada yada yada Even some more information here, yada yada yada