Midterm 13:20—16:20

You are allowed to look up my course website, any textbook and internet resource.
But NO DISCUSSIONS with anybody. Using ChatGPT, COPILOT or any other AI bots are NOT ALLOWED. DO NOT CHEAT!

You need to login your account at Ukko and write the scripts there.
Before you start, do:
mkdir ~/midterm
chmod 700 ~/midterm
Put all of your scripts and necessary data files for the following problems under your ~/midterm/ directory.
After you finish or after timeout (16:20), send a PDF file which specifies the filenames of the scripts (including the full paths) to me and CC: to TA. The title of the email must contain your student ID, your name and the keyword midterm (期中考), just like those emails of your previous homework submissions.
Do NOT change the files under your ~/midterm/ after you email out the PDF file.

  1. Write a shell script to convert 1-letter code to 3-letter code for amino acids. An example website might be convenient for you to check your results.
    Also calcuate its molecular weight in the units of both kDa and g/mol.
    You may find tables in the Wiki or use the file.

  2. Write a script to convert 3-letter code back to 1-letter code for amino acids. Of course, you need to verify if the total number of input characters is divisible by 3 before doing the conversion.

  3. Write a script to revert an input protein sequence. Design your script to work with both of 1-letter and 3-letter codes.

  4. Write a script to find out the negative supercoiling of the input positive supercoiling DNA.
    Find out the anti-sense strand of the input DNA sense strand (the direction of the sense strand is given be 5' to 3', the answer of the anti-sense strand should be 3' to 5').

  5. Calculate the GC contents for an input sequence of DNA.

  6. Write a shell script to translate a nucleotide (DNA/RNA) sequence to a protein sequence. Pay attention to the start/stop codons!
    Example seq:
    CAAGATGCCATTGTCCCCCGGCCTCCTGCTGCTGCTGCTCTCCGGGGCCACGGCCACCGCTGCCCTGCC
    CCTGGAGGGTGGCCCCACCGGCCGAGACAGCGAGCATATGCAGGAAGCGGCAGGAATAAGGAAAAGCAGC
    CTCCTGACTTTCCTCGCTTGGTGGTTTGAGTGGACCTCCCAGGCCAGTGCCGGGCCCCTCATAGGAGAGG
    AAGCTCGGGAGGTGGCCAGGCGGCAGGAAGGCGCACCCCCCCAGCAATCCGCGCGCCGGGACAGAATGCC
    CTGCAGGAACTTCTTCTGGAAGACCTTCTCCTCCTGCAAATAAAACCTCACCCATGAATGCTCACGCAAG
    TTTAATTACAGACCTGAA
    


Homework 08:
Finish or refine (polish; make them better in efficiency or with new functions) your scripts sumbitted for the midterm under another directory.
Before your start, do:
cp -a ~/midterm ~/hw08
chmod 700 ~/hw08
and fix your scirpts as the homework under ~/hw08/ . Again, do NOT change anything under ~/midterm/.
After you finish the homework, send a PDF file describing the modifications to me and CC: to TA.
The title of the email must contain your student ID, your name and the keyword Homework 08(第八週作業), just like those emails of your previous homework submissions.