Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^7: Filter and writing error log file

by choroba (Canon)
on Jul 24, 2014 at 13:16 UTC ( #1094911=note: print w/ replies, xml ) Need Help??


in reply to Re^6: Filter and writing error log file
in thread Filter and writing error log file

You regexp seems incorrect. [GCA{4}T{4}] is a character class that matches any character of the ones listed, i.e. it's the same as [}4{GCAT]. Also, to make sure you match at a particular position, you should anchor your regex by starting it with ^ to match the beginning of the string.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^7: Filter and writing error log file
Select or Download Code
Re^8: Filter and writing error log file
by newtoperlprog (Sexton) on Jul 24, 2014 at 14:20 UTC

    Thanks Choroba for your reply.

    So if I understood correctly, I should modify something like this:

    if( ($seq =~/^\w{2}A\w{6}T\w{2}[ACT]\w[^A{4}|^T{4}][GC]{4}[AT]/) && ( $seq !~ /[GC]{9}/) && ( $gcper >= 30 && $gcper <= 52) ) { Do something....;}

    Thanks again

      No. [^A{4}|^T{4}] is equivalent to [^^AT}|{4], i.e. it matches anything except ^, A, T, verbar, curlies and four.
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

        Dear Choroba, thank you for your reply.

        I am getting a little bit confused here. As '^' matches the beginning of the character and in my filter criteria position 15-19 should have atleast 3 A's or 3 T's not necessarily starts with A or T but it could be something like like:

        15-AATAG-19 15-ATAAC-19 15-TTTAC-19 15-GCAAA-19 15-GATAA-19

        Sorry for so many posts, but I really want to understand.

        Thankyou

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2015-07-01 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls