1 of 7

Wednesday, Jan 23rd

UCSD CSE 180

Yana Safonova

2 of 7

1. Give definitions of direct and reverse half-strands

2. What are Okazaki fragments?

3. Describe the role of the deamination process in DNA replication?

4. Compute the ExtendedGenome for Genome = “AGCGATTTTGCTAGC”

5. Compute SymbolArray for ExtendedGenome from the previous question and all nucleotides

6. Describe FASTA format

3 of 7

Programming practice

  • Python, command line interface

  • Basic structures and objects
    • List
    • String
    • Set
    • Dictionary

  • Manipulations with lists

  • Most common errors and how to deal with them

4 of 7

List

  • An ordered collection of elements
    • my_list = []
    • my_list = list()
    • my_list = [1, 2, 3, 4, 5]
    • my_list = [0] * 10
  • Important functions (https://docs.python.org/2/tutorial/datastructures.html):
    • append
    • extend
    • insert
    • index
    • remove
    • count
    • sorted(my_list)

5 of 7

List practice

  • Create a list A with integers from 1 to 300 (including both values) and a list B with integers from 400 to 101 (including both values)
  • Create a list C equals to [A[0], B[0], A[1], B[1], …, A[299], B[299]]
  • Create a list D with integers from 100 to 200 (including both values)
  • Find the second occurence of 200 in C and insert all values of D to C in front of it
  • Sort C in both increasing and decreasing orders
  • Output all integers appearing two or more times in C

6 of 7

String

  • my_string = ‘Lorem ipsum dolor sit amet’
  • my_string = “Lorem ipsum dolor sit amet”
  • string is unchangeable!

my_string[0] # ERROR

  • for c in my_string:

print c

  • for i in range(len(my_string)):

print my_string[i]

  • my_string.split()
  • my_string.split(‘m’)

7 of 7

String

  • my_string = ‘AAACGAAACGAAA’

pattern = ‘AAA’

for i in range(len(my_string)):

if my_string.find(pattern, i) != -1:

print i

  • my_string = my_string.replace(‘AAA’, ‘TTT’)
  • my_string = my_string.lower()
  • my_string = my_string.upper()

https://docs.python.org/2.7/library/string.html