Created by Wayne Decatur for Feng Lab Group meeting
Maybe a better question at this point is “why code?”
Easy `find and replace` won't work because changes all `T's` and may change useful information.
Regular expression may have worked if I figured out how to do backward assertion?
Go through all the lines input and decide what to do with them.
Want to skip lines beginning with >.
For all the other lines, we want replace 't' with 'u' elsewhere.
import random
numbers = range (1,50)
chosen = []
while len(chosen) < 6:
number = random.choice(numbers)
numbers.remove(number)
chosen.append(number)
chosen.sort()
print "This week's numbers are", chosen
print "The bonus ball is", random.choice(numbers)
Code example borrowed from here.
Reminder that approach used here today was just to save on installation issue. See here for an example of how it can hinder getting started.
For exploring and initial development cloud-approach is fine. Suggest though as you move towards real development of useful programs, you code in a text editor or IDE on your machine and then run in the cloud or even on your machine, depending on how nomadic you are or computing power/recources needed.
Why do I say do the code development locally? - main reason is reliability. You can easily undo and are more likely to have active backup mechanisms available on your computer or through linking with Dropbox etc., just like you would when you do work on a Microsoft Word document or presentation. Later you'd be smart to integrate git/github into your code development workflow, but that serves a different purpose (organizing development and collaboration) other than direct recovery of your most recent edits.
Bottom line: get started, then work out your coding and running style/workflow. Won't be same for all things obviously. Examples from a nomad- mostly PythonAnywhere; large jobs in the cloud unless no money than can use lab desktop (at the cost of convenience).
Starting with this example , can you write a program to convert DNA fasta to mRNA?
example, DNA_to_RNAsimple.py