How about something like this:
#!/usr/bin/perl use warnings; use 5.12.4; my $string = "NNNNNCATTCCATTCATTAATTAATTAATGAATGAATGNNNNN"; while (<DATA>) { next if /^>.+/; next if /^$/; chomp; $_ .= $string unless eof; print; } __DATA__ >contig number 11 tttgctcggaggggatc >contig number 23 gaaaacacttccttattatacaggtaaaccgtatttggat >contig number 3 aaagctcggaggggatcccct ########## It prints: tttgctcggaggggatcNNNNNCATTCCATTCATTAATTAATTAATGAATGAATGNNNNNgaaaacactt +ccttattatacaggtaaaccgtatttggatNNNNNCATTCCATTCATTAATTAATTAATGAATGAATGN +NNNNaaagctcggaggggatcccct
In reply to Re: merge sequences with new sequence insertion
by rnaeye
in thread merge sequences with new sequence insertion
by utpalmtbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |