SlideShare a Scribd company logo
Perl computer programming for
bioinformatics
You-Yu Lin
What is Perl?
• General purpose programming language
• Developed by Larry Wall, a linguist working as a systems administrator
for NASA in the late 1980s, as a way to make report processing easier
Larry Wall The Camel Book
(de facto reference book for Perl)
The Llama book
(for beginners)
Development of Perl
• Perl 1.0 was released in 1988
• Perl 5.000 was released in 1994
• Perl 5.36 released 2022/05/28
• Perl 6 was released in 1995 but renamed to Raku in 2019
• Perl 7 scheduled for release in 2023 but since cancelled (compatibility
issues)
Why learn Perl?
1. Similar to other languages (C, shell script, python), easy to learn
• Python was released in 1991
2. Easy and direct
• Code is brief and effective
• A lot of “Do-What-I-Means”
3. Useful and fast
• Text processing
• Web programming, GUI programming, bioinformatics, etc.
4. Free and resourceful
• Large social community and online resources
Why not to learn Perl?
1. Too flexible…TIMTOWTDI (There Is More Than One Way To Do It)
• Each person will have their own unique style, may be difficult for others and
especially beginners to read
2. IP concerns
• Perl is an interpreted language and your codes do not need compilation
• Which also means very difficult to distribute your software without revealing
your code
Where to get Perl?
• Should be included with Unix/Linux or macOS systems
• For Windows, https://www.perl.org/get.html
• Strawberry Perl or ActiveState Perl
Strawberry Perl
Your first Perl script
• Enter 「print “Hello Worldn”;」 into a text file
• Name file as 01_Hello.pl
• File extension of Perl scripts are .pl
• Not strictly required
• However, will be recognized as Perl scripts and display with Perl-specialized coloring scheme
• To execute the script, type 「perl -w 01_Hello.pl」in command line
window
script.pl script.txt
Say hello~~
Perl and Bioinformatics
• Has been extensively used for data processing of sequencing data, which
is essentially endless strings
• The human TERT gene (NG_009265.1) is 48,881 bp long (TERT.fas includes first
350 bp as an example)
Enter the following code and execute it
The Perl code reads the input file (TERT.fas) and outputs it
Potential manipulations to the input file
• Translate to amino acid sequence
• Identify exons and introns
• Calculate CG content and codon frequencies
• Compare homology with other sequences
• More…
BioPerl
• First released in 1995
• Contributed significantly for the Human Genome Project
• Collection of bioinformatic-related Perl modules
PuTTY
• Free and open source terminal software
• https://www.putty.org/
• You do not have to use PuTTY, but you need a terminal interface to
connect to a Linux server
• Please prepare a working terminal interface before next class

More Related Content

PPTX
Bioinformatics v2014 wim_vancriekinge
PDF
December06Bulletin
PDF
December06Bulletin
PPTX
Bioinformatica p1-perl-introduction
PDF
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
PPTX
2012 12 12_adam_v_final
PPTX
Bioinformatics p1-perl-introduction v2013
PDF
Computational biology
Bioinformatics v2014 wim_vancriekinge
December06Bulletin
December06Bulletin
Bioinformatica p1-perl-introduction
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
2012 12 12_adam_v_final
Bioinformatics p1-perl-introduction v2013
Computational biology

Similar to 113-1_Perl_1_Introduction_to_command_line.pdf (20)

PPT
Bioinformatica 29-09-2011-p1-introduction
PPTX
Introduction to perl
PPT
Programming languages vienna
PPTX
Unit 1-introduction to perl
PPTX
programming language interface i.pptx
PPT
Programming for biologists
PPTX
Group1_PERL.pptx
PDF
Perl%20SYLLABUS%20PB
PDF
Perl%20SYLLABUS%20PB
PPTX
PPTX
perl lauange
PDF
lecture2-PerlProgramming
PDF
lecture2-PerlProgramming
KEY
Le PERL est mort
PPTX
Scripting languages presentation_michel_patrickfrancis
PDF
Modern Perl for the Unfrozen Paleolithic Perl Programmer
PPTX
introduction to Perl _ the programming language.pptx
Bioinformatica 29-09-2011-p1-introduction
Introduction to perl
Programming languages vienna
Unit 1-introduction to perl
programming language interface i.pptx
Programming for biologists
Group1_PERL.pptx
Perl%20SYLLABUS%20PB
Perl%20SYLLABUS%20PB
perl lauange
lecture2-PerlProgramming
lecture2-PerlProgramming
Le PERL est mort
Scripting languages presentation_michel_patrickfrancis
Modern Perl for the Unfrozen Paleolithic Perl Programmer
introduction to Perl _ the programming language.pptx
Ad

