Bio-computing week 1
Bio-computing week 1 CSE 6613
Popular in Bio-computing
verified elite notetaker
Popular in Buttler Hall
This 5 page Class Notes was uploaded by Marina Notetaker on Friday August 19, 2016. The Class Notes belongs to CSE 6613 at Mississippi State University taught by Andy Perkins in Fall 2016. Since its upload, it has received 15 views. For similar materials see Bio-computing in Buttler Hall at Mississippi State University.
Reviews for Bio-computing week 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 08/19/16
Mississippi State University Starkville, August 19, 2016 Marina Monobe DIRECTIONS FOR BIO-COMPUTING 1. Download the Python in your computer by a. https://www.python.org/downloads/ b. Download the version 3.5.2 – it has two versions 3.5.2 and 2.7.12, the problem is that one does not accept same codes from the other. c. Follow protocol to install Python as the website asks. 2. Download Crimson Editor – this will be the tool used to write the codes that will run on Python. Also called the python interpreter. http://crimsoneditor.com/ 3. Advantages of using Python: a. Python is a programming language tool that you don’t need to have Cplus or Java to run it b. Can process lots of text easily, so because most of information we use on biology are text (DNA, RNA or even protein sequence) it is one of the best options c. Most common and popular 4. Reasons to do programming: a. Reduce work time when you doing something that is repetitive. b. Easy method to solve problems that are complicated or laboring to do by hand. Do not use programming when it will take longer for you to design the program than to do in other ways. You also might not want to use it if you will program something that will be used once only. 5. First steps using Python: a. At your windows, look for ‘cmd’ or command prompt. It might appear like that: b. To open a file use ‘cd desktop’ or ‘cd’ whatever the file you want to open. ‘c’ means that it comes from the drive of your computer and ‘d’ is for cd drive. When you insert a flash drive it’s a ‘e’, ‘ed’ code. Python just runs things on your desktop so you need to open your desktop and files. c. To visualize whatever you have in a file you just opened you write ‘dir’ and a list of your containing will appear. All files (DIR) will appear in a list with their respective size and when they were last time worked on. You can also just type ‘dir’ without opening your desktop and then it will show you all folders you have on your entire computer. d. If you want to organize the folders you will work using Python, you can just go to your desktop and make a folder with Python or Bio-computing name and insert there everything for this use. e. When you first create a folder but it’s empty and you open it on your program it will appear DIR one dot or two dots and it will show no files on that. f. You need to run python on the folder where the files will be. So you would always need to do “cd desktop” and after that “cd bio-computing” g. If you want to come back to the previous folder or level you write “.. cd”. The two dots means previously director or one level up. h. Making sure your Python was installed and it’s working. Open your desktop and then write “python”. It should appearlikethis. So it’s working.Thepythonis that. It’s open and youcanstartmakingcodes. i. Messing around with python. A program is just commands that you want your computer to do. ** means exponentiation x%y is the result after a division, called modulus. It’s used to know if the number is even or odd. If you divide by 2 and it’s 0 = even and 1=odd number. These are important codes and simple. You need to remember about them. j. Generally, we don’t use python like this because it has no way to share with someone like this. That’s why we use a note pad like crimson editor. k. Python look at letter as they are. If you ask python to “hello*2” it will result in “hellohello” and any other procedures. Python can do math operations on strings. STRINGS must be between ‘…’ !!!! Otherwise it won’t recognize. If you print just a+b, strings will be printed together. If you want the strings separated, so include +’..’+ All it’s called string operation. l. If you want exit from python EXIT ( ) m. If you want to clean the board write CLS = clear scream 6. Using Crimson Editor for Python a. It words like a notepad but does things that notepad doesn’t. It says the line you are and it’s important because if you write something that python does not recognize it will tell you which line is that and you can come back to crimson and correct. b. You can’t use Word for python because it does not save the file in an extension that python can recognizes. c. Open the Crimson Editor, write your program and then save the file as ‘something.py’. Python will work on the answer or writing whatever comer after “print” and is written ( ). d. Open your command program and after opening the desktop and the folder you want to work, open python to analyze the file you just did at crimson editor. Python will “print” the answer or whatever you want it to print. PRINT is the command for python to print what it runs. If you don’t write print, python runs the program but does not show. Python gives only the results from what your commands were from the note you opened. e. Remind you need to tell what is the ‘letter’ you need it to calculate. For example, if you write only x*y, you can’t say “print x*y” because it does not command it to calculate x*y but only to print it. f. Whenever you doing a test or assignment and you need to get into an answer you should write like this: Always give your name, class CSE6613, day and the title of what are you doing. Use ‘#’ whenever you need to identify or give a title for a code you programing. It makes easier to other people work on that later and even you. # is a comment. Everything that is written after # is irrelevant for the program. It’s just a note for yourself. Inside the ( ) after the PRINT, you list everything you want python to write or print separate by a comma. Everything inside ‘..’ is called string. And it’s copied by python. You can use also “…”, it does not matter for the program. To make the program to scape a quote, you can insert \before the quote which means, escaping a quote or you can use “..”. Escaping characters use \n = this command will make whatever is written after \n goes to the next line \n >>> is called the new line character If you do \n\n it will jump two lines. As many \n you insert as many lines you jump. Tab code >> \t As many \t you input as many tab space you will have. Type of numbers called literals that you can have in your codes: a. Floating point: 3.2, -1.5, 0.32 b. Integers: 0, -5, 32 g. Spacing with lines do not matter. h. Calculating average: Either way, gives you the same result.