You can get link from here :
https://drive.google.com/file/d/1uLHHcySCAXPy-6JfCzTYtkZViR-Xh1X7/view?usp=drive_link
To learn Bio python more go through this documentation:
http://biopython.org/DIST/docs/tutorial/Tutorial-1.81.pdf
1. BIOPYTHON FOR BIOINFORMATICS
AN INTRODUCTION
Version 1.81
Seq
Seq Object as String
Seq Annotation
Biopython | Programming for Bioinformatics | Seq 1
Babita Neupane
M.Sc.Bioinformatics | Pokhara University
Friday, September 8, 2023 1
5. Why do bioinformatician need Biopython Programming ?
Data
Management
Sequence
Analysis
Parsing and
Writing File
Formats
Phylogenetics
Analysis
Structural
Biology
Huge libraries
Rich
Communities
Research
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 5
6. Getting Started With Biopython
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 6
Installing Biopython
i. Open Python Editor
ii. Pip install biopython
Let’s learn Biopython ☺
PS: Biopython is case sensitive.
7. What are Sequence ??
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 7
Forms of Sequence
Genomic DNA
Coding Sequences (Exons)
Introns
Promoters
Enhancers
Silencers
Transposable Elements
mRNA (Messenger RNA)
rRNA (Ribosomal RNA)
tRNA (Transfer RNA)
miRNA (MicroRNA)
snRNA (Small Nuclear RNA)
snoRNA (Small Nucleolar RNA)
Protein Sequences (Amino Acid
Sequences)
Central object in
Bioinformatics.
Fundamental class used for
working with biological
sequences, such as DNA,
RNA, and protein sequences.
8. Sequence acts like Strings
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 8
9. It is a module provided by Biopython
that defines the Seq class.
The Seq class provides various methods
and attributes for manipulating and
analyzing these sequences.
To use this module for the first time we
have to import Bio.Seq from Biopython.
What can we do with Bio.Seq ?
Seq()
complement()
reverse_complement()
transcribe()
translate()
count()
find()
split()
join()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 9
What is Bio.Seq ?
10. Seq()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 10
To create sequence class, we use seq() function.
If we don’t use Seq function, it act like string and seq function are restricted to string.
11. complement()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 11
Use to find complementary strand
of DNA.
A= T or U
C=G
12. reverse_complement()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 12
This function first reverse the sequence and give complement of
the seq.
Why do we need this ?
Primarily in Primer Designing designed to bind specific region of
DNA template; designing small interfering RNA (siRNA)
molecules to target specific messenger RNA for gene silencing
and many more and many more.
13. transcribe()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 13
Given the coding sequence , it transcribes
DNA into mRNA.
Be careful with the end of seq as sequence
are read in direction 5’end to 3’end.
14. back_transcribe()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 14
To convert the given RNA sequence back into the corresponding DNA
sequence .
15. translate()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 15
To find amino acid sequence
from transcribed mRNA or
coding strand directly.
‘*’ identifies stop codon
"UAA," "UAG," and "UGA“.
16. translate() using CodonTable from Bio.Data module
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 16
Translate() function use standard codon table by default.
We can specify translate using specific codon table.
Codon table are different for different organism due to codon
usage discrepancy.
17. CodonTable
CodonTable have various attributes regarding
genetic codons.
Importing and using those attributes can be
obtained using specific functions.
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 17
18. count()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 18
Used to count total number of
alphabets (nucleotides/amino acid
from the sequence.
Not unique feature of Biopython.
Example:
19. find()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 19
Use to find index of desired seq(starts
from 0 and locate position of first alphabet
of desired seq.
Give result based on first search
Use loop to find location of the target
seq/s.
20. split()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 20
To split seq given ref seq .
Ref seq can be single or multiple based on your choice.
Cleave sequences bu.
21. Concatenating Sequences
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 21
Used to add sequences.
Adding individual
sequences.
Adding seq from sequence
list
Adding seq list with
specific seq (can be
repeated)
22. Changing cases
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 22
Similarly like in python
Using ” .lower()” & “.upper()”
23. Comparing Seq Objects
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 23
Equality(==, !=)
Ordering(<, <=, > , >=) #lexicographic order
Length comparison
24. MutableSeq Object
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 24
Seq are immutable.
To modify seq this MutableSeq allow us
to add , remove, reverse or change the
seq.
25. Turning Seq Objects into Strings
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 25
Easy data representation, easy &
compatible writing and
manipulating sequence files,
visualizations, simplification &
easy usage.
26. Working with Strings directly
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 26
Can access function of seq in
string object directly using
function as given in figure.
27. Parsing seq files in Biopython
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 27
28. Changing type
of seq files and
Accessing
changed file
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 28
29. 2. The Bio.SeqRecord Module
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 29
This module provides the
SeqRecord class, which is a
fundamental data structure for
representing biological sequence
records.
An SeqRecord object have
attributes like seq, id,
description, annotations,
features, letter_annotations,
name, dbxrefs, annotations, and
more.
What can we do using SeqRecord class ??
30. Creating SeqRecord object : from scratch
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 30
We can combine a Seq object with
additional metadata and annotations with
the help of this module as shown in
example.
31. SeqRecord object from FASTA files
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 31
Contain no records for dbxrefs,
annotations, letter_annotations &
features.