... print it out with the string to insert at the end ...
Doesn't that leave you with a 'nnnnnwhatevernnnnn' "joiner" sequence pasted at the end of the last line of the file? My interpretation of the OP was that joiners should be pasted only between the "contig" sequences. (But I have done no testing of your code.)
In reply to Re^2: merge sequences with new sequence insertion
by AnomalousMonk
in thread merge sequences with new sequence insertion
by utpalmtbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |