Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: merge sequences with new sequence insertion

by rnaeye (Friar)
on Nov 27, 2013 at 02:54 UTC ( [id://1064529]=note: print w/replies, xml ) Need Help??


in reply to merge sequences with new sequence insertion

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1064529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-16 16:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found