pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by P on Sat 8th Dec 13:59 (modification of post by Paul view diff)
diff | download | new post

  1.  
  2. input_filename = 'small_input_file.txt'
  3.  
  4. # creating a dict that will separate species name and dna
  5. seq = {}
  6. # for every line in the 'input_filename' that python will open
  7. for line in open(input_filename):
  8.         name = line.rstrip('\n').split(' ')[0]
  9.         dna = line.rstrip('\n').split(' ')[1]
  10.         print(name, dna)
  11.         seq[name] = dna
  12.  
  13. primer_min = input('What is the the min primer length?')
  14. primer_max = input('What is the the max primer length?')
  15.        
  16. # create overlapping segments - something wrong here - script ignores user input
  17. for n in range(primer_min, primer_max):
  18.         seqs = dna
  19.         last_pos = len(dna) - (n-1)
  20.         for pos in range(0,last_pos):
  21.                 print(pos)
  22.                 print(dna[pos:pos+n])
  23.                
  24. # store in list of possible primers - call this primer_list
  25. primer_list = []
  26.  
  27. primer_list = list(range(0, 5))
  28.  
  29. #print(primer_list)
  30. for Fprimer in primer_list:
  31.         for Rprimer in primer_list:
  32.                 print(Fprimer, Rprimer)

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@


Remember my settings