First things first. Generate a separate file for each amino acid sequence. Put these flat files into a separate folder. Label each file by the FASTA code. You may then be in a position to put each line of each sequence into the elements of an array. I'm assuming that the sequences correspond to particular proteins.
Looking at your code. I have never seen the following before:
if(!open(MY_HANDLE, "file.txt")){
Try to keep to what you might find in a text book.
Your taking a single argument as an id and then worked with an array
@id. That needs to be fixed.
I am assuming that you know that your regular expression does not match what you have said in the text.The standard input is the protein code ID but the regular expression that is search for is a protein motif. You are jumping ahead of yourself in the code. I expect that you will modify the program to then allow for alternative protein motifs to be inputed by the user.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.