User Tools

Site Tools


assignments:2020assignment2

Assignment 2

Due Date & Grading

  • Due date: Tuesday September 1, 2020, 10 am
  • Compile your answers in a text document
  • Do not include the questions, just your answers
  • Upload your text document to CANVAS
  • Homework assignments account for 70% of your final grade.

:!: HINT: If the question asks for a command, write the full command as you would write it on the command line.


Preparation for the exercise

  • Download the following file: genomes_2018.tgz
  • Extract it by either double-clicking on it OR navigating to where the file is located and executing:
$tar -zxvf genomes_2018.tgz
  • Navigate into the directory genomes_2018
  • The directory contains 11 .txt or .gtf files.

Question1

  • A. How would you rename sc3_chrom_sizes.txt to scerevisiae.txt? Write the full command line.
  • B. How would you read the file README_download.txt? Write the full command line.

Question2

  • A. This directory is a little messy. To organize it, make the following directories: 01_readme, 02_annotations, 03_chromsizes. What single command line did you use?
  • B. How would you move the file README_download.txt into the directory 01_readme?
  • C. How would you move all the .gtf files into the directory 02_annotations using a single command? (hint: use a wildcard)
  • D. How would you move all the _chrom_sizes.txt files into the directory 03_chromsizes using a single command? (hint: use a wildcard)

Question3

  • A. What command line would print out the first line of the file hg38_annotation_head.gtf?
  • B. What command line would print out the last 20 lines of the file hg38_annotation.txt?

Question4

  • How many lines are in the file README_download.txt?
  • How many total lines are in all the .txt files (add up the number of lines in each .txt file)?
  • The .gtf files are all the same length. How many lines are in each of the .gtf files?

Question5

  • A. We haven't yet studied the command du. What command line can you execute in the terminal to learn more about du?
  • B. How would you use the command du to show how many megabytes of size comprises the entire directory genomes_2018 in a human-readable format? Write the full command line.
  • C. How many megabytes is it?
assignments/2020assignment2.txt · Last modified: 2021/06/01 15:06 (external edit)