SlideShare a Scribd company logo
1 of 33
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
Biological Concept
Nucleoside
Nucleotide
Nucleic Acid
DNA & RNA
mRNA
Proteins
Sequence
Transcription
Translation
Codons
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 2
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
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.
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.
Sequence acts like Strings
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 8
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 ?
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.
complement()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 11
 Use to find complementary strand
of DNA.
 A= T or U
 C=G
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.
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.
back_transcribe()
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 14
To convert the given RNA sequence back into the corresponding DNA
sequence .
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“.
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.
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
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:
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.
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.
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)
Changing cases
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 22
Similarly like in python
Using ” .lower()” & “.upper()”
Comparing Seq Objects
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 23
Equality(==, !=)
Ordering(<, <=, > , >=) #lexicographic order
Length comparison
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.
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.
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.
Parsing seq files in Biopython
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 27
Changing type
of seq files and
Accessing
changed file
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 28
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 ??
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.
SeqRecord object from FASTA files
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 31
 Contain no records for dbxrefs,
annotations, letter_annotations &
features.
SeqRecord
object
from
GenBank
files
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 32
Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 33
THANK YOU !!

More Related Content

Similar to SEQ -BIOPYTHON.pptx

Project
ProjectProject
Project
Xu Liu
 
Gautier bosc2010 pythonbioconductor
Gautier bosc2010 pythonbioconductorGautier bosc2010 pythonbioconductor
Gautier bosc2010 pythonbioconductor
BOSC 2010
 
Antao Biopython Bosc2008
Antao Biopython Bosc2008Antao Biopython Bosc2008
Antao Biopython Bosc2008
bosc_2008
 
57 bio infomark
57 bio infomark57 bio infomark
57 bio infomark
phdcao
 
DReAMS: High Performance Reconfigurable Computing at NECSTLab
DReAMS: High Performance Reconfigurable Computing at NECSTLabDReAMS: High Performance Reconfigurable Computing at NECSTLab
DReAMS: High Performance Reconfigurable Computing at NECSTLab
NECST Lab @ Politecnico di Milano
 
High Performance Reconfigurable Computing at NECSTLab
High Performance Reconfigurable Computing at NECSTLabHigh Performance Reconfigurable Computing at NECSTLab
High Performance Reconfigurable Computing at NECSTLab
NECST Lab @ Politecnico di Milano
 

Similar to SEQ -BIOPYTHON.pptx (20)

BWU_BTA_22_381.ppt
BWU_BTA_22_381.pptBWU_BTA_22_381.ppt
BWU_BTA_22_381.ppt
 
Genetic Algorithm for optimization on IRIS Dataset REPORT pdf
Genetic Algorithm for optimization on IRIS Dataset REPORT pdfGenetic Algorithm for optimization on IRIS Dataset REPORT pdf
Genetic Algorithm for optimization on IRIS Dataset REPORT pdf
 
DIGEST PODCAST
DIGEST PODCASTDIGEST PODCAST
DIGEST PODCAST
 
IRJET - Pseudocode to Python Translation using Machine Learning
IRJET - Pseudocode to Python Translation using Machine LearningIRJET - Pseudocode to Python Translation using Machine Learning
IRJET - Pseudocode to Python Translation using Machine Learning
 
Biopython Project Update 2013
Biopython Project Update 2013Biopython Project Update 2013
Biopython Project Update 2013
 
Lecture 2_IoT.pptx
Lecture 2_IoT.pptxLecture 2_IoT.pptx
Lecture 2_IoT.pptx
 
Voice Enable Blind Assistance System -Real time Object Detection
Voice Enable Blind Assistance System -Real time Object DetectionVoice Enable Blind Assistance System -Real time Object Detection
Voice Enable Blind Assistance System -Real time Object Detection
 
Thesis def
Thesis defThesis def
Thesis def
 
Project
ProjectProject
Project
 
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
 
Gautier bosc2010 pythonbioconductor
Gautier bosc2010 pythonbioconductorGautier bosc2010 pythonbioconductor
Gautier bosc2010 pythonbioconductor
 
Ugene
UgeneUgene
Ugene
 
IRJET- Code Cloning using Abstract Syntax Tree
IRJET- Code Cloning using Abstract Syntax TreeIRJET- Code Cloning using Abstract Syntax Tree
IRJET- Code Cloning using Abstract Syntax Tree
 
Antao Biopython Bosc2008
Antao Biopython Bosc2008Antao Biopython Bosc2008
Antao Biopython Bosc2008
 
Socket programming-in-python
Socket programming-in-pythonSocket programming-in-python
Socket programming-in-python
 
57 bio infomark
57 bio infomark57 bio infomark
57 bio infomark
 
