32  Unix Data Manipulation

32.1 Unix Data Manipulation

Here’s a recording of this lecture (69 minutes 22 seconds):

Recording

32.2 Unix Basics slides

PDF slide set

32.3 Questions

32.3.1 Question 1

Suppose file.bim is a tab-delimited plink bim file (meaning the second column has rsIDs). Which command will find the number of lines corresponding to rs2345, without finding spurious matches like rs23456?

Please select the correct options (more than one may be correct).

32.3.2 Question 2

Which of the following cut commands extracts the first and third columns (in that order) from a comma-separated file named data.csv?

Please select the correct option(s).

32.3.3 Question 3

Which of the following commands correctly outputs a count of the unique lines from a file named records.txt, sorted by the most frequent line first?

Please select the correct option(s).

32.3.4 Question 4

Which of the following statements about awk is correct?

Please select the correct option(s).

32.3.5 Question 5

Which sed command will recode chromosome X as chromosome 23 in a plink bim file?

Please select the correct option(s).

32.3.6 Question 6

Which command would flip a DNA strand to its complement?

Please select the correct option(s).