Python and R #1.6: If/else

Опубликовано: 30 Июль 2026
на канале: Programming and Linear Algebra for Biologists
51
1

In this video we'll work through a practical bioinformatics task, in which we read a FASTA file with multiple sequences, determine whether those sequences are DNA, RNA, or protein, and look for introns with non-standard splice sites. Along the way you'll learn about expressions that evaluate to true/false, how to use those expressions with if/else statements to control what code gets executed, and how to use and/or/not with Boolean (true/false) expressions.

Download the two FASTA files for EPSP synthase here: https://github.com/lvclark/R_Python_v...

Table of contents
Learning objectives 2:10
Files for this video 3:33
Comparison operators 4:31
Functions and methods returning Boolean values 8:43
Booleans in R 10:39
Exercise: any and all 15:00
The IN operator 20:08
Practical example with if/else 25:08
If/else in R 33:05
Exercise: add an if statement 38:29
Elif 41:59
And, or, not 53:51
Exercise: and/or/not 1:12:51
NSF Acknowledgment 1:15:03