
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
In the last years, we have seen the arising of new technologies that are changing the life sciences. Bioinformatics emerged to deal with the data produced by these new technologies. In this presentation, we aim to tell a brief history of bioinformatics.
Python is a high-level programming language, that is, commands are described in a language close to the natural language. It is an interpreted language. Thus, Python depends on the Python interpreter for running scripts. It is also dynamic, strongly typed, object-oriented, and it has the peculiar characteristic of using code indenting to define the structure of blocks. So, while other programming languages use indenting only for code organization, in Python, indenting is vital for the correct functioning of scripts. Another striking feature of the language is the non-use of semicolons to terminate command lines.
Comments are pieces of code that will not be read by the interpreter, that is, comment regions will be ignored by the processor at execution time.
They are extremely important for code organization and documentation, that is, they serve to explain the function of a certain piece of code and to pass on different types of information, in case other programmers need to change your code or even you in the future.
Remember: good programmers always comment on their code.
The "if" statement performs conditional tests, and thus allows command blocks to be executed if a tested condition proves to be true.
Using the if statement, you can define which code blocks will be executed depending on different contexts and problems that your script tries to solve. We can understand then that conditional commands analyze whether a certain imposed condition is true or false, and allow different decisions to be made according to the validated data.
According to Python docs, "the while statement is used for repeated execution as long as an expression is true".
The "for" statement allows run a code block for each element of a list.
Hi. For some programming tasks, you will need to use data from external files or even record information after processing a script. In this class, you will learn how to work with files using Python.
To open a text file with Python, it is necessary to use the open function. The default syntax of the function is:
open(name, mode, buffering)
where “name” is the file that will be opened, “mode” is the way to open the file, and “buffering” is the number of bytes reserved in memory for opening the file (but mode and buffering are optional parameters). Additionally, this function can also be used to create new files. I will talk more about that later.
In programming, a function is a defined sequence of instructions or commands, which performs a specific task. Does this definition sound familiar? Hope so! So far, we have seen several built-in functions, such as print, open, or str.
Welcome to the "Introduction to Programming for Bioinformatics with Python" course. Recently, the new sequencing technologies have allowed new discoveries for Life Sciences. However, computer skills became highly necessary to deal with big biological data. Hence, knowing how to build computer programs is essential to Bioinformatics.
In this course, you will learn the basics of programming for developing computer programs applied for Bioinformatics. You will also learn about creating your first algorithms, creating pipelines using the programming language Python, and analyzing biological databases. Python is the main programming language used for bioinformaticians.
This course is ideal for students who are starting in the field of bioinformatics and who do not have previous knowledge of programming.
You will also learn in this course:
• What are computer programs?
• How to create your first scripts?
• What is Python?
• Using the Colab web tool
• What are variables?
• Objects in Python
• Logical operators
• Variable types: strings, integers, Boolean
• Sequences in Python: lists, dictionaries, and tuples
• What are conditional statements?
• What are iterative statements?
• How to compare sequences
• Bioinformatics file types
• What is a software library?
• What is Biopython?
• How to convert a sequence from a string into a Biopython object?
• Manipulating sequences using Biopython
• Translation and transcription using Biopython