Introduction To Perl Exercises
Day 1
(A) String manipulation.
Write a program which takes two strings as arguments to the program.
On newlines print each argument.
On a newline print the 5th->10th characters of each argument.
Exit with a warning if either of the arguments is < 10 characters in length.
Print each argument in reverse.
If the first argument begins with the word ÒhelloÓ, print the message ÒThe first arg
starts with hello!Ó
(B) Simple Calculator
Write a program which prompts the user for a number.
Next prompt the user to choose [+ - / *].
Next prompt the user for a second integer.
Print the operation which was just specified as well as the result.
Day 3
(A)Parsing and Reporting
Using the file fasta.fofn(fofn=File of File Names), open the three fasta files listed.
Write a text file report with a line for each fasta file which
contains:
(B) Sets!
From two lists of entrez gene IDs (listA and listB), identify the following four sets: all IDs which are shared between the two lists, all IDs which are unique to list A, all IDs which are unique to list B, the combination of all IDs. Write each of these four new lists to its own file.
**DonÕt worry about maximum efficency or elegance just yet!
Day ??
() mRNA Reconstruction From Genomic Sequence
Using the geneInfo.log file, and the associated genomic GENE.fasta files, generate the mRNA sequence and write a new text file with the mRNA sequence for each gene.
*Hint- the fasta files are all in 5Õ->3Õ orientation, so coordinates on negative strand genes will need to be handled separately from + strand genes. The resulting mRNA will need to be reverse complemented as well.