These are the lecture slides for the BITS training session "Introduction to programming in Bioperl".
See for more material: http://www.bits.vib.be/index.php?option=com_content&view=article&id=17203793:bioperl-additional-material&catid=84&Itemid=610
This is the third set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This is the third set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
This is the fourth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This is the ninth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
BioPerl is an active open source software project supported by the Open Bioinformatics Foundation.
BioPerl is a product of community effort to produce Perl code which is useful in biology.
BioPerl is a collection of Perl modules
It has played an integral role in the Human Genome Project
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
This is the fourth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This is the ninth set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
BioPerl is an active open source software project supported by the Open Bioinformatics Foundation.
BioPerl is a product of community effort to produce Perl code which is useful in biology.
BioPerl is a collection of Perl modules
It has played an integral role in the Human Genome Project
Vážení čtenáři,
eChaty.cz Vám představují první číslo eChaty magazínu. Internetový katalog eChaty.cz obsahuje chaty, chalupy a další rekreační ubytování s nabídkou sportovních aktivit a relaxace. Ve spolupráci s tímto webem vznikl časopis, který bude vycházet čtyřikrát do roka. V něm Vám přinášíme články a rozhovory o všem možném, co může zajímat ty, kdo rádi tráví dovolenou v Čechách a na Moravě.
Toto číslo nese přívlastek jarní, proto se věnujeme tématům souvisejícím s jarem. Dozvíte se zajímavosti o Velikonočních tradicích nebo o jarních květinách. Také si můžete přečíst typy pro turistiku. V jarním čísle najdete zámek Hluboká nad Vltavou nebo Pivovarský dvůr Zvíkov, který je prvním v seriálu o minipivovarech. Dále můžete v eChaty magazínu očekávat rozhovory se zajímavými osobnostmi. V tomto čísle odpovídá na naše dotazy Martin Michek, přední světový motokrosař. V druhém rozhovoru se od Radky Kostuchové dozvíte, proč strávit dovolenou v její chatě na farmě Neratov v Beskydech. Připravili jsme pro Vás článek kde so dozvíte něco víc o huculských koních, kteří se tam chovají. Pro čtenáře se soutěživým duchem je na konci připravena soutěž o iPad.
Příjemné čtení přeje
redakce magazínu eChaty
Social Media for CEOs - The External OpportunityOur Social Times
A presentation from Julius Duncan (Headstream.com) on how CEOs should view and approach social media strategically, with specific focus on external communications
Održivi razvoj je izbalansiran pristup zadovoljenju naših potreba danas, bez ugrožavanja mogućnosti da buduće generacije učine to isto sutra. Planetu na kojoj živimo, samo trenutno smo pozajmili od svojih predaka i treba da je sačuvamo i predamo naslednicima.
You’ve built a WordPress site or two (or 10), your installed plugins and themes to MOSTLY get what you want. Now you’re ready to learn the inner workings of WordPress and take your development to the next level. Jump into WordPress development and PHP by building a Plugin and learn to speak WordPress’ language: PHP.
Lecture 5 array in PHP.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvZahouAmel1
Lecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Training on php by cyber security infotech (csi). Cs-infotech is one of the best cyber security and website development company in India. we also provide Network security, software development, Cyber security corporate training and SEO and SMO services.
Our services are Employee Monitoring System,Employee Monitoring Software,Website Audit,Network Security,Network Audit and Information Security.
RNA-seq for DE analysis: detecting differential expression - part 5BITS
Part 5 of the training sesson 'RNA-seq for differential expression analysis' considers the algorithm used for detecting differential expression between conditions. See http://www.bits.vib.be
RNA-seq for DE analysis: extracting counts and QC - part 4BITS
Part 4 of the training sesson 'RNA-seq for differential expression analysis' considers extracting the count table from a mapping, and performing QC to detect sample biases. See http://www.bits.vib.be
RNA-seq for DE analysis: the biology behind observed changes - part 6BITS
Part 6 of the training sesson 'RNA-seq for differential expression analysis' considers gene set analysis for inferring biology from RNA-seq data. See http://www.bits.vib.be
The structure of Linux - Introduction to Linux for bioinformaticsBITS
This 3th slide deck of the training 'Introduction to linux for bioinformatics' gives a broad overview of the file system structure of linux. We very gently introducte the command line in this presentation.
This 1st presentation in the training "Introduction to linux for bioinformatics" gives an introduction to Linux, and the concepts by which Linux operates.
This is the last presentation of the BITS training on 'Comparative genomics'.
It reviews tthe Contra tool for detecting common transcription factor binding sites in sequences.
Thanks to Stefan Broos of the DMBR department of VIB
BITS - Comparative genomics on the genome levelBITS
This is the third presentation of the BITS training on 'Comparative genomics'.
It reviews the basic concepts of sequence homology on the gene
Thanks to Klaas Vandepoele of the PSB department.
BITS - Comparative genomics: gene family analysisBITS
This is the second presentation of the BITS training on 'Comparative genomics'.
It reviews the different methods of investigating sequence homology on the gene family level.
Thanks to Klaas Vandepoele of the PSB department.
This is the first presentation of the BITS training on 'Comparative genomics'.
It reviews the basic concepts of sequence homology on different levels.
Thanks to Klaas Vandepoele of the PSB department.
BITS - Protein inference from mass spectrometry dataBITS
This is the fifth presentation of the BITS training on 'Mass spec data processing'.
It reviews the problems of determining protein sequences of mass spec data, how to deal with it, with an overview of useful tools.
Thanks to the Compomics Lab of the VIB for their contribution.
BITS - Overview of sequence databases for mass spectrometry data analysisBITS
This is the fourth presentation of the BITS training on 'Mass spec data processing'.
It review sequences databases and their flaws in light of mass spectrometry data analysis.
Thanks to the Compomics Lab of the VIB for their contribution.
This is the third presentation of the BITS training on 'Mass spec data processing'.
It reviews the methods for matching mass spectrometry data with protein sequences, with review of useful tools.
Thanks to the Compomics Lab of the VIB for contribution.
This is the second presentation of the BITS training on 'Mass spec data processing'.
It reviews the methods for separating protein mixtures prior to further analysis.
Thanks to the Compomics Lab of the VIB for contribution.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. Perl “A script is what you give an actor, but a program is what you give an audience.”
3. Goals Perl Positioning System: find your way in the Perl World Write Once, Use Many Times Object Oriented Perl Consumer Developer Thou shalt not be afraid of the Bioperl Beast
4.
5. Agenda Day1 Perl refresher Scalars Arrays and lists Hashes Subroutines and functions Perldoc Creating and running a Perl script References and advanced data structures Packages and modules Objects, (multiple) inheritance, polymorphism
6. Agenda Day 2 What is bioperl ? Taming the Bioperl Beast Finding modules Finding methods Data::Dumper Sequence processing One image says more than 1000 words
7. Variables Data of any type may be stored within three basic types of variables: Scalar (strings, numbers, references) Array (aka list but not quite the same) Hash (aka associative array) Variable names are always preceded by a “dereferencing symbol” or prefix. If needed: {} $ - Scalar variables @ - List variables % - Associative array aka hash variables
8. Variables You do NOT have to Declare the variable before using it Define the variable’s data type Allocate memory for new data values
9. Scalar variables Scalar variable stores a string, a number, a character, a reference, undef $name, ${name}, ${‘name’} More magic: $_
10. Array variables Array variable stores a list of scalars @name, @{name}, @{‘name’} Index Map: index => scalar value zero-indexed (distance from start)
12. Array variables Access multiple values via array slice: Assign multiple values via array slice: print @array[3,2,4,1,0,-1]; @array[3,2,4,1,0,-1] = @new_values;
13. Lists List = temporary sequence of comma separated values usually in () or result of qw operator Array = container for a list Use: Array initialization Extract values from array my @array = qw/blood sweat tears/; my ($var1, $var2[42], $var3, @var4) = @args; my ($var5, $var6) = @args;
14.
15. Hash variables Hash variables are denoted by the % dereferencing symbol. Hash variables is a list of key-value pairs Both keys and values must be scalar Notice the ‘=>’ aka ‘quotifying comma’ my %fruit_color = ("apple", "red", "banana", "yellow"); my %fruit_color = ( apple => "red", banana => "yellow", );
17. Non data types Filehandle There are several predefined filehandles, including STDIN, STDOUT, STDERR and DATA (default opened). No prefix Code value aka subroutine Dereferencing symbol “&”
18.
19. Subroutines We can reuse a segment of Perl code by placing it within a subroutine. The subroutine is defined using the sub keyword and a name (= variable name !!). The subroutine body is defined by placing code statements within the {} code block symbols. sub MySubroutine{ #Perl code goes here. my @args = @_; }
20. Subroutines To call a subroutine, prepend the name with the & symbol: &MySubroutine; # w/o arguments Or: MySubroutine(); # with or w/o arguments
21. Subroutines Arguments in underscore array variable (@_) List flattening !! my @results = MySubroutine(@arg1, ‘arg2’, (‘arg3’, ‘arg4’)); sub MySubroutine{ #Perl code goes here. my ($thingy, @args) = @_; }
22. Subroutines Return value Nothing Scalar value List value Return value Explicit with return function Implicit: value of the last statement sub MySubroutine{ #Perl code goes here. my ($thingy, @args) = @_; do_something(@args); }
23. Subroutines Calling contexts Void Scalar List wantarray function Void => undef Scalar => 0 List => 1 getFiles($dir); my $num = getFiles($dir); my @files = getFiles($dir);
24. Functions and operators Built-in routines Function Arguments at right hand side Sensible name (defined, open, print, ...)
25. Functions Perl provides a rich set of built-in functions to help you perform common tasks. Several categories of useful built-in function include Arithmetic functions (sqrt, sin, … ) List functions (push, chomp, … ) String functions (length, substr, … ) Existance functions (defined, undef)
26. Array functions Array as queue: push/shift (FIFO) Array as stack: push/pop (LIFO) @row1 push shift 1 2 3 unshift pop
27. List functions chomp: remove newline from every element in the list map: kind of loop without escape, every element ($_) is ‘processed’ grep: kind of filter sort join
28. Hash functions keys: returns the hash keys in random order values: returns values of the hash in random order but same order as keys function call each: returns (key, value) pairs delete: remove a particular key (and associated value) from a hash
29. Operators Operator Complex and subtle (=,<>, <=>, ?:, ->,=>,...) Symbolic name (+,<,>,&,!, ...)
40. References(and referents) A reference is a special scalar value which “refers to” or “points to” any value. A variable name is one kind of reference that you are already familiar with. It’s a given name. Reference is a kind of private, internal, computer generated name A referent is the value that the reference is pointing to
41. Creating References Method 1: references to variables are created by using the backslash( operator. $name = ‘bioperl’; $reference = name; $array_reference = array_name; $hash_reference = hash_name; $subroutine_ref = amp;sub_name;
42. Creating References Method 2: [ ITEMS ] makes a new, anonymous array and returns a reference to that array. { ITEMS } makes a new, anonymous hash, and returns a reference to that hash my $array_ref = [ 1, ‘foo’, undef, 13 ]; my $hash_ref = {one => 1, two => 2};
43. Dereferencing a Reference Use the appropriate dereferencing symbol Scalar: $ Array: @ Hash: % Subroutine: &
44. Dereferencing a Reference Remember $name, ${‘name’} ? Means: give me the scalar value where the variable ‘name’ is pointing to. A reference $reference ìs a name, so $$reference, ${$reference} Means: give me the scalar value where the reference $reference is pointing to
45. Dereferencing a Reference The arrow operator: -> Arrays and hashes Subroutines my $array_ref = [ 1, ‘foo’, undef, 13 ]; my $hash_ref = {one => 1, two => 2}; ${$array_ref}[1] = ${$hash_ref}{‘two’} # can be written as: $array_ref->[1] = $hash_ref->{two} &{$sub_ref}($arg1,$arg2) # can be written as: $sub_ref->($arg1, $arg2)
47. References Why do we need references ??? Create complex data structures !! Arrays and hashes can only store scalar values Pass arrays, hashes, subroutines, ... as arguments to subroutines and functions !! List flattening
48. Complex data structures Remind: Reference is a scalar value Arrays and hashes are sets of scalar values In one go: my $array_ref = [ 1, 2, 3 ]; my $hash_ref = {one => 1, two => 2}; my %data = ( arrayref => $array_ref, hash_ref => $hash_ref); my %data = ( arrayref => [ 1, 2, 3 ], hash_ref => {one => 1, two => 2} );
49. Complex data structures Individual access my %data = ( arrayref => [ 1, 2, 3 ], hash_ref => {one => 1, two => [‘a’,’b’]}); How to access this value ? my $wanted_value = $data{hash_ref}->{two}->[1];
50. Complex data structures my @row1 = (1..3); my @row2 = (2,4,6); my @row3 = (3,6,9); my @rows = (row1,row2,row3); my $table = rows; @row1 $table 1 2 3 @rows @row2 2 4 6 @row3 3 6 9
53. Packages and modules 2 types of variables: Global aka package variables Lexical variables
54. Packages and modules Global / package variables Visible everywhere in every program You get the if you don’t say otherwise !! Autovivification Name has 2 parts: family name + given name Default family name is ‘main’. $John is actually $main::John $Cleese::John has nothing to do with $Wayne::John Family name = package name $var1 = 42; print “$var1, “, ++$var2; # results in: 42, 1
55.
56. Packages and modules Lexical / private variables Explicitely declared as Only visible within the boundaries of a code block or file. They cease to exist as soon as the program leaves the code block or the program ends The do not have a family name aka they do not belong to a package ALWAYS USE LEXICAL VARIABLES (except for subroutines ...) my $var1 = 42; #!/usr/bin/perl use strict; my $var1 = 42;
57. Packages Wikipedia: Family where the (global!) variables (incl. subroutines) live (remember $John) In general, a namespace is a container that provides context for the identifiers (variable names) it holds, and allows the disambiguation of homonym identifiers residing in different namespaces.
58. Packages Family has a: name, defined via package declaration House, block or blocks of code that follow the package declaration package Bio::SeqIO::genbank; # welcome to the Bio::SeqIO::genbank family sub write_seq{} package Bio::SeqIO::fasta; # welcome to the Bio::SeqIO::fasta family sub write_seq{}
59. Packages Why do we need packages ??? To organize code To improve maintainability To avoid name space collisions
60. Modules What ? A text file(with a .pm suffix) containing Perl source code, that can contain any number of namespaces. It must evaluate to a true value. Loading At compile time: use <module> At run time: require <expr> <expr> and <module>:compiler translates each double-colon '::' into a path separator and appends '.pm'. E.g. Data::Dumper yields Data/Dumper.pm use Data::Dumper; require Data::Dumper; require ‘my_file.pl’; require $class;
61. Modules A module can contain multiple packages, but convention dictates that each module contains a package of the same name. easy to quickly locate the code in any given package (perldoc –m <module>) not obligatory !! A module name is unique 1 to 1 mapping to file system !! Should start with capital letter
62. Module files Module files are stored in a subdirectory hierarchy that parallels the module name hierarchy. All module files must have an extension of .pm.
63. Modules Module path is relative. So, where is Perl searching for that module ? Possible modules roots @INC []$ perldoc –V … @INC: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .
64. Modules Alternative module roots (perldoc -q library) In script Command line Environment use lib ‘/my/alternative/module/path’; []$ perl -I/my/alternative/module/path script.pl export PERL5LIB=$PERL5LIB:/my/alternative/module/path
65. Modules Test/Speak.pm Test.pl package My::Package::Says::Hello; sub speak { print __PACKAGE__, " says: 'Hello'"; } package My::Package::Says::Blah; sub speak { print __PACKAGE__, " says: 'Blah'"; } 1; #!/usr/bin/perl use strict; use Test::Speak; My::Package::Says::Hello>speak; My::Package::Says::Blah->speak;
66. Modules Why do we need modules??? To organize packages into files/folders Code reuse (ne copy & paste !) Module repository: CPAN http://search.cpan.org https://metacpan.org/ Pragma Special module that influences the code (compilation) Lowercase Lexically scoped
67. Modules Module information In standard distribution: perldoc perlmodlib Manually installed: perldoc perllocal All modules: perldoc –q installed Documentation: perldoc <module name> Location: perldoc –l <module name> Source: perldoc –m <module name>
68. Packages and Modules - Summary A package is a separate namespace within Perl code. A module can have more than one package defined within it. The default package is main. We can get to variables (and subroutines) within packages by using the fully qualified name To write a package, just write package <package name> where you want the package to start. Package declarations last until the end of the enclosing block, file or until the next package statement The require and use keywords can be used to import the contents of other files for use in a program. Files which are included must end with a true value. Perl looks for modules in a list of directories stored in @INC Module names map to the file system
69.
70. Exercises Bioperl Training Exercise 1: perldoc Bioperl Training Exercise 2: thou shalt not forget Bioperl Training Exercise 3: arrays Bioperl Training Exercise 4: hashes Bioperl Training Exercise 5: packages and modules 1 Bioperl Training Exercise 6: packages and modules 2 Bioperl Training Exercise 7: complex data structures
73. Object Oriented Programming in Perl What is an object ? An object is a (complex) data structure representing a new, user defined type with a collection of behaviors (functions aka methods) Collection of attributes Developer’s perspective: 3 little make rules To create a class, build a package To create a method, write a subroutine To create an object, bless a referent
74. Rule 1: To create a class, build a package Defining a class A class is simply a package with subroutines that function as methods. Class name = type = label = namespace package Cat; 1;
75. Rule 2: To create a method, write a subroutine First argument of methods is always class name or object itself (or rather: reference) Subroutine call the OO way (method invocation arrow operator) package Cat; sub meow { my $self = shift; print __PACKAGE__ “ says: meow !”; } 1; Cat->meow; $cat->meow;
76. Rule 3: To create an object, bless a referent ‘Special’ method: constructor Any name will do, in most cases new Object can be anything, in most cases hash Reference to object is stored in variable bless Arguments: reference (+ class). Does not change !! Underlying referent is blessed (= typed, labelled) Returns reference package Cat; sub new { my ($class, @args) = @_; my $self = { _name => $_args[0] }; bless $self, $class; }
77. Objects Perl objects are data structures ( a collection of attributes). To create an object we have to take 3 rules into account: Classes are just packages Methods are just subroutines Blessing a referent creates an object
78. Objects Objects are passed around as references Calling an object method can be done using the method invocation arrow: Constructor functions in Perl are conventionally called new() and can be called by writing: $object_ref->method() $object_ref = ClassName->new()
79. Inheritance Concept Way to extend functionality of a class by deriving a (more specific) sub-class from it In Perl: Way of specifying where to look for methods store the name of 1 or more classes in the package variable @ISA Multiple inheritance !! package NorthAmericanCat; use Cat; @ISA = qw(Cat); package NorthAmericanCat; use Cat; use Animal; @ISA = qw(Cat Animal);
80. Inheritance UNIVERSAL, parent of all classes Predifined methods isa(‘<class name>’): check if the object inherits from a particular class can(‘<method name>’): check if <method name> is a callable method
81. Inheritance SUPER: superclass of the current package start looking in @ISA for a class that can() do_something explicitely call a method of a parental class often used by Bioperl to initialize object attributes $self->SUPER::do_something()
82. Polymorphism Concept methods defined in the base class will override methods defined in the parent classes same method has different behaviours
83.
84. Exercises Bioperl Training Exercise 8: OOP Bioperl Training Exercise 9: inheritance, polymorphism Bioperl Training Exercise 10: aggregation, delegation
Editor's Notes
Remember to wear it !
Not often needed. Why might you need the braces ? String interpolation:$name = ‘Johnny’;Print “$name1”; # => nothing printedPrint “${name}1”; # => ‘Johnny1’
If there are more variables in the list than elements in the array, the extra variables are assigned the udefined value. If there are fewer variables than array elements, the extra elements are ignored.Distributiviteit: my ()
If there are more variables in the list than elements in the array, the extra variables are assigned the udefined value. If there are fewer variables than array elements, the extra elements are ignored.
Comma is operator: flattens (‘concatenates’) lists/arrays
Comma is operator: flattens (‘concatenates’) lists/arrays
No parens needed: comma operators produce list
main should have been called ‘our’ ;-)Not needed to use the family name when you are with your family. If you call John for dinner, John will know it’s him and you know who will come.But if your family has visitors of another family and they have a John in the family as well ...Family name + given name = fully qualified variable name