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

Re^4: Reverse Complement

by stamp1982 (Novice)
on Jun 30, 2013 at 23:12 UTC ( #1041670=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Reverse Complement
in thread Reverse Complement

My apologies for being so slow. At the moment this is what I have.

perl -wMstrict -l your_file.pl GGGGaaaaaaCatttatatat atatataaattttt +ATtcccc die "Please enter two sequences as arguments on the command line\n" unless @ARGV == 2; my ($orig, $comp) = map { uc } @ARGV; die "Please enter only ATCG sequences\n" if grep { /[^ATCG]/ } $orig, +$comp; die "Sorry, the two sequences you have just entered are of different l +engths." . "\nPlease try again on the command line.\n" if length $orig != length $comp; # $comp will transform back to $orig iff it is the reverse complement $comp =~ y/ATCG/TAGC/; if ($orig eq reverse $comp) { print "Yes, the two sequences are reverse-complement of each other +.\n"; exit; } else { die "Unfortunately, the two sequences are not reverse-complement.\ +n"; }

comments I get are : unquoted strings may clash with future reserved words and compilation error and syntax error at wMstrict -l


Comment on Re^4: Reverse Complement
Download Code
Re^5: Reverse Complement
by AnomalousMonk (Monsignor) on Jun 30, 2013 at 23:54 UTC
    ... this is what I have. ...

    I'm guessing, but the only thing that occurs to me is that you actually have the line
        perl -wMstrict -l  your_file.pl  GGGGaaaaaaCatttatatat  atatataaatttttATtcccc
    as the first non-blank line in your source code file. If so, this line should not be in the source code file. This line is intended as the command line invocation of the source code file. Please see previous examples.

    The source code file (which I have named  your_file.pl in these examples) should have everything from the first
        die "Please enter two sequences as arguments on the command line\n"
             unless @ARGV == 2;
    statement to the very last  } closing curly brace on the final if-statement.

    If this is not the problem, please include exact copies of all warnings or error messages in future posts.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (14)
As of 2014-07-25 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls