Warning: Undefined array key "PATH_TRANSLATED" in /mnt/web/export/courses/cs5045/fall_2002/handouts/programs/program2.php on line 3
CS 5984: Programming Assignment 2
CS 5984: Computation for the Life Sciences
Fall Semester, 2002
Programming Assignment 2
The point value of each script is given in [].
Within each script,
include a header comment block that looks something like this:
#!/usr/bin/perl -w
#
# Perl script: name_of_script
#
# Perl guru: your_name
#
# Description_of_script
#
# Date: date_created
#
You should email your Perl scripts in separate emails
to heath@vt.edu
--- with the subject of each email being the name of the script ---
by 5:00PM on
September 18, 2002.
No late submission will be accepted.
-
[10]
Write and submit a Perl script named case_change
with the following interactive behavior.
-
Prompt for a single line of DNA sequence (e.g., tcCatcGa).
-
Convert it to upper case using the translation tr/// operation
(page 46).
-
Print the resulting all upper case DNA sequence (e.g., TCCATCGA)
to STDOUT along with a clever message.
-
Prompt for a single line of RNA sequence (e.g., AcUGuACGu).
-
Convert it to lower case using the translation tr/// operation.
-
Print the resulting all lower case RNA sequence (e.g., acuguacgu)
to STDOUT along with a clever message.
-
Print "Goodbye" in any language you like.
You are not required to check that the input sequences are valid,
but if you want to practice error checking,
you should give it a try.
-
[40]
Write and submit two Perl script named transcription
and reverse_transcription
with the following behaviors.
-
The transcription script takes one line
of DNA sequence (e.g., TaatGCaAc)
from STDIN,
This sequence is taken as part of a template strand for transcription.
Transcribe the sequence to RNA --- all upper case ---
and print the RNA sequence to STDOUT on one line
(e.g., GUUGCAUUA).
You may use the script on pages 43-45
as a starting point for transcription.
-
The reverse_transcription script takes one line
of RNA sequence (e.g., cauGGGaAU)
from STDIN,
This sequence is taken as part of an RNA strand for reverse transcription.
Reverse transcribe the sequence to DNA --- all lower case ---
and print the DNA sequence to STDOUT on one line
(e.g., attcccatg).
You should use your transcription script
as the starting point for reverse_transcription.
You can test your scripts with sample input files
DNA1.seq
and
RNA1.seq.
In particular,
% cat DNA1.seq | transcription | reverse_transcription > DNA1_trans.seq
should result in DNA1_trans.seq,
while
% cat RNA1.seq | reverse_transcription | transcription > RNA1_rev_trans.seq
should result in RNA1_rev_trans.seq.
This page was last modified at 12:00 AM UTC, on
January 1, 1970.
Current time at Virginia Tech is 7:37 PM UTC, on
December 4, 2024.
Please report any problems found in these pages by email to:
Lenwood S. Heath.