User Tools

Site Tools


wiki:exercises2

FURTHER EXERCISES 160830

Exercise 1

  • Let's work with the .gff file that is in your directory, S288C_reference_genome_R64-1-1_20110203/03_annotations. It is called saccharomyces_cerevisiae_R64-1-1_20110208.gff
  • Use head and tail to look at the .gff file saccharomyces_cerevisiae_R64-1-1_20110208.gff.
  • Use redirection to save the first 100 lines of saccharomyces_cerevisiae_R64-1-1_20110208.gff as a file called sacCer3_first100.gff.
  • Use redirection to save the last 100 lines as sacCer3_last100.gff.

Exercise 2

  • Start within a directory that contains the sub-directory 02_fastafiles. Redirect the output from ls 02_fastafiles/ to a file.
  • Redirect the stderr message from ls doesnotexist to a file.
  • Redirect the stdout and stderr messages from the command ls 02_fastafiles/ doesnotexist to a file.

Exercise 3

  • Let's work with the .gff file that is in your directory, S288C_reference_genome_R64-1-1_20110203/03_annotations. It is called saccharomyces_cerevisiae_R64-1-1_20110208.gff
  • Use grep to find all the lines that contain a #.
  • Next, use 'grep' for the same operation, but this time display the line number as well.
  • Make a file out of saccharomyces_cerevisiae_R64-1-1_20110208.gff that contains ONLY the annotation material. The annotation material is any line that starts with # or ## or ###.
  • Make a file that contains NO annotation material.

Exercise 4

  • Use wc to save a file containing word count information for one file.
  • Try to use cut to parse the word count information (in your saved file) into lines, words, and characters. It doesn't work.
  • Open the file in your text editor. Can you figure out why you couldn't parse columns using cut?
wiki/exercises2.txt ยท Last modified: 2016/08/29 13:15 by erin