Recently uploaded (20)

PDF
.pdf is not working space design for the following data for the following dat...
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Database Infoormation System (DBIS).pptx
PDF
Mega Projects Data Mega Projects Data
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPT
Quality review (1)_presentation of this 21
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PDF
Lecture1 pattern recognition............
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
.pdf is not working space design for the following data for the following dat...
IB Computer Science - Internal Assessment.pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Miokarditis (Inflamasi pada Otot Jantung)
ISS -ESG Data flows What is ESG and HowHow
Business Ppt On Nestle.pptx huunnnhhgfvu
Supervised vs unsupervised machine learning algorithms
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Database Infoormation System (DBIS).pptx
Mega Projects Data Mega Projects Data
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Introduction-to-Cloud-ComputingFinal.pptx
Quality review (1)_presentation of this 21
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Lecture1 pattern recognition............
Introduction to Knowledge Engineering Part 1
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
Ad

113-1_Perl_1_Introduction_to_command_line.pdf

  • 1. Perl computer programming for bioinformatics You-Yu Lin
  • 2. What is Perl? • General purpose programming language • Developed by Larry Wall, a linguist working as a systems administrator for NASA in the late 1980s, as a way to make report processing easier Larry Wall The Camel Book (de facto reference book for Perl) The Llama book (for beginners)
  • 3. Development of Perl • Perl 1.0 was released in 1988 • Perl 5.000 was released in 1994 • Perl 5.36 released 2022/05/28 • Perl 6 was released in 1995 but renamed to Raku in 2019 • Perl 7 scheduled for release in 2023 but since cancelled (compatibility issues)
  • 4. Why learn Perl? 1. Similar to other languages (C, shell script, python), easy to learn • Python was released in 1991 2. Easy and direct • Code is brief and effective • A lot of “Do-What-I-Means” 3. Useful and fast • Text processing • Web programming, GUI programming, bioinformatics, etc. 4. Free and resourceful • Large social community and online resources
  • 5. Why not to learn Perl? 1. Too flexible…TIMTOWTDI (There Is More Than One Way To Do It) • Each person will have their own unique style, may be difficult for others and especially beginners to read 2. IP concerns • Perl is an interpreted language and your codes do not need compilation • Which also means very difficult to distribute your software without revealing your code
  • 6. Where to get Perl? • Should be included with Unix/Linux or macOS systems • For Windows, https://www.perl.org/get.html • Strawberry Perl or ActiveState Perl
  • 8. Your first Perl script • Enter 「print “Hello Worldn”;」 into a text file • Name file as 01_Hello.pl • File extension of Perl scripts are .pl • Not strictly required • However, will be recognized as Perl scripts and display with Perl-specialized coloring scheme • To execute the script, type 「perl -w 01_Hello.pl」in command line window script.pl script.txt
  • 10. Perl and Bioinformatics • Has been extensively used for data processing of sequencing data, which is essentially endless strings • The human TERT gene (NG_009265.1) is 48,881 bp long (TERT.fas includes first 350 bp as an example)
  • 11. Enter the following code and execute it
  • 12. The Perl code reads the input file (TERT.fas) and outputs it Potential manipulations to the input file • Translate to amino acid sequence • Identify exons and introns • Calculate CG content and codon frequencies • Compare homology with other sequences • More…
  • 13. BioPerl • First released in 1995 • Contributed significantly for the Human Genome Project • Collection of bioinformatic-related Perl modules
  • 14. PuTTY • Free and open source terminal software • https://www.putty.org/ • You do not have to use PuTTY, but you need a terminal interface to connect to a Linux server • Please prepare a working terminal interface before next class