Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Removing nucleotide frm sequence

by space_monk (Chaplain)
on Jun 07, 2013 at 07:42 UTC ( [id://1037609]=note: print w/replies, xml ) Need Help??


in reply to Re: Removing nucleotide frm sequence
in thread Removing nucleotide frm sequence

local $/ = ""; while (<>) { # should have a whole record # split up 4 line record my (@line) = split( "\n"); # change if necessary to check we have a valid record if ($line[0] =~ /^@/) { $line[1] =~ s/([ACGT]{5})$//; $line[3] =~ s/(\w{5})$//; print join("\n", @line); } }
If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2025-12-09 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (88 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.