Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Perl regular expression for amino acid sequence

by Roy Johnson (Monsignor)
on Dec 01, 2004 at 20:53 UTC ( [id://411565]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Perl regular expression for amino acid sequence
in thread Perl regular expression for amino acid sequence

The fix is something like:
my $cur; while ($seq{$k} =~ /([QGYN]{3,6})/g) { $cur = $1; pos($seq{$k}) -= length($cur); $cur =~ s/(.)\1\1.*/$1$1/; if (length($cur) >= 3) { pos($seq{$k}) += length($cur); } else { ++pos($seq{$k}); next } print "\n$k"; print $cur." begins at position ", (pos($seq{$k})-length($s)) , "\n +"; }

Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found