User Tools

Site Tools


assignments:2016assignment4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

assignments:2016assignment4 [2018/07/05 15:19] (current)
david created from old site
Line 1: Line 1:
 +===== ASSIGNMENT 4 =====
 +----
  
 +**Due date:​** ​ 9/12 by 10 am
 +
 +A sample sequence file, sequence.txt,​ is available in the sample data directory.
 +  ​
 +====Exercise:​ bash scripting====
 +**Assignment.** Create a bash script that prompts the user for the name of a file containing a sequence and then determines the following and prints the results to the terminal:
 +  -The length of the sequence
 +  -The reverse of the sequence
 +  -The complement of the sequence
 +  -The reverse complement of the sequence
 +
 +  * Using a conditional statement, determine if the sequence contains non-DNA/RNA characters and print a warning message to the terminal if it does.
 +  * Add a while loop to repeat indefinitely.
 +  * Return the output to the shell.
 +  * Save the script as **your_name.sh**.
 +  * Execute the script from the command line.
 +  * Submit the script on Canvas.
 + 
 +The challenge will be to figure out how to perform these operations on the contents of a file. You may want to generate a text file containing an ~20 nt sequence to use in the exercise.
 +
 + * **Further enrichment (not graded)**: using a conditional statement and the command **exit**, write a script that determines the reverse complement of a sequence input from the command line (as opposed to from a file) and exits with a warning message if it encounter non-DNA/RNA characters. As we did not cover the command **exit** in class, you may want to google search it, although you could probably figure it out on your own.
assignments/2016assignment4.txt ยท Last modified: 2018/07/05 15:19 by david