DReAMS: High Performance Reconfigurable Computing at NECSTLab
DReAMS: High Performance Reconfigurable Computing at NECSTLabDReAMS: High Performance Reconfigurable Computing at NECSTLab
DReAMS: High Performance Reconfigurable Computing at NECSTLab
 
High Performance Reconfigurable Computing at NECSTLab
High Performance Reconfigurable Computing at NECSTLabHigh Performance Reconfigurable Computing at NECSTLab
High Performance Reconfigurable Computing at NECSTLab
 
Comparison between Python 2 and Python 3
Comparison between Python 2 and Python 3Comparison between Python 2 and Python 3
Comparison between Python 2 and Python 3
 
Standardized visualisation of differences between model versions
Standardized visualisation of differences between model versionsStandardized visualisation of differences between model versions
Standardized visualisation of differences between model versions
 

Recently uploaded

Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptx
GOWTHAMIM22
 

Recently uploaded (20)

Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
Harry Coumnas Thinks That Human Teleportation is Possible in Quantum Mechanic...
 
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 RpWASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
WASP-69b’s Escaping Envelope Is Confined to a Tail Extending at Least 7 Rp
 
Mining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptxMining Activity and Investment Opportunity in Myanmar.pptx
Mining Activity and Investment Opportunity in Myanmar.pptx
 
GBSN - Microbiology (Unit 7) Microbiology in Everyday Life
GBSN - Microbiology (Unit 7) Microbiology in Everyday LifeGBSN - Microbiology (Unit 7) Microbiology in Everyday Life
GBSN - Microbiology (Unit 7) Microbiology in Everyday Life
 
NUMERICAL Proof Of TIme Electron Theory.
NUMERICAL Proof Of TIme Electron Theory.NUMERICAL Proof Of TIme Electron Theory.
NUMERICAL Proof Of TIme Electron Theory.
 
Lubrication System in forced feed system
Lubrication System in forced feed systemLubrication System in forced feed system
Lubrication System in forced feed system
 
RACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptxRACEMIzATION AND ISOMERISATION completed.pptx
RACEMIzATION AND ISOMERISATION completed.pptx
 
Adaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte CarloAdaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte Carlo
 
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
Soil and Water Conservation Engineering (SWCE) is a specialized field of stud...
 
PARENTAL CARE IN FISHES.pptx for 5th sem
PARENTAL CARE IN FISHES.pptx for 5th semPARENTAL CARE IN FISHES.pptx for 5th sem
PARENTAL CARE IN FISHES.pptx for 5th sem
 
Introduction and significance of Symbiotic algae
Introduction and significance of  Symbiotic algaeIntroduction and significance of  Symbiotic algae
Introduction and significance of Symbiotic algae
 
In-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptxIn-pond Race way systems for Aquaculture (IPRS).pptx
In-pond Race way systems for Aquaculture (IPRS).pptx
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of Asepsis
 
MODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdfMODERN PHYSICS_REPORTING_QUANTA_.....pdf
MODERN PHYSICS_REPORTING_QUANTA_.....pdf
 
FORENSIC CHEMISTRY ARSON INVESTIGATION.pdf
FORENSIC CHEMISTRY ARSON INVESTIGATION.pdfFORENSIC CHEMISTRY ARSON INVESTIGATION.pdf
FORENSIC CHEMISTRY ARSON INVESTIGATION.pdf
 
Fun for mover student's book- English book for teaching.pdf
Fun for mover student's book- English book for teaching.pdfFun for mover student's book- English book for teaching.pdf
Fun for mover student's book- English book for teaching.pdf
 
MSC IV_Forensic medicine - Mechanical injuries.pdf
MSC IV_Forensic medicine - Mechanical injuries.pdfMSC IV_Forensic medicine - Mechanical injuries.pdf
MSC IV_Forensic medicine - Mechanical injuries.pdf
 
Isolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptxIsolation of AMF by wet sieving and decantation method pptx
Isolation of AMF by wet sieving and decantation method pptx
 
A Scientific PowerPoint on Albert Einstein
A Scientific PowerPoint on Albert EinsteinA Scientific PowerPoint on Albert Einstein
A Scientific PowerPoint on Albert Einstein
 
NuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdfNuGOweek 2024 programme final FLYER short.pdf
NuGOweek 2024 programme final FLYER short.pdf
 

SEQ -BIOPYTHON.pptx

  • 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
  • 2. Biological Concept Nucleoside Nucleotide Nucleic Acid DNA & RNA mRNA Proteins Sequence Transcription Translation Codons Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 2
  • 3.
  • 4.
  • 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.
  • 32. SeqRecord object from GenBank files Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 32
  • 33. Friday, September 8, 2023 Biopython | Programming for Bioinformatics | Seq 33 THANK YOU